-
Notifications
You must be signed in to change notification settings - Fork 2
/
.eslintrc
71 lines (66 loc) · 2 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
{
"env": {
"node": true,
"es6": true,
"mocha": true
},
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
},
"extends": "eslint:recommended",
"rules": {
// Errors
"valid-jsdoc": ["error", {
"requireReturn": false
}],
"no-unsafe-negation": ["error"],
"no-template-curly-in-string": ["error"],
"no-extra-parens": ["error", "all"],
// Best Practices
"eqeqeq": ["error"],
"array-callback-return": ["error"],
"no-useless-escape": ["error"],
"complexity": ["error", 10],
"no-alert": ["error"],
"no-else-return": ["error"],
"no-eval": ["error"],
"no-loop-func": ["error"],
"no-magic-numbers": ["error", { "ignoreArrayIndexes": true, "ignore": [0, 1, -1] }],
"no-multi-spaces": ["error"],
// NodeJs
"callback-return": ["error"],
"handle-callback-err": ["error"],
// Stylic
"no-unneeded-ternary": ["error"],
"comma-spacing": ["error"],
"eol-last": ["error"],
"consistent-this": ["error", "_this"],
"comma-dangle": ["error", "never"],
"indent": ["error", 4, { "SwitchCase": 1 }],
"key-spacing": ["error", { "mode": "strict" }],
"max-depth": ["error", 5],
"max-params": ["error", 5],
"new-cap": ["error", {"capIsNewExceptions": ["Router"]}],
"no-multiple-empty-lines": ["error"],
"func-call-spacing": ["error", "never"],
"require-jsdoc": ["error", {
"require": {
"FunctionDeclaration": true,
"MethodDefinition": true,
"ClassDeclaration": true,
"ArrowFunctionExpression": false
}
}],
"space-before-function-paren": ["error", {"anonymous": "always", "named": "never", "asyncArrow": "always"}],
"space-before-blocks": ["error", {"functions": "always", "keywords": "always", "classes": "always" }],
"semi": ["error"],
// ES6
"arrow-body-style": ["error"],
"no-var": ["error"],
"prefer-const": ["error"],
// Variables
"no-undef-init": ["error"],
"no-use-before-define": ["error"]
}
}