Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions .eslintignore

This file was deleted.

146 changes: 0 additions & 146 deletions .eslintrc.js

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
run: npm run lint:ci

- name: Run Prettier check
run: npm run prettier:ci
run: npm run format:ci

test:
name: Test
Expand Down
3 changes: 3 additions & 0 deletions .oxfmtrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"styles": {}
}
13 changes: 13 additions & 0 deletions .oxlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"$schema": "https://raw.githubusercontent.com/oxc-project/oxc/main/npm/oxlint/configuration_schema.json",
"plugins": ["typescript", "react", "jest", "import"],
"categories": {
"correctness": "error",
"suspicious": "warn"
},
"rules": {
"typescript/no-explicit-any": "error",
"react/react-in-jsx-scope": "off"
},
"ignorePatterns": ["lib/**", "node_modules/**", "scripts/**"]
}
10 changes: 0 additions & 10 deletions .prettierignore

This file was deleted.

8 changes: 0 additions & 8 deletions .prettierrc

This file was deleted.

20 changes: 10 additions & 10 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ This file provides context for AI agents (Cursor, Claude, Copilot, etc.) working
- Build tool: `react-native-builder-bob` (outputs CJS + ESM + TypeScript declarations)
- Testing: Jest + `@testing-library/react-native`
- Language: TypeScript (strict mode, no `any`)
- Linting: ESLint v8 + Prettier
- Linting: oxlint v8 + oxfmt
- CI: GitHub Actions (typecheck + lint + test + build)

---
Expand Down Expand Up @@ -40,8 +40,8 @@ react-native-typescript-library-starter/
│ └── typescript/ # .d.ts declarations
├── scripts/
│ └── terminal/
│ ├── lint.mjs # Colored ESLint runner
│ └── prettier.mjs # Colored Prettier runner
│ ├── lint.mjs # Colored oxlint runner
│ └── oxfmt.mjs # Colored oxfmt runner
├── .github/
│ └── workflows/
│ ├── ci.yml # Runs on PR: typecheck + lint + test + build
Expand All @@ -55,8 +55,8 @@ react-native-typescript-library-starter/
├── tsconfig.json # Base TypeScript config
├── tsconfig.build.json # bob-specific build config
├── babel.config.js # metro-react-native-babel-preset (for Jest)
├── .eslintrc.js
├── .prettierrc
├── .oxlintrc.json
├── .oxfmtrc.json
└── .commitlintrc.json
```

Expand All @@ -72,10 +72,10 @@ All commands should be run from the repository root.
| `npm install` | Install all dependencies (also runs `husky` via `prepare`) |
| `npm run build` | Build library to `lib/` via bob |
| `npm run typecheck` | Type-check without emitting files |
| `npm run lint` | Run ESLint with colored output |
| `npm run lint:ci` | Run ESLint without spinner (for CI) |
| `npm run prettier` | Format code with colored output |
| `npm run prettier:ci` | Check formatting without spinner (for CI) |
| `npm run lint` | Run oxlint with colored output |
| `npm run lint:ci` | Run oxlint without spinner (for CI) |
| `npm run oxfmt` | Format code with colored output |
| `npm run oxfmt:ci` | Check formatting without spinner (for CI) |
| `npm test` | Run Jest tests |
| `npm run test:watch` | Run Jest in watch mode |
| `npm run test:coverage` | Run Jest with coverage report |
Expand Down Expand Up @@ -144,7 +144,7 @@ docs: update README with new API
- Do NOT use `require()` — use ES module `import`.
- Do NOT add `peerDependencies` as `dependencies` or `devDependencies` without justification.
- Do NOT export internal helpers from `src/index.ts` — only public API.
- Do NOT disable ESLint rules without an explanatory comment.
- Do NOT disable oxlint rules without an explanatory comment.
- Do NOT add `console.log` to source files.
- Do NOT use default exports for hooks — named exports only.
- Do NOT skip tests when adding new features.
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ npm run husky:setup
| ----------------------- | --------------------------- |
| `npm run build` | Build library to `lib/` |
| `npm run typecheck` | Type-check without emitting |
| `npm run lint` | Run ESLint with fix |
| `npm run prettier` | Format code |
| `npm run lint` | Run oxlint with fix |
| `npm run oxfmt` | Format code |
| `npm test` | Run all tests |
| `npm run test:watch` | Run tests in watch mode |
| `npm run test:coverage` | Run tests with coverage |
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ See the full [CHANGELOG](CHANGELOG.md) for all changes including the 2.0.0 redes
- **react-native-builder-bob** — dual CJS + ESM + TypeScript declarations
- **Strict TypeScript** — `noImplicitAny`, `strictNullChecks`, `noUnusedLocals`
- **Jest + @testing-library/react-native** — full test suite with coverage thresholds
- **ESLint + Prettier** — consistent code style, enforced on commit via `lint-staged`
- **oxlint + oxfmt** — consistent code style, enforced on commit via `lint-staged`
- **Husky v9 + commitlint** — conventional commit enforcement, hooks install on `npm install`
- **GitHub Actions** — CI pipeline (typecheck + lint + test + build)
- **AI-Ready** — `AGENTS.md`, Cursor rules, and full TSDoc on every export
Expand Down Expand Up @@ -128,10 +128,10 @@ react-native-typescript-library-starter/
| ----------------------- | ------------------------------------------- |
| `npm run build` | Build library to `lib/` via bob |
| `npm run typecheck` | Type-check without emitting |
| `npm run lint` | Run ESLint with colored output and auto-fix |
| `npm run lint:ci` | ESLint without spinner (for CI) |
| `npm run prettier` | Format source files |
| `npm run prettier:ci` | Check formatting (for CI) |
| `npm run lint` | Run oxlint with colored output and auto-fix |
| `npm run lint:ci` | oxlint without spinner (for CI) |
| `npm run oxfmt` | Format source files |
| `npm run oxfmt:ci` | Check formatting (for CI) |
| `npm test` | Run Jest tests |
| `npm run test:watch` | Jest in watch mode |
| `npm run test:coverage` | Jest with coverage report |
Expand Down Expand Up @@ -272,7 +272,7 @@ chore: upgrade dependencies
Runs on every push and pull request to `main`:

1. **Typecheck** — `tsc --noEmit`
2. **Lint** — ESLint + Prettier check
2. **Lint** — oxlint + oxfmt check
3. **Test** — Jest with coverage
4. **Build** — `bob build` (only runs after all checks pass)

Expand Down
Loading
Loading