- 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
31 lines
808 B
YAML
31 lines
808 B
YAML
pre-commit:
|
|
parallel: true
|
|
jobs:
|
|
- name: oxlint
|
|
glob: "*.{ts,tsx,js,jsx,mjs,cjs}"
|
|
run: npx oxlint {staged_files}
|
|
- name: oxfmt
|
|
glob: "*.{ts,tsx,js,jsx,mjs,cjs}"
|
|
run: npx oxfmt --check {staged_files}
|
|
- name: cspell
|
|
run: npx cspell {staged_files}
|
|
- name: sort-package-json
|
|
run: npx sort-package-json --check
|
|
- name: typecheck
|
|
run: npx tsc --noEmit
|
|
- name: outdated
|
|
run: npx check-outdated
|
|
|
|
commands:
|
|
typecheck:
|
|
run: npm run check:tsc
|
|
spell:
|
|
run: npm run check:cspell
|
|
sort:
|
|
run: npm run check:package
|
|
lint:
|
|
run: npm run check:oxlint
|
|
format:
|
|
run: npm run check:oxfmt
|
|
outdated:
|
|
run: npm run check:outdated |