1414 * limitations under the License.
1515 */
1616import js from '@eslint/js' ;
17+ import { defineConfig } from 'eslint/config'
1718import tseslint from 'typescript-eslint' ;
1819import react from 'eslint-plugin-react' ;
1920import reactHooks from 'eslint-plugin-react-hooks' ;
2021import jsxA11y from 'eslint-plugin-jsx-a11y' ;
2122import globals from 'globals' ;
2223
23- export default tseslint . config (
24+ export default defineConfig (
2425 {
2526 ignores : [ 'build/**' , 'node_modules/**' , 'src/proto/**' ] ,
2627 } ,
@@ -54,7 +55,7 @@ export default tseslint.config(
5455 } ,
5556 rules : {
5657 // Carried over from eslint-config-react-app
57- '@typescript-eslint/no-unused-vars' : [ 'warn ' , { args : 'none' , ignoreRestSiblings : true } ] ,
58+ '@typescript-eslint/no-unused-vars' : [ 'error ' , { args : 'none' , ignoreRestSiblings : true } ] ,
5859 '@typescript-eslint/no-explicit-any' : 'off' ,
5960 '@typescript-eslint/no-empty-object-type' : 'off' ,
6061 '@typescript-eslint/no-unsafe-function-type' : 'off' ,
@@ -73,23 +74,22 @@ export default tseslint.config(
7374 'statusbar' , 'stop' , 'toolbar' , 'top' ,
7475 ] ,
7576
76- // Not enabled in eslint-config-react-app; disable to keep migration clean
77- 'prefer-const' : 'off' ,
78- 'no-extra-boolean-cast' : 'off' ,
79- 'no-var' : 'off' ,
80- 'no-case-declarations' : 'off' ,
77+ 'prefer-const' : 'error' ,
78+ 'no-extra-boolean-cast' : 'error' ,
79+ 'no-var' : 'error' ,
80+ 'no-case-declarations' : 'error' ,
8181
8282 // React
8383 'react/prop-types' : 'off' , // TypeScript handles prop validation
8484 'react/display-name' : 'off' ,
85- 'react/jsx-key' : 'warn ' ,
86- 'react/jsx-no-target-blank' : 'warn ' ,
85+ 'react/jsx-key' : 'error ' ,
86+ 'react/jsx-no-target-blank' : 'error ' ,
8787 'react/no-unescaped-entities' : 'off' ,
8888
8989 // Accessibility: match eslint-config-react-app (warn, not error)
90- 'jsx-a11y/no-autofocus' : 'warn ' ,
91- 'jsx-a11y/click-events-have-key-events' : 'warn ' ,
92- 'jsx-a11y/no-static-element-interactions' : 'warn ' ,
90+ 'jsx-a11y/no-autofocus' : 'error ' ,
91+ 'jsx-a11y/click-events-have-key-events' : 'error ' ,
92+ 'jsx-a11y/no-static-element-interactions' : 'error ' ,
9393
9494 // react-hooks plugin v7 added these; not in eslint-config-react-app
9595 'react-hooks/immutability' : 'off' ,
0 commit comments