-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
84 lines (84 loc) · 2.85 KB
/
.eslintrc.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
{
"rules": {
"array-callback-return" : "error",
"arrow-body-style" : ["error", "as-needed", { "requireReturnForObjectLiteral": true }],
"arrow-parens" : ["error", "always"],
"generator-star-spacing" : "error",
"indent": [2, 4, {"SwitchCase": 1}],
"getter-return" :"error",
"jsx-quotes" : ["error", "prefer-double"],
"linebreak-style": [2, "unix"],
"new-cap" : "error",
"no-await-in-loop": "error",
"no-console": 0,
"no-empty": 0,
"no-global-assign" : "error",
"no-invalid-this" : "error",
"no-tabs" : "error",
"no-trailing-spaces" : "error",
"no-undef": 0,
"no-unused-vars": ["warn", { "args" : "none" }],
"no-useless-concat": "error",
"no-useless-constructor": "error",
"no-whitespace-before-property" : "error",
"object-curly-spacing" : ["error", "always"],
"prefer-const" : "error",
"prefer-destructuring" : "warn",
"prefer-spread" : "error",
"react/button-has-type" : "error",
"react/destructuring-assignment" : ["warn", "always"],
"react/display-name" : 0,
"react/jsx-closing-tag-location" : "error",
"react/jsx-indent" : "error",
"react/jsx-indent-props" : "error",
"react/jsx-key" : "error",
"react/jsx-no-duplicate-props" : "error",
"react/jsx-no-bind" : ["warn", { "ignoreDOMComponents" : true }],
"react/jsx-pascal-case" : ["error", { "allowAllCaps" : true }],
"react/jsx-props-no-multi-spaces" : "error",
"react/no-access-state-in-setstate" : "error",
"react/no-direct-mutation-state" : "error",
"react/no-children-prop" : 1,
"react/no-danger-with-children" : "error",
"react/no-is-mounted" : "error",
"react/no-redundant-should-component-update" : "error",
"react/no-this-in-sfc" : "error",
"react/no-typos": "error",
"react/prop-types": [1, { "skipUndeclared" : true }],
"semi": ["error", "always"],
"valid-typeof" : ["error", { "requireStringLiterals": true }]
},
"env": {
"es6": true,
"browser": true,
"commonjs": true,
"cypress/globals" : true
},
"parser" : "@babel/eslint-parser",
"extends": [
"eslint:recommended",
"plugin:react/recommended"
],
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true,
"classes" : true
}
},
"plugins": [
"react",
"cypress"
],
"overrides": [
{
"files" : ["./src/encoded/static/data/*.jsx"],
"rules" : {
"react/jsx-no-undef" : 0,
"semi" : 0,
"react/react-in-jsx-scope" : 0
}
}
]
}