-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy path.eslintrc
89 lines (85 loc) · 2.26 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
{
"plugins": [
"react", "jsdoc"
],
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 6,
"ecmaFeatures": {
"jsx": true,
"experimentalObjectRestSpread": true
}
},
"env": {
"browser": true,
"node": true,
"es6": true,
"mocha": true
},
"rules": {
// Common js rules
"brace-style": [2, "1tbs", { "allowSingleLine": true }],
"camelcase": 2,
"curly": 2,
"eqeqeq": 2,
"no-extend-native": 2,
"no-proto": 2,
"no-caller": 2,
"no-unused-vars": [2, { "vars": "all", "args": "none" }],
"indent": [2, 2, {"SwitchCase": 1}],
"new-cap": 2,
"quotes": [2, "single"],
"max-depth": [2, 4],
"max-statements": [2, 45],
"max-len": [2, 150],
"no-eq-null": 2,
"operator-linebreak": 2,
"no-multiple-empty-lines": [2, { "max": 2 }],
"no-mixed-spaces-and-tabs": 2,
"space-unary-ops": 2,
"no-multi-spaces": 2,
"space-before-blocks": 2,
"space-before-function-paren": [2, "always"],
"keyword-spacing": 2,
"space-infix-ops": 2,
"object-curly-spacing": [2, "always"],
"comma-spacing": [2, { "before": false, "after": true }],
"no-trailing-spaces": 2,
"comma-dangle": 2,
"comma-style": ["error", "last"],
"wrap-iife": 2,
"no-extra-semi": 2,
"semi-spacing": 2,
"semi": [2, "never"],
"spaced-comment": 2,
"func-names": 2,
"key-spacing": [ 2, { "beforeColon": false, "afterColon": true } ],
"no-cond-assign": ["error", "always"],
// NodeJs rules
"block-scoped-var": 2,
"global-require": 2,
"no-mixed-requires": 2,
"no-new-require": 2,
// ES6 rules
"arrow-spacing": 2,
"no-const-assign": 2,
"no-var": 2,
"prefer-const": 2,
// React
"jsx-quotes": [2, "prefer-double"],
"react/jsx-uses-react": 1,
"react/jsx-uses-vars": 1,
// JSDoc
"jsdoc/check-param-names": 1,
"jsdoc/check-tag-names": 1,
"jsdoc/check-types": 1,
"jsdoc/newline-after-description": 0,
"jsdoc/require-description-complete-sentence": 1,
"jsdoc/require-hyphen-before-param-description": 1,
"jsdoc/require-param": 1,
"jsdoc/require-param-description": 1,
"jsdoc/require-param-type": 1,
"jsdoc/require-returns-description": 1,
"jsdoc/require-returns-type": 1
}
}