All rules inherit from @antfu/eslint-config.
- Add my @lvjiaxuan/eslint-plugin.
- Auto-detect
tsconfig.json
and its references if TypeScript is enabled, which means enabling type-aware rules. - Add my @lvjiaxuan/eslint-plugin-oxlint.
Follow antfu's.
// eslint.config.js
import lv from '@lvjiaxuan/eslint-config'
export default lv({
typescript: {
notDetectTsconfig: true
}
})
With OXLint
A number of rules will be taken care of by OXLint to reduce ESLint's burden.
Note
The rules settings of antfu's will be overwritten.
// eslint.config.js
import lv from '@lvjiaxuan/eslint-config'
export default lv({
oxlint: true // equals to `{ deny: 'correctness' }`.
})
Check the type OXLintOptions
detail on here.
Tip
- Categories of OXLint.
- Rules supported by OXLint.
Modify lint scritp:
// package.json
{
"scripts": {
- "lint": "eslint ."
+ "lint": "npx oxlint . && eslint",
+ "lintf": "npx oxlint . --fix && eslint --fix"
}
}