-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
81 lines (81 loc) · 2.62 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
{
"rules": {
"array-callback-return" : "error",
"new-cap" : "error",
"no-await-in-loop": "error",
"no-console": 0,
"no-empty": 0,
"no-global-assign" : "error",
"no-invalid-this" : "error",
"no-undef": 0,
"no-unused-vars": ["warn", { "args" : "none" }],
"no-useless-concat": "error",
"no-useless-constructor": "error",
"prefer-const" : "error",
"prefer-destructuring" : "warn",
"prefer-spread" : "error",
"prettier/prettier": "error",
// Do not add rules options for prettier config here; it will interfere with editor extensions
// See: https://github.com/prettier/eslint-plugin-prettier#options
"react/button-has-type" : "error",
"react/destructuring-assignment" : ["warn", "always"],
"react/display-name" : 0,
"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/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 }],
"valid-typeof" : ["error", { "requireStringLiterals": true }]
},
"env": {
"es6": true,
"browser": true,
"commonjs": true,
"cypress/globals" : true
},
"parser" : "@babel/eslint-parser",
"extends": [
"plugin:react/recommended",
"eslint:recommended",
"prettier"
],
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true,
"classes" : true,
"modules": true
}
},
"plugins": [
"react",
"cypress",
"prettier"
],
"overrides": [
// Prettier isn't great at formatting these files, so we're skipping
// them there; doing this here to prevent annoying squigglies
{
"files" : ["./src/encoded/static/data/*.jsx"],
"rules" : {
"react/jsx-no-undef" : 0,
"semi" : 0,
"react/react-in-jsx-scope" : 0
}
}
],
"settings": {
"react": {
"version": "detect"
}
}
}