-
Notifications
You must be signed in to change notification settings - Fork 8
/
.eslintrc
114 lines (110 loc) · 3.08 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
108
109
110
111
112
113
114
{
"root": true,
"extends": "@wrensecurity/eslint-config",
"env": {
"amd": true,
"browser": true,
"es6": true,
"qunit": true
},
"overrides": [
{
"files": [
"gulpfile.js"
],
"env": {
"node": true
},
"parserOptions": {
"ecmaVersion": 2021
}
},
{
"files": "*.jsm",
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 2021
}
},
{
"files": "*.mjs",
"env": {
"node": true
},
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 2021
}
}
],
"rules": {
/*
* --------------------------------------------------------------------------------
* ERROR RULES
*
* Violating these rules will cause the build to fail.
* --------------------------------------------------------------------------------
*/
"array-bracket-spacing": ["error", "never"],
"indent": ["error", 4, {
"FunctionDeclaration": {
"parameters": 2
},
"FunctionExpression": {
"parameters": 2
},
"SwitchCase": 1,
"VariableDeclarator": 1
}],
"max-len": ["error", 120, 4],
"new-parens": "error",
"no-alert": "error",
"no-catch-shadow": "error",
"no-duplicate-case": "error",
"no-empty-character-class": "error",
"no-extend-native": "error",
"no-invalid-regexp": "error",
"no-irregular-whitespace": "error",
"no-labels": "error",
"no-lonely-if": "error",
"no-mixed-spaces-and-tabs": "error",
"no-multiple-empty-lines": "error",
"no-multi-str": "error",
"no-native-reassign": "error",
"no-trailing-spaces": "error",
"no-unused-vars": "error",
"no-void": "error",
/**
/*
* --------------------------------------------------------------------------------
* WARNING RULES
*
* These are rules that we want to turn into errors but can't yet because there are
* too many violations. As we fix the violations, we will transition them into
* error rules.
* --------------------------------------------------------------------------------
*/
/**
* Require a capital letter for constructors.
*
* var f = Foo(); # bad
*
* var f = new Foo(); # good
*/
"new-cap": ["warn", {
"capIsNew": false
}],
/**
* Multiple spaces not allowed.
*
* var fruit···=··"apples" # bad
*
* var fruit·=·"apples" # good
*/
"no-multi-spaces": "warn",
/**
* Allow the use of eval!
*/
"no-eval": "warn"
}
}