|
1 | 1 | {
|
2 | 2 | "parser": "babel-eslint",
|
| 3 | + "parserOptions": { |
| 4 | + "sourceType": "module" |
| 5 | + }, |
3 | 6 |
|
4 | 7 | "env": {
|
5 | 8 | "browser": true,
|
6 | 9 | "node": true,
|
7 | 10 | "es6": true
|
8 | 11 | },
|
9 | 12 |
|
10 |
| - "ecmaFeatures": { |
11 |
| - "arrowFunctions": true, |
12 |
| - "binaryLiterals": true, |
13 |
| - "blockBindings": true, |
14 |
| - "classes": false, |
15 |
| - "defaultParams": true, |
16 |
| - "destructuring": true, |
17 |
| - "forOf": true, |
18 |
| - "generators": true, |
19 |
| - "modules": true, |
20 |
| - "objectLiteralComputedProperties": true, |
21 |
| - "objectLiteralDuplicateProperties": true, |
22 |
| - "objectLiteralShorthandMethods": true, |
23 |
| - "objectLiteralShorthandProperties": true, |
24 |
| - "octalLiterals": true, |
25 |
| - "regexUFlag": true, |
26 |
| - "regexYFlag": true, |
27 |
| - "spread": true, |
28 |
| - "superInFunctions": false, |
29 |
| - "templateStrings": true, |
30 |
| - "unicodeCodePointEscapes": true, |
31 |
| - "globalReturn": true, |
32 |
| - "jsx": true |
33 |
| - }, |
| 13 | + "extends": "airbnb", |
34 | 14 |
|
35 | 15 | "rules": {
|
36 |
| - "block-scoped-var": [0], |
37 |
| - "brace-style": [2, "1tbs", {"allowSingleLine": true}], |
38 |
| - "camelcase": [0], |
39 |
| - "comma-dangle": [0], |
40 |
| - "comma-spacing": [1], |
41 |
| - "comma-style": [2, "last"], |
42 |
| - "complexity": [0, 11], |
43 |
| - "consistent-return": [1], |
44 |
| - "consistent-this": [0, "that"], |
45 |
| - "curly": [0, "multi-line"], |
46 |
| - "default-case": [1], |
47 |
| - "dot-notation": [2, {"allowKeywords": true}], |
48 |
| - "eol-last": [1], |
49 |
| - "eqeqeq": [1], |
50 |
| - "func-names": [0], |
51 |
| - "func-style": [0, "declaration"], |
52 |
| - "generator-star-spacing": [2, "after"], |
53 |
| - "guard-for-in": [0], |
54 |
| - "handle-callback-err": [0], |
55 |
| - "key-spacing": [1, {"beforeColon": false, "afterColon": true}], |
56 |
| - "quotes": [1, "double", "avoid-escape"], |
57 |
| - "max-depth": [0, 4], |
| 16 | + "array-bracket-spacing": [1, "never"], |
| 17 | + "camelcase": [1], |
| 18 | + "class-methods-use-this": 0, // We want to allow helper functions that don't use 'this' in classes |
| 19 | + "jsx-a11y/alt-text": 0, |
| 20 | + "jsx-a11y/anchor-has-content": 1, |
| 21 | + "jsx-a11y/anchor-is-valid": 1, |
| 22 | + "jsx-a11y/click-events-have-key-events": 0, |
| 23 | + "jsx-a11y/heading-has-content": 1, |
| 24 | + "jsx-a11y/iframe-has-title": 1, |
| 25 | + "jsx-a11y/label-has-associated-control": 1, |
| 26 | + "jsx-a11y/label-has-for": 0, // Deprecated in favor of 'label-has-associated-control' |
| 27 | + "jsx-a11y/mouse-events-have-key-events": 1, |
| 28 | + "jsx-a11y/no-autofocus": 1, |
| 29 | + "jsx-a11y/no-noninteractive-element-interactions": 1, |
| 30 | + "jsx-a11y/no-static-element-interactions": 0, |
| 31 | + "jsx-quotes": 2, |
58 | 32 | "max-len": [0, 80, 4],
|
59 |
| - "max-nested-callbacks": [0, 2], |
60 |
| - "max-params": [0, 3], |
61 |
| - "max-statements": [0, 10], |
62 |
| - "new-parens": [2], |
63 |
| - "new-cap": [0], |
64 |
| - "newline-after-var": [0], |
65 |
| - "no-alert": [2], |
66 |
| - "no-array-constructor": [2], |
67 |
| - "no-bitwise": [0], |
68 |
| - "no-caller": [2], |
69 |
| - "no-catch-shadow": [2], |
70 |
| - "no-cond-assign": [2], |
71 | 33 | "no-console": [0],
|
72 |
| - "no-constant-condition": [1], |
73 |
| - "no-continue": [2], |
74 |
| - "no-control-regex": [2], |
75 |
| - "no-debugger": [2], |
76 |
| - "no-delete-var": [2], |
77 |
| - "no-div-regex": [0], |
78 |
| - "no-dupe-args": [2], |
79 |
| - "no-dupe-keys": [2], |
80 |
| - "no-duplicate-case": [2], |
81 | 34 | "no-else-return": [0],
|
82 |
| - "no-empty": [2], |
83 |
| - "no-empty-character-class": [2], |
84 |
| - "no-empty-label": [2], |
85 |
| - "no-eq-null": [0], |
86 |
| - "no-eval": [2], |
87 |
| - "no-ex-assign": [2], |
88 |
| - "no-extend-native": [1], |
89 |
| - "no-extra-bind": [1], |
90 |
| - "no-extra-boolean-cast": [2], |
91 |
| - "no-extra-semi": [1], |
92 |
| - "no-fallthrough": [2], |
93 |
| - "no-floating-decimal": [2], |
94 |
| - "no-func-assign": [2], |
95 |
| - "no-implied-eval": [2], |
96 |
| - "no-inline-comments": [0], |
97 |
| - "no-inner-declarations": [2, "functions"], |
98 |
| - "no-invalid-regexp": [2], |
99 |
| - "no-irregular-whitespace": [2], |
100 |
| - "no-iterator": [2], |
101 |
| - "no-label-var": [2], |
102 |
| - "no-labels": [2], |
103 |
| - "no-lone-blocks": [2], |
104 |
| - "no-lonely-if": [1], |
105 |
| - "no-loop-func": [1], |
106 |
| - "no-mixed-requires": [0, false], |
107 |
| - "no-mixed-spaces-and-tabs": [2, false], |
108 |
| - "no-multi-spaces": [1], |
109 |
| - "no-multi-str": [2], |
110 |
| - "no-multiple-empty-lines": [2, {"max": 2}], |
111 |
| - "no-native-reassign": [1], |
112 |
| - "no-negated-in-lhs": [2], |
113 |
| - "no-nested-ternary": [0], |
114 |
| - "no-new": [2], |
115 |
| - "no-new-func": [2], |
116 |
| - "no-new-object": [2], |
117 |
| - "no-new-require": [0], |
118 |
| - "no-new-wrappers": [2], |
119 |
| - "no-obj-calls": [2], |
120 |
| - "no-octal": [2], |
121 |
| - "no-octal-escape": [2], |
122 |
| - "no-param-reassign": [1], |
123 |
| - "no-path-concat": [0], |
| 35 | + "no-multi-spaces": [0], |
| 36 | + "no-multiple-empty-lines": [0], // allow indented comments (like this one) |
124 | 37 | "no-plusplus": [0],
|
125 |
| - "no-process-env": [0], |
126 |
| - "no-process-exit": [2], |
127 |
| - "no-proto": [2], |
128 |
| - "no-redeclare": [1], |
129 |
| - "no-regex-spaces": [2], |
130 |
| - "no-reserved-keys": [0], |
131 |
| - "no-restricted-modules": [0], |
132 |
| - "no-return-assign": [2], |
133 |
| - "no-script-url": [2], |
134 |
| - "no-self-compare": [0], |
135 |
| - "no-sequences": [1], |
136 |
| - "no-shadow": [1], |
137 |
| - "no-shadow-restricted-names": [2], |
138 |
| - "no-spaced-func": [1], |
139 |
| - "no-sparse-arrays": [2], |
140 |
| - "no-sync": [0], |
141 |
| - "no-ternary": [0], |
142 |
| - "no-throw-literal": [2], |
143 |
| - "no-trailing-spaces": [1], |
144 |
| - "no-undef": [1], |
145 |
| - "no-undef-init": [2], |
146 |
| - "no-undefined": [0], |
147 | 38 | "no-underscore-dangle": [0],
|
148 |
| - "no-unreachable": [2], |
149 |
| - "no-unused-expressions": [1], |
150 |
| - "no-unused-vars": [1], |
151 |
| - "no-use-before-define": [1], |
152 |
| - "no-void": [0], |
153 |
| - "no-warning-comments": [0, {"terms": ["todo", "fixme", "xxx"], "location": "start"}], |
154 |
| - "no-with": [2], |
155 |
| - "no-extra-parens": [1], |
156 |
| - "one-var": [1, "never"], |
157 |
| - "operator-assignment": [0, "always"], |
158 |
| - "operator-linebreak": [1, "after"], |
159 |
| - "padded-blocks": [0], |
160 |
| - "quote-props": [0], |
161 |
| - "radix": [0], |
162 |
| - "semi": [1], |
163 |
| - "semi-spacing": [2, {"before": false, "after": true}], |
164 |
| - "sort-vars": [0], |
165 |
| - "space-after-keywords": [2, "always"], |
166 |
| - "space-before-function-paren": [1, {"anonymous": "always", "named": "always"}], |
167 |
| - "space-before-blocks": [0, "always"], |
168 |
| - "space-in-brackets": [ |
169 |
| - 0, "never", { |
170 |
| - "singleValue": true, |
171 |
| - "arraysInArrays": false, |
| 39 | + "object-curly-newline": 0, |
| 40 | + "object-curly-spacing": [1, |
| 41 | + "always", { |
172 | 42 | "arraysInObjects": false,
|
173 |
| - "objectsInArrays": true, |
174 |
| - "objectsInObjects": true, |
175 |
| - "propertyName": false |
| 43 | + "objectsInObjects": true |
176 | 44 | }
|
177 | 45 | ],
|
178 |
| - "space-in-parens": [0], |
179 |
| - "space-infix-ops": [1], |
180 |
| - "space-return-throw-case": [2], |
181 |
| - "space-unary-ops": [0, {"words": true, "nonwords": false}], |
182 |
| - "spaced-line-comment": [0, "always"], |
183 |
| - "strict": [0, "never"], |
184 |
| - "use-isnan": [2], |
185 |
| - "valid-jsdoc": [0], |
186 |
| - "valid-typeof": [2], |
187 |
| - "vars-on-top": [0], |
188 |
| - "wrap-iife": [2], |
189 |
| - "wrap-regex": [1], |
190 |
| - "yoda": [2, "never", {"exceptRange": true}], |
191 |
| - "react/jsx-boolean-value": 2, |
192 |
| - "react/jsx-no-undef": 2, |
193 |
| - "react/jsx-sort-props": 0, |
194 |
| - "react/jsx-sort-prop-types": 0, |
195 |
| - "react/jsx-uses-react": 2, |
196 |
| - "react/jsx-uses-vars": 2, |
| 46 | + "operator-linebreak": [1, "after"], |
| 47 | + "padded-blocks": [1], |
| 48 | + "prefer-destructuring": 1, |
| 49 | + "quotes": [1, "single", "avoid-escape"], |
| 50 | + "radix": 0, // Dec 2018: We always use base 10, so specifying it each time seems excessive |
| 51 | + "react/button-has-type": 1, |
| 52 | + "react/destructuring-assignment": 0, // Dec 2018: We should do this! But right now we have 3990 warnings/errors if enabled. |
| 53 | + "react/forbid-prop-types": 0, // Dec 2018: Should consider someday |
| 54 | + "react/indent-prop": 0, |
| 55 | + "react/jsx-first-prop-new-line": 0, |
| 56 | + "react/jsx-indent-props": 0, |
| 57 | + "react/jsx-no-bind": 1, // Dec 2018: Should these be errors? |
| 58 | + "react/no-access-state-in-setstate": 1, |
| 59 | + "react/no-array-index-key": 1, |
| 60 | + "react/no-children-prop": 1, |
197 | 61 | "react/no-did-mount-set-state": 0,
|
198 |
| - "react/no-did-update-set-state": 2, |
199 |
| - "react/no-multi-comp": 2, |
200 |
| - "react/no-unknown-property": 1, |
| 62 | + "react/no-did-update-set-state": 0, |
| 63 | + "react/no-string-refs": 1, |
| 64 | + "react/no-unused-prop-types": 1, |
| 65 | + "react/no-unused-state": 1, |
| 66 | + "react/prefer-stateless-function": 0, |
201 | 67 | "react/prop-types": 1,
|
202 |
| - "react/react-in-jsx-scope": 2, |
203 |
| - "react/self-closing-comp": 2, |
204 |
| - "jsx-quotes": 2, |
| 68 | + "react/require-default-props": 0, // Dec 2018: Might have value someday |
| 69 | + "react/sort-comp": 1, |
| 70 | + "react-hooks/rules-of-hooks": "error", // Checks rules of Hooks |
| 71 | + "react-hooks/exhaustive-deps": "warn", // Checks effect dependencies |
| 72 | + "space-before-function-paren": [1, {"anonymous": "always", "named": "always"}], |
| 73 | + "space-in-parens": [1], |
| 74 | + "template-curly-spacing": ["warn", "never"] |
205 | 75 | },
|
206 | 76 | "plugins": [
|
207 |
| - "react" |
208 |
| - ], |
209 |
| - "global": { |
210 |
| - "React": true |
211 |
| - } |
| 77 | + "react", |
| 78 | + "react-hooks" |
| 79 | + ] |
212 | 80 | }
|
0 commit comments