@@ -2,14 +2,41 @@ const baseRules = require('./index').rules
22
33module . exports = {
44 extends : [ 'airbnb' , 'prettier' , 'prettier/react' ] ,
5+ plugins : [ 'react-hooks' ] ,
56 rules : Object . assign ( baseRules , {
7+ // https://github.com/yannickcr/eslint-plugin-react/tree/master/docs/rules
68 'react/jsx-filename-extension' : [ 'error' , { extensions : [ '.js' ] } ] ,
79 'react/prop-types' : 'off' ,
810 'react/sort-comp' : 'off' ,
911 'react/no-did-mount-set-state' : 'off' ,
1012 'react/require-default-props' : 'off' ,
1113 'react/no-array-index-key' : 'off' ,
12- 'react/no-typos' : 'off' ,
14+ 'react/destructuring-assignment' : 'off' ,
15+ 'react/forbid-foreign-prop-types' : [ 'warn' , { allowInPropTypes : true } ] ,
16+ 'react/jsx-no-comment-textnodes' : 'warn' ,
17+ 'react/jsx-no-duplicate-props' : [ 'warn' , { ignoreCase : true } ] ,
18+ 'react/jsx-no-target-blank' : 'warn' ,
19+ 'react/jsx-no-undef' : 'error' ,
20+ 'react/jsx-pascal-case' : [
21+ 'warn' ,
22+ {
23+ allowAllCaps : true ,
24+ ignore : [ ] ,
25+ } ,
26+ ] ,
27+ 'react/jsx-uses-react' : 'warn' ,
28+ 'react/jsx-uses-vars' : 'warn' ,
29+ 'react/no-danger-with-children' : 'warn' ,
30+ 'react/no-deprecated' : 'warn' ,
31+ 'react/no-direct-mutation-state' : 'warn' ,
32+ 'react/no-is-mounted' : 'warn' ,
33+ 'react/no-typos' : 'error' ,
34+ 'react/react-in-jsx-scope' : 'error' ,
35+ 'react/require-render-return' : 'error' ,
36+ 'react/style-prop-object' : 'warn' ,
37+
38+ 'react-hooks/rules-of-hooks' : 'error' ,
39+ 'react-hooks/exhaustive-deps' : 'warn' ,
1340
1441 'jsx-a11y/anchor-is-valid' : 'off' ,
1542 'jsx-a11y/anchor-has-content' : 'off' ,
0 commit comments