11module . exports = {
22 env : { es6 : true } ,
33 parser : 'babel-eslint' ,
4- extends : [ 'eslint:recommended' , 'standard' , 'standard-react' ] ,
4+ extends : [ 'eslint:recommended' ] ,
55 overrides : [
66 {
77 files : [ '*.tsx' , '*.ts' , '*.d.ts' ] ,
@@ -22,11 +22,12 @@ module.exports = {
2222 globals : {
2323 requestAnimationFrame : 'readonly' ,
2424 cancelAnimationFrame : 'readonly' ,
25+ require : 'readonly' ,
2526 __DEV__ : false ,
2627 __STORYBOOK__ : false ,
2728 __STORYSHOT__ : false ,
2829 } ,
29- plugins : [ 'filenames ' , 'babel ' , 'import' , 'react-hooks' ] ,
30+ plugins : [ 'promise ' , 'react' , 'filenames ', 'import' , 'react-hooks' ] ,
3031 settings : {
3132 'import/core-modules' : [ 'electron' , 'react-native' ] ,
3233 'import/extensions' : [ '.js' , '.tsx' , '.d.ts' , '.native.tsx' , '.desktop.tsx' , '.native.js' , '.desktop.js' ] ,
@@ -35,65 +36,126 @@ module.exports = {
3536 extensions : [ '.js' , '.tsx' , '.d.ts' , '.native.tsx' , '.desktop.tsx' , '.native.js' , '.desktop.js' ] ,
3637 } ,
3738 } ,
39+ react : {
40+ version : 'detect' ,
41+ } ,
3842 } ,
3943 rules : {
40- 'babel/func-params-comma-dangle' : 'off' ,
41- 'babel/no-unused-expressions' : 'off' ,
42- camelcase : 'off' ,
44+ 'array-callback-return' : 'error' ,
4345 'comma-dangle' : [ 'error' , 'always-multiline' ] ,
44- curly : 'off' ,
45- 'filenames/match-regex ' : [ 'error' , '^[0-9a-z-.]+(\\.desktop|\\.native|\\.ios|\\.android)?$' ] ,
46+ 'dot-notation' : 'off' ,
47+ 'func-call-spacing ' : 'off' ,
4648 'generator-star-spacing' : 'off' ,
47- 'import/export' : 'error' ,
48- 'import/imports-first' : 'error' ,
49- 'import/named' : 'error' ,
50- 'import/no-duplicates' : 'error' ,
51- 'import/no-extraneous-dependencies' : 'error' ,
52- 'import/no-mutable-exports' : 'error' ,
53- 'import/no-named-as-default' : 'error' ,
54- 'import/no-named-as-default-member' : 'error' ,
55- indent : 'off' ,
5649 'jsx-quotes' : 'off' ,
50+ 'lines-between-class-members' : 'off' ,
5751 'no-duplicate-imports' : 'off' ,
5852 'no-empty' : 'off' ,
59- 'no-useless-return' : 'off' ,
53+ 'no-extra-semi' : 'off' ,
54+ 'no-implied-eval' : 'error' ,
55+ 'no-loop-func' : 'off' ,
6056 'no-mixed-operators' : 'off' ,
57+ 'no-script-url' : 'error' ,
58+ 'no-self-compare' : 'error' ,
59+ 'no-sequences' : 'error' ,
60+ 'no-shadow' : 'warn' ,
6161 'no-unused-expressions' : 'off' ,
62- 'no-extra-semi' : 'off' ,
63- 'promise/param-names' : 'off' ,
62+ 'no-use-before-define' : 'off' ,
63+ 'no-useless-return' : 'off' ,
64+ 'object-curly-even-spacing' : 'off' ,
65+ 'object-curly-spacing' : 'off' ,
66+ 'prefer-const' : 'warn' ,
67+ 'quote-props' : 'off' ,
68+ 'react-hooks/exhaustive-deps' : 'warn' ,
69+ 'react-hooks/rules-of-hooks' : 'error' ,
70+ 'react/boolean-prop-naming' : 'error' ,
71+ 'react/button-has-type' : 'off' ,
72+ 'react/default-props-match-prop-types' : 'error' ,
73+ 'react/destructuring-assignment' : 'off' ,
74+ 'react/display-name' : 'off' ,
75+ 'react/forbid-component-props' : 'off' ,
76+ 'react/forbid-dom-props' : 'off' ,
77+ 'react/forbid-elements' : 'off' ,
78+ 'react/forbid-foreign-prop-types' : 'off' ,
79+ 'react/forbid-prop-types' : 'off' ,
6480 'react/jsx-boolean-value' : [ 'error' , 'always' ] ,
81+ 'react/jsx-child-element-spacing' : 'off' ,
82+ 'react/jsx-closing-bracket-location' : 'off' ,
83+ 'react/jsx-closing-tag-location' : 'off' ,
84+ 'react/jsx-curly-brace-presence' : 'off' ,
85+ 'react/jsx-curly-newline' : 'off' ,
6586 'react/jsx-curly-spacing' : 'off' ,
66- 'react/jsx-equals-spacing' : 'error' ,
87+ 'react/jsx-equals-spacing' : 'off' ,
88+ 'react/jsx-filename-extension' : 'off' ,
89+ 'react/jsx-first-prop-new-line' : 'off' ,
90+ 'react/jsx-fragments' : [ 'error' , 'syntax' ] ,
91+ 'react/jsx-handler-names' : 'off' ,
6792 'react/jsx-indent' : 'off' ,
6893 'react/jsx-indent-props' : 'off' ,
6994 'react/jsx-key' : 'error' ,
70- 'react/jsx-no-bind' : [ 'error' , { allowArrowFunctions : true } ] ,
95+ 'react/jsx-max-depth' : 'off' ,
96+ 'react/jsx-max-props-per-line' : 'off' ,
97+ 'react/jsx-no-bind' : 'off' ,
98+ 'react/jsx-no-comment-textnodes' : 'error' ,
7199 'react/jsx-no-duplicate-props' : 'error' ,
100+ 'react/jsx-no-literals' : 'off' ,
101+ 'react/jsx-no-target-blank' : 'error' ,
72102 'react/jsx-no-undef' : 'error' ,
73- 'react/jsx-pascal-case' : 'error' ,
103+ 'react/jsx-one-expression-per-line' : 'off' ,
104+ 'react/jsx-pascal-case' : 'off' ,
105+ 'react/jsx-props-no-multi-spaces' : 'off' ,
106+ 'react/jsx-props-no-spreading' : 'off' ,
107+ 'react/jsx-sort-default-props' : 'off' ,
108+ 'react/jsx-sort-props' : 'off' ,
109+ 'react/jsx-space-before-closing' : 'off' ,
110+ 'react/jsx-tag-spacing' : 'off' ,
74111 'react/jsx-uses-react' : 'error' ,
75112 'react/jsx-uses-vars' : 'error' ,
76- 'react/jsx-space-before-closing' : 'off' ,
113+ 'react/jsx-wrap-multilines' : 'off' ,
114+ 'react/no-access-state-in-setstate' : 'error' ,
115+ 'react/no-array-index-key' : 'off' ,
116+ 'react/no-children-prop' : 'off' ,
77117 'react/no-danger' : 'error' ,
78- 'react/no-did-mount-set-state' : 'error' ,
79- 'react/no-did-update-set-state' : 'off' ,
118+ 'react/no-danger-with-children' : 'error' ,
119+ 'react/no-deprecated' : 'warn' ,
120+ 'react/no-did-mount-set-state' : 'warn' ,
121+ 'react/no-did-update-set-state' : 'warn' ,
80122 'react/no-direct-mutation-state' : 'error' ,
123+ 'react/no-find-dom-node' : 'warn' ,
81124 'react/no-is-mounted' : 'error' ,
125+ 'react/no-multi-comp' : 'off' ,
126+ 'react/no-redundant-should-component-update' : 'error' ,
127+ 'react/no-render-return-value' : 'error' ,
128+ 'react/no-set-state' : 'off' ,
129+ 'react/no-string-refs' : 'error' ,
130+ 'react/no-this-in-sfc' : 'error' ,
131+ 'react/no-typos' : 'warn' ,
132+ 'react/no-unescaped-entities' : 'off' ,
82133 'react/no-unknown-property' : 'error' ,
83- 'react/no-unused-prop-types' : 'off' ,
134+ 'react/no-unsafe' : 'error' ,
135+ 'react/no-unused-prop-types' : 'error' ,
136+ 'react/no-unused-state' : 'error' ,
137+ 'react/no-will-update-set-state' : 'warn' ,
138+ 'react/prefer-es6-class' : 'off' ,
139+ 'react/prefer-read-only-props' : 'error' ,
140+ 'react/prefer-stateless-function' : 'warn' ,
84141 'react/prop-types' : 'off' ,
85142 'react/react-in-jsx-scope' : 'error' ,
86- 'react/require-render-return' : 'error' ,
87- 'react-hooks/rules-of-hooks' : 'error' ,
88- 'react-hooks/exhaustive-deps' : 'warn' ,
143+ 'react/require-default-props' : 'error' ,
144+ 'react/require-optimization' : 'off' ,
145+ 'react/require-render-return' : 'off' ,
146+ 'react/self-closing-comp' : 'off' ,
147+ 'react/sort-comp' : 'off' ,
148+ 'react/sort-prop-types' : 'off' ,
149+ 'react/state-in-constructor' : 'off' ,
150+ 'react/static-property-placement' : 'off' ,
151+ 'react/style-prop-object' : 'error' ,
152+ 'react/void-dom-elements-no-children' : 'error' ,
89153 'sort-keys' : [ 'error' , 'asc' , { caseSensitive : true , natural : false } ] ,
90- 'space-before-function-paren' : 'off' ,
91- 'standard/array-bracket-even-spacing' : 'off' ,
92- 'standard/computed-property-even-spacing' : [ 'error' , 'never' ] ,
93- 'standard/no-callback-literal' : 'off' ,
94- 'object-curly-spacing' : 'off' ,
95- 'object-curly-even-spacing' : 'off' ,
96- strict : [ 'error' , 'global' ] ,
97154 'yield-star-spacing' : 'off' ,
155+ camelcase : 'off' ,
156+ curly : 'off' ,
157+ indent : 'off' ,
158+ quotes : 'off' ,
159+ strict : [ 'error' , 'global' ] ,
98160 } ,
99161}
0 commit comments