-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
78 lines (62 loc) · 1.59 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
69
70
71
72
73
74
75
76
77
78
module.exports = {
// http://eslint.org/docs/user-guide/configuring
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 2016,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true,
"impliedStrict": true,
}
},
"env": {
"browser": true,
"shared-node-browser": true,
"es6": true, // Necessary for ES global symbols like Set, Symbol
},
"globals": {
"anyware_config": true, // This is set from the main html page
},
"plugins": [
"babel", // Adapts rules to better handle ES2016+ code
"react", // React-specific linting rules
],
"settings": {
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
],
// http://eslint.org/docs/rules/
"rules": {
// Possible errors
"comma-dangle": ["error", "only-multiline"],
"eqeqeq": ["error", "smart"],
// Best practices
"no-alert": "error",
"no-unused-vars": "warn",
"no-console": "warn",
// ES2015
"no-var": "error",
"arrow-parens": "error",
"radix": ["error", "as-needed"],
// Style
"indent": ["error", 2],
"semi": ["error", "always"],
"curly": ["error", "multi-line"],
"brace-style": ["error", "stroustrup"],
// Overrides from airbnb
"quotes": "off",
"max-len": "off",
"no-underscore-dangle": "off",
"no-unneeded-ternary": "off",
// FIXME: Add
// "space-infix-ops"
// "object-shorthand"
// FIXME: These should be made errors:
"no-param-reassign": "warn",
// FIXME: Consider enforcing these:
"object-curly-spacing": "off",
"object-shorthand": "off",
}
};