This repository has been archived by the owner on Dec 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 74
/
Copy path.eslintrc
72 lines (67 loc) · 2.06 KB
/
.eslintrc
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
{
"parser": "babel-eslint",
"ecmaFeatures": {
"jsx": true,
"arrowFunctions": true,
"blockBindings": true,
"destructuring": true,
"objectLiteralComputedProperties": true,
"templateStrings": true,
"defaultParams": true,
"restParams": true
},
"env": {
"browser": true,
"mocha": true,
"node": true
},
"plugins": [
"react"
],
// Some rules could be eventually overriden for the development environment
// in the gulpfile.js.
// Consider these rules to apply perfectly on a release/production.
"rules": {
"no-unused-vars": [1],
"no-console": [2],
"eqeqeq": [2, "smart"],
"quotes": [2, "double"],
"indent": [2, 2, {"SwitchCase": 1, "VariableDeclarator": 1}],
"camelcase": [2, {"properties": "always"}],
"strict": [2, "never"], // <-- fix
"block-spacing": [2, "always"],
"no-mixed-spaces-and-tabs": [2],
"no-trailing-spaces": [2, { "skipBlankLines": false }],
"no-underscore-dangle": 2,
"no-multiple-empty-lines": [2, {"max": 1}],
"no-empty": [2],
"one-var": [2, "never"],
"object-curly-spacing": [2, "never"],
"space-after-keywords": [2, "always"],
"space-before-blocks": [2, "always"],
"space-before-function-paren": [2, {
"anonymous": "always", "named": "never"
}],
"spaced-comment": [2, "always", { "exceptions": ["*"]}],
"semi": [2, "always"],
"max-len": [2, 80, 4],
"valid-jsdoc": [2, {
"requireReturn": false,
"requireParamDescription": false
}],
// React plugin
"react/display-name": [2, {"acceptTranspilerName": true}],
"jsx-quotes": [2, "prefer-double"],
"react/jsx-no-undef": 2,
"react/jsx-uses-vars": [2, {"vars": "all", "args": "after-used"}],
"react/jsx-sort-prop-types": 2,
"react/no-did-mount-set-state": 2,
"react/no-did-update-set-state": 2,
"react/no-direct-mutation-state": 2,
"react/no-multi-comp": [2, {"ignoreStateless": true}],
"react/prop-types": 2,
"react/react-in-jsx-scope": 2,
"react/self-closing-comp": 2,
"react/wrap-multilines": 2
}
}