🔧 Replace ESLint and Prettier with oxlint and oxfmt
- Drop .eslintrc.cjs and .prettierrc, add .oxlintrc.json and .oxfmtrc.json - oxlint covers correctness/suspicious/perf/style/restriction categories plus import and typescript plugins; oxfmt reads the same .prettierrc-style options we had before - Update lefthook.yml pre-commit jobs to run oxlint/oxfmt instead of eslint/prettier - Update .vscode/extensions.json (oxc replaces eslint/prettier/vitest) and settings.json (oxc becomes the default formatter for TS/JS) - Add 'oxlint', 'oxfmt', 'oxc', 'nodenext' to cspell dictionary - Rewrite README 'Development' section to describe the new toolchain
This commit is contained in:
1 parent
3530262261
commit
078a8c30fd
11 files changed
+130
-130
No files matched your search
@@ -7,20 +7,38 @@ Pattern matching for TypeScript/ESM environments (F#-style, not regex).
|
||||
- **Build:** `npm run build`
|
||||
- **Test:** `npm run test`, `npm run test:ci`
|
||||
- **Checks:** `npm run check`, `npm run fix`
|
||||
- **Format/Fix:** `npm run fix:oxfmt`, `npm run fix:oxlint`
|
||||
|
||||
### Tooling
|
||||
|
||||
- **TypeScript 7** — type checker and build (`tsc`).
|
||||
- **node --test** + `--experimental-strip-types` — test runner (Node 22.6+, flag dropped on Node 24).
|
||||
- **c8** — code coverage for `test:ci`.
|
||||
- **oxlint** — Rust-based linter.
|
||||
- **oxfmt** — Rust-based formatter (Prettier-compatible).
|
||||
- **cspell** — spell checking.
|
||||
- **sort-package-json** — keep `package.json` keys alphabetized.
|
||||
- **lefthook** — git pre-commit hooks.
|
||||
|
||||
### Requirements
|
||||
|
||||
- Node.js >= 22.6 (>= 24 recommended; `--experimental-strip-types` is unflagged on 24).
|
||||
|
||||
## VSCode integration
|
||||
|
||||
- Debugging
|
||||
- Running tests
|
||||
- Recommended extensions: see `.vscode/extensions.json` (oxc, cspell).
|
||||
- TypeScript 7 is used via `typescript.tsdk` pointing at `node_modules/typescript/lib`.
|
||||
- oxc extension provides oxlint squiggles and oxfmt format-on-save.
|
||||
|
||||
## Workflows
|
||||
|
||||
- Version updates
|
||||
- Changelog automation
|
||||
- Publishing
|
||||
- Version updates via `npm version`.
|
||||
- Publishing via GitHub Actions on tagged commits (see `.github/workflows/ci.yml`).
|
||||
- Changesets is available as a devDependency for changelog automation if desired.
|
||||
|
||||
## Contribution guidelines
|
||||
|
||||
- Commit signing (GPG)
|
||||
- How to set up commit message template
|
||||
- Reference to commit-message-template
|
||||
- Commit signing (GPG).
|
||||
- Set up commit message template: `npm run use:git-commit-message`.
|
||||
- See `commit-message-template`.
|
||||
- Type-only tests use `expect-type`'s `expectTypeOf(...)` inside `node --test` cases.
|
||||
Reference in new issue
Block a user