1+ module . exports = {
2+ parser : '@typescript-eslint/parser' ,
3+ parserOptions : {
4+ ecmaFeatures : {
5+ jsx : true ,
6+ } ,
7+ } ,
8+ settings : {
9+ react : {
10+ version : 'detect' ,
11+ } ,
12+ } ,
13+ rules : {
14+ // Indentation rule
15+ indent : 0 ,
16+ '@typescript-eslint/indent' : [ 'error' , 2 ] ,
17+
18+ // Force single quotes
19+ quotes : [ 'error' , 'single' ] ,
20+
21+ // Allow logs
22+ 'no-console' : 1 ,
23+
24+ // Force no ununsed variables
25+ 'no-unused-vars' : 2 ,
26+
27+ // Allow object type
28+ '@typescript-eslint/ban-types' : 0 ,
29+
30+ // Force windows linebreak styles
31+ 'linebreak-style' : [ 2 , 'unix' ] ,
32+
33+ // Force semicolons
34+ semi : [ 2 , 'always' ] ,
35+
36+ // Turn off explicit return type
37+ '@typescript-eslint/explicit-function-return-type' : 0 ,
38+
39+ // Turn off interface name prefixing
40+ '@typescript-eslint/interface-name-prefix' : 0 ,
41+
42+ // React rules
43+ 'react/display-name' : 0 ,
44+ 'react/forbid-prop-types' : 0 ,
45+ 'react/jsx-closing-bracket-location' : 1 ,
46+ 'react/jsx-curly-spacing' : 1 ,
47+ 'react/jsx-handler-names' : 1 ,
48+ 'react/jsx-indent' : [ 'warn' , 2 ] ,
49+ 'react/jsx-key' : 1 ,
50+ 'react/jsx-max-props-per-line' : 0 ,
51+ 'react/jsx-no-bind' : 0 ,
52+ 'react/jsx-no-duplicate-props' : 1 ,
53+ 'react/jsx-no-literals' : 0 ,
54+ 'react/jsx-no-undef' : 1 ,
55+ 'react/jsx-pascal-case' : 1 ,
56+ 'react/jsx-sort-prop-types' : 0 ,
57+ 'react/jsx-sort-props' : 0 ,
58+ 'react/jsx-uses-react' : 1 ,
59+ 'react/jsx-uses-vars' : 1 ,
60+ 'react/no-danger' : 1 ,
61+ 'react/no-deprecated' : 1 ,
62+ 'react/no-did-mount-set-state' : 1 ,
63+ 'react/no-did-update-set-state' : 1 ,
64+ 'react/no-direct-mutation-state' : 1 ,
65+ 'react/no-is-mounted' : 1 ,
66+ 'react/no-multi-comp' : 0 ,
67+ 'react/no-set-state' : 1 ,
68+ 'react/no-string-refs' : 0 ,
69+ 'react/no-unknown-property' : 1 ,
70+ 'react/prefer-es6-class' : 1 ,
71+ 'react/react-in-jsx-scope' : 1 ,
72+ 'react/self-closing-comp' : 1 ,
73+ 'react/sort-comp' : 1 ,
74+
75+ // React Hooks rules
76+ 'react-hooks/rules-of-hooks' : 'error' ,
77+ 'react-hooks/exhaustive-deps' : 'warn' ,
78+ } ,
79+ env : {
80+ browser : true ,
81+ es6 : true ,
82+ node : true ,
83+ } ,
84+ plugins : [ 'react' , 'react-hooks' , '@typescript-eslint' ] ,
85+ extends : [ 'plugin:react/recommended' , 'plugin:@typescript-eslint/recommended' ] ,
86+ } ;
0 commit comments