forked from code-dot-org/code-dot-org
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
58 lines (58 loc) · 1.8 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
// 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",
],
"extends": [
"eslint:recommended",
"plugin:react/recommended"
],
"env": {
"browser": true,
"node": true,
"mocha": true,
},
"rules": {
"array-bracket-spacing": ["error", "never"],
"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-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-with": "error",
"object-curly-spacing": "off",
"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/no-render-return-value": "off", // TODO: turn this on
"react/self-closing-comp": "error",
"react/wrap-multilines": "error", // autofixable
"semi": "error",
"space-before-function-paren": ["error", {
"anonymous": "always",
"named": "never"
}],
"strict": "error",
}
};