1
1
{
2
- "rules" : {
2
+ "rules" : {
3
3
"array-callback-return" : " error" ,
4
- "arrow-body-style" : [" error" , " as-needed" , { "requireReturnForObjectLiteral" : true }],
5
- "arrow-parens" : [" error" , " always" ],
6
- "generator-star-spacing" : " error" ,
7
- "indent" : [2 , 4 , {"SwitchCase" : 1 }],
8
- "getter-return" :" error" ,
9
- "jsx-quotes" : [" error" , " prefer-double" ],
10
- "linebreak-style" : [2 , " unix" ],
11
4
"new-cap" : " error" ,
12
5
"no-await-in-loop" : " error" ,
13
6
"no-console" : 0 ,
14
7
"no-empty" : 0 ,
15
8
"no-global-assign" : " error" ,
16
9
"no-invalid-this" : " error" ,
17
- "no-tabs" : " error" ,
18
- "no-trailing-spaces" : " error" ,
19
10
"no-undef" : 0 ,
20
11
"no-unused-vars" : [" warn" , { "args" : " none" }],
21
12
"no-useless-concat" : " error" ,
22
13
"no-useless-constructor" : " error" ,
23
- "no-whitespace-before-property" : " error" ,
24
- "object-curly-spacing" : [" error" , " always" ],
25
14
"prefer-const" : " error" ,
26
15
"prefer-destructuring" : " warn" ,
27
16
"prefer-spread" : " error" ,
17
+ "prettier/prettier" : " error" ,
18
+ // Do not add rules options for prettier config here; it will interfere with editor extensions
19
+ // See: https://github.com/prettier/eslint-plugin-prettier#options
28
20
"react/button-has-type" : " error" ,
29
21
"react/destructuring-assignment" : [" warn" , " always" ],
30
22
"react/display-name" : 0 ,
31
- "react/jsx-closing-tag-location" : " error" ,
32
- "react/jsx-indent" : " error" ,
33
- "react/jsx-indent-props" : " error" ,
34
23
"react/jsx-key" : " error" ,
35
24
"react/jsx-no-duplicate-props" : " error" ,
36
25
"react/jsx-no-bind" : [" warn" , { "ignoreDOMComponents" : true }],
37
26
"react/jsx-pascal-case" : [" error" , { "allowAllCaps" : true }],
38
- "react/jsx-props-no-multi-spaces" : " error" ,
39
27
"react/no-access-state-in-setstate" : " error" ,
40
28
"react/no-direct-mutation-state" : " error" ,
41
29
"react/no-children-prop" : 1 ,
45
33
"react/no-this-in-sfc" : " error" ,
46
34
"react/no-typos" : " error" ,
47
35
"react/prop-types" : [1 , { "skipUndeclared" : true }],
48
- "semi" : [" error" , " always" ],
49
36
"valid-typeof" : [" error" , { "requireStringLiterals" : true }]
50
37
},
51
38
"env" : {
56
43
},
57
44
"parser" : " @babel/eslint-parser" ,
58
45
"extends" : [
46
+ " plugin:react/recommended" ,
59
47
" eslint:recommended" ,
60
- " plugin:react/recommended "
48
+ " prettier "
61
49
],
62
50
"parserOptions" : {
63
51
"ecmaVersion" : 6 ,
64
52
"sourceType" : " module" ,
65
53
"ecmaFeatures" : {
66
54
"jsx" : true ,
67
- "classes" : true
55
+ "classes" : true ,
56
+ "modules" : true
68
57
}
69
58
},
70
59
"plugins" : [
71
60
" react" ,
72
- " cypress"
61
+ " cypress" ,
62
+ " prettier"
73
63
],
74
64
"overrides" : [
65
+ // Prettier isn't great at formatting these files, so we're skipping
66
+ // them there; doing this here to prevent annoying squigglies
75
67
{
76
68
"files" : [" ./src/encoded/static/data/*.jsx" ],
77
69
"rules" : {
80
72
"react/react-in-jsx-scope" : 0
81
73
}
82
74
}
83
- ]
84
- }
75
+ ],
76
+ "settings" : {
77
+ "react" : {
78
+ "version" : " detect"
79
+ }
80
+ }
81
+ }
0 commit comments