After #8677 replaced ESLint with OxLint, the react-in-jsx-scope rule was not disabled. This causes all commits touching JSX files to fail the pre-commit hook (oxlint --deny-warnings). React 17+ uses automatic JSX runtime so explicit React imports are not required. Fixes #8681
53 lines
1.1 KiB
JSON
53 lines
1.1 KiB
JSON
{
|
|
"$schema": "./node_modules/oxlint/configuration_schema.json",
|
|
"plugins": ["react", "typescript", "jsx-a11y", "import", "promise", "unicorn", "oxc"],
|
|
"categories": {
|
|
"correctness": "warn",
|
|
"suspicious": "warn",
|
|
"perf": "warn"
|
|
},
|
|
"env": {
|
|
"browser": true,
|
|
"node": true,
|
|
"es2024": true
|
|
},
|
|
"settings": {
|
|
"react": {
|
|
"version": "18.3"
|
|
},
|
|
"jsx-a11y": {
|
|
"polymorphicPropName": "as"
|
|
}
|
|
},
|
|
"ignorePatterns": [
|
|
".cache/**",
|
|
".next/**",
|
|
".react-router/**",
|
|
".storybook/**",
|
|
".turbo/**",
|
|
".vite/**",
|
|
"*.config.{js,mjs,cjs,ts}",
|
|
"build/**",
|
|
"coverage/**",
|
|
"dist/**",
|
|
"**/public/**",
|
|
"storybook-static/**"
|
|
],
|
|
"rules": {
|
|
"react/react-in-jsx-scope": "off",
|
|
"react/prop-types": "off",
|
|
"unicorn/filename-case": "off",
|
|
"unicorn/no-null": "off",
|
|
"unicorn/prevent-abbreviations": "off",
|
|
"no-unused-vars": [
|
|
"warn",
|
|
{
|
|
"argsIgnorePattern": "^_",
|
|
"varsIgnorePattern": "^_",
|
|
"caughtErrorsIgnorePattern": "^_",
|
|
"destructuredArrayIgnorePattern": "^_",
|
|
"ignoreRestSiblings": true
|
|
}
|
|
]
|
|
}
|
|
}
|