forked from code-dot-org/code-dot-org
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
68 lines (68 loc) · 2.15 KB
/
.eslintrc.js
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
// This is the primary JavaScript linting rules for the entire
// project. In a few places, some of these rules are extended
// or overridden for a particular subset of the project. See
// other .eslintrc.js files for those rules.
module.exports = {
plugins: ["react", "mocha", "babel"],
extends: [
"plugin:prettier/recommended",
"eslint:recommended",
"plugin:react/recommended"
],
env: {
browser: true,
node: true,
mocha: true
},
rules: {
"array-bracket-spacing": ["error", "never"],
"babel/semi": "error", // autofixable
"brace-style": ["error", "1tbs", { allowSingleLine: true }],
"comma-dangle": "off",
curly: "error",
"dot-location": ["error", "property"],
"eol-last": "error",
eqeqeq: "error",
"jsx-quotes": "error", // autofixable
"keyword-spacing": "error",
"mocha/no-exclusive-tests": "error",
"no-array-constructor": "error",
"no-console": "off",
"no-duplicate-imports": "error",
"no-empty": "off",
"no-eval": "error",
"no-ex-assign": "off",
"no-extra-boolean-cast": "off",
"no-implicit-globals": "error",
"no-new-object": "error",
"no-trailing-spaces": "error",
"no-undef": "error",
"no-unused-vars": ["error", { args: "none" }],
"no-useless-escape": "off",
"no-with": "error",
"object-curly-spacing": "off",
"react/button-has-type": "error",
"react/display-name": "off",
"react/jsx-closing-bracket-location": "error", // autofixable
"react/jsx-curly-spacing": "error", // autofixable
"react/jsx-first-prop-new-line": ["error", "multiline"],
"react/jsx-indent-props": ["error", 2], // autofixable
"react/jsx-key": "off",
"react/jsx-no-target-blank": "off",
"react/jsx-wrap-multilines": "error", // autofixable
"react/no-find-dom-node": "off",
"react/no-render-return-value": "off",
"react/no-string-refs": "off",
"react/no-unescaped-entities": "off",
"react/self-closing-comp": "error",
"react/no-danger" : "error",
semi: "off", // enforced by babel/semi
"space-before-blocks": "error",
strict: "error"
},
settings: {
react: {
version: "detect"
}
}
};