-
Notifications
You must be signed in to change notification settings - Fork 38
/
.eslintrc.json
94 lines (94 loc) · 2.28 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
85
86
87
88
89
90
91
92
93
94
{
"plugins": [
"import",
"react"
],
"parserOptions": {
"ecmaVersion": 11,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"env": {
"browser": true,
"es6": true
},
"extends": [
"eslint:recommended",
"plugin:import/recommended",
"plugin:react/recommended",
"plugin:react/jsx-runtime"
],
"rules": {
// disabled until all our react usage is in TS files
"react/prop-types": "off",
"one-var-declaration-per-line": ["error", "always"],
"one-var": ["error", "never"],
"array-callback-return": "error",
"guard-for-in": "error",
"no-array-constructor": "error",
"no-console": 0,
"no-implied-eval": "error",
"no-return-await": "error",
"no-sequences": "error",
"no-var": "error",
// these comment markers fail CI (notes to self in code that need to be
// resolved before a PR can be merged)
"no-warning-comments": [
"error",
{
"terms": ["XXX", "NOMERGE"],
"location": "anywhere"
}
],
"prefer-arrow-callback": "error",
"prefer-const": "error",
"prefer-numeric-literals": "error",
"prefer-rest-params": "error",
"prefer-template": "error",
"require-await": "error",
"arrow-body-style": [
"error",
"as-needed"
],
"curly": [
"error",
"all"
],
"eqeqeq": [
"error",
"always",
{
"null": "ignore"
}
],
"func-style": [
"error",
"declaration",
{
"allowArrowFunctions": true
}
],
"no-use-before-define": [
"error",
"nofunc"
],
"object-shorthand": [
"error",
"always"
],
"operator-assignment": [
"error",
"always"
],
"quote-props": [
"error",
"consistent-as-needed"
],
"spaced-comment": [
"error",
"always"
]
}
}