@@ -8,20 +8,20 @@ import js from '@eslint/js';
88import prettier from 'eslint-config-prettier' ;
99import globals from 'globals' ;
1010import react from 'eslint-plugin-react' ;
11- import babelParser from '@babel/eslint-parser' ;
1211
1312export default [
1413 {
15- files : [ '**/*.{js,jsx,ts,tsx}' ] ,
1614 ignores : [ '**/node_modules/**' , '**/dist/**' , '**/build/**' , '**/public/**' , 'db/**' , 'conf/**' ] ,
1715 } ,
18- js . configs . recommended ,
19- prettier ,
16+
2017 {
18+ files : [ '**/*.{js,jsx}' ] ,
2119 languageOptions : {
22- parser : babelParser ,
20+ ecmaVersion : 'latest' ,
2321 sourceType : 'module' ,
24- ecmaVersion : 2021 ,
22+ parserOptions : {
23+ ecmaFeatures : { jsx : true } ,
24+ } ,
2525 globals : {
2626 ...globals . browser ,
2727 ...globals . node ,
@@ -32,70 +32,14 @@ export default [
3232 after : 'readonly' ,
3333 it : 'readonly' ,
3434 } ,
35- parserOptions : { requireConfigFile : false } ,
3635 } ,
3736 plugins : { react } ,
37+ settings : { react : { version : 'detect' } } ,
3838 rules : {
39- eqeqeq : [ 2 , 'allow-null' ] ,
40- strict : 0 ,
41- 'no-redeclare' : [ 2 , { builtinGlobals : false } ] ,
42- 'class-methods-use-this' : 'off' ,
43- indent : [ 'off' , 2 ] ,
44- 'linebreak-style' : [ 'error' , 'unix' ] ,
45- quotes : [ 'error' , 'single' , { avoidEscape : true , allowTemplateLiterals : true } ] ,
46- semi : [ 'error' , 'always' ] ,
39+ ...js . configs . recommended . rules ,
4740 'no-console' : [ 'error' , { allow : [ 'warn' , 'error' ] } ] ,
48- 'jsx-quotes' : [ 'error' , 'prefer-double' ] ,
49- 'react/display-name' : 'off' ,
50- 'react/forbid-prop-types' : 'off' ,
51- 'react/jsx-closing-bracket-location' : 'off' ,
52- 'react/jsx-curly-spacing' : 'off' ,
53- 'react/jsx-handler-names' : [ 'off' , { eventHandlerPrefix : 'handle' , eventHandlerPropPrefix : 'on' } ] ,
54- 'react/jsx-indent-props' : 'off' ,
55- 'react/jsx-key' : 'off' ,
56- 'react/jsx-max-props-per-line' : 'off' ,
57- 'react/jsx-no-bind' : [ 'error' , { ignoreRefs : true , allowArrowFunctions : true , allowBind : false } ] ,
58- 'react/jsx-no-duplicate-props' : [ 'error' , { ignoreCase : true } ] ,
59- 'react/jsx-no-literals' : 'off' ,
60- 'react/jsx-no-undef' : 'error' ,
61- 'react/jsx-pascal-case' : [ 'error' , { allowAllCaps : true , ignore : [ ] } ] ,
62- 'react/sort-prop-types' : [ 'off' , { ignoreCase : true , callbacksLast : false , requiredFirst : false } ] ,
63- 'react/jsx-sort-prop-types' : 'off' ,
64- 'react/jsx-sort-props' : 'off' ,
65- 'react/jsx-uses-react' : 'error' ,
66- 'react/jsx-uses-vars' : 'error' ,
67- 'react/no-danger' : 'warn' ,
68- 'react/no-deprecated' : 'error' ,
69- 'react/no-did-mount-set-state' : 'error' ,
70- 'react/no-did-update-set-state' : 'warn' ,
71- 'react/no-direct-mutation-state' : 'off' ,
72- 'react/no-is-mounted' : 'error' ,
73- 'react/no-set-state' : 'off' ,
74- 'react/no-string-refs' : 'warn' ,
75- 'react/no-unknown-property' : 'error' ,
76- 'react/prop-types' : [ 'error' , { ignore : [ ] , customValidators : [ ] , skipUndeclared : true } ] ,
77- 'react/react-in-jsx-scope' : 'error' ,
78- 'react/require-extension' : 'off' ,
79- 'react/require-render-return' : 'error' ,
80- 'react/self-closing-comp' : 'warn' ,
81- 'react/sort-comp' : 'off' ,
82- 'react/jsx-wrap-multilines' : [ 'warn' , { declaration : true , assignment : true , return : true } ] ,
83- 'react/wrap-multilines' : 'off' ,
84- 'react/jsx-first-prop-new-line' : 'off' ,
85- 'react/jsx-equals-spacing' : [ 'warn' , 'never' ] ,
86- 'react/jsx-no-target-blank' : 'error' ,
87- 'react/jsx-filename-extension' : [ 'error' , { extensions : [ '.jsx' ] } ] ,
88- 'react/jsx-no-comment-textnodes' : 'error' ,
89- 'react/no-comment-textnodes' : 'off' ,
90- 'react/no-render-return-value' : 'error' ,
91- 'react/require-optimization' : [ 'off' , { allowDecorators : [ ] } ] ,
92- 'react/no-find-dom-node' : 'warn' ,
93- 'react/forbid-component-props' : [ 'off' , { forbid : [ ] } ] ,
94- 'react/no-danger-with-children' : 'error' ,
95- 'react/no-unused-prop-types' : [ 'warn' , { customValidators : [ ] , skipShapeProps : true } ] ,
96- 'react/style-prop-object' : 'error' ,
97- 'react/no-children-prop' : 'warn' ,
9841 } ,
99- settings : { react : { version : 'detect' } } ,
10042 } ,
43+
44+ prettier ,
10145] ;
0 commit comments