oxc
- https://oxc.rs/docs/guide/usage/linter/quickstart.html
- https://oxc.rs/docs/guide/usage/formatter/quickstart.html
Oxlint
- npm
- Yarn
- pnpm
- Bun
npm install --save-dev oxlint
yarn add --dev oxlint
pnpm add --save-dev oxlint
bun add --dev oxlint
.oxlintrc.json
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"plugins": ["react", "typescript", "oxc"],
"rules": {
"react/rules-of-hooks": "error",
"react/only-export-components": ["warn", { "allowConstantExport": true }]
}
}
package.json
{
"scripts": {
"lint": "oxlint",
"lint:fix": "oxlint --fix"
}
}
Oxfmt
- npm
- Yarn
- pnpm
- Bun
npm install --save-dev oxfmt
yarn add --dev oxfmt
pnpm add --save-dev oxfmt
bun add --dev oxfmt
.oxfmtrc.json
{
"$schema": "./node_modules/oxfmt/configuration_schema.json",
"ignorePatterns": ["index.html"],
"printWidth": 120
}
package.json
{
"scripts": {
"fmt": "oxfmt",
"fmt:check": "oxfmt --check"
}
}