forked from clay/clay-kiln
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc
107 lines (107 loc) · 2.87 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
{
"extends": "airbnb-base/whitespace",
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 2018,
"ecmaFeatures": {
"arrowFunctions": true,
"blockBindings": true,
"forOf": true,
"objectLiteralDuplicateProperties": true,
"objectLiteralShorthandProperties": true,
"objectLiteralShorthandMethods": true,
"octalLiterals": true,
"binaryLiterals": true,
"templateStrings": true,
"generators": true,
"modules": true
}
},
"plugins": ["html"],
"env": {
"browser": true,
"commonjs": true,
"mocha": true,
"es6": true
},
// add global vars for chai, etc
"globals": {
"expect": false,
"chai": false,
"sinon": false,
"jest": false,
"mockLogger": false
},
"rules": {
// possible errors
"no-extra-parens": 1,
"valid-jsdoc": [
1,
{
"requireReturn": false,
"requireParamDescription": false,
"requireReturnDescription": false
}
],
// best practices
"complexity": [1, 8],
"curly": [2, "all"],
"default-case": 2,
"guard-for-in": 2,
"no-alert": 1,
"no-floating-decimal": 1,
"no-self-compare": 2,
"no-throw-literal": 2,
"no-void": 2,
"quote-props": [2, "as-needed"],
"vars-on-top": 2,
"wrap-iife": 2,
// strict mode
"strict": [2, "never"],
// variables
"no-unused-vars": 2,
// node.js
"handle-callback-err": [2, "^.*(e|E)rr"],
"no-mixed-requires": 0,
"no-new-require": 2,
"no-path-concat": 2,
// stylistic issues
"brace-style": [2, "1tbs", { "allowSingleLine": true }],
"comma-style": [2, "last"],
"indent": [2, 2, { "SwitchCase": 1 }],
"max-nested-callbacks": [2, 4],
"newline-after-var": [2, "always"],
"no-nested-ternary": 2,
"no-spaced-func": 0,
"no-trailing-spaces": 2,
"no-underscore-dangle": 0,
"no-unneeded-ternary": 1,
"one-var": ["error", { "const": "consecutive", "let": "consecutive" }],
"quotes": [2, "single", "avoid-escape"],
"semi": [2, "always"],
"keyword-spacing": 2,
"space-before-blocks": [2, "always"],
"space-before-function-paren": [2, { "anonymous": "always", "named": "never" }],
"space-infix-ops": [1, { "int32Hint": false }],
"spaced-comment": [2, "always"],
"arrow-parens": 1,
"no-inline-comments": 0,
"comma-dangle": ["error", "never"],
"sort-keys": "off",
"sort-vars": "off",
"sort-imports": "off",
"import/no-internal-modules": "off",
"import/no-default-export": "off",
"import/no-namespace": "off",
"import/no-relative-parent-imports": "off",
"import/no-extraneous-dependencies": "off",
"no-use-before-define": "off",
"no-mixed-operators": "off",
"no-ternary": "off",
// es6
"generator-star-spacing": [2, "before"],
// legacy jshint rules
"max-depth": [2, 4],
"max-params": [2, 4]
}
}