-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc
72 lines (54 loc) · 2.04 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
{
// To minimize dependencies on Node- or browser-specific features, leave the
// env empty, and instead define globals as needed.
"env": {},
// Project-wide globals. If other globals are necessary, prefer putting them
// in a comment at the top of the file rather than adding them here.
"globals": {
"console": true,
"exports": true,
"module": true,
"require": true,
},
"plugins": [
"eslint-plugin-no-extension-in-require"
],
"rules": {
// Enforce "one true brace style", allowing start and end braces to be
// on the same line.
"brace-style": [2, "1tbs", {"allowSingleLine": true}],
// Turn off the regular camelcase rule, and use a custom rule which
// allows semantic actions to be named like `RuleName_caseName`.
"camelcase": 0,
"camelcase-ohm": 2,
// Enforce the name 'self' when assigning `this` to a local variable.
"consistent-this": [0, "self"],
// Enforce two-space indentation.
"indent": [2, 2, {indentSwitchCase: true}],
"global-strict": 0,
// Allow things like `while(true)`.
"no-constant-condition": 0,
// Allow empty block statements.
"no-empty": 0,
// Don't allow require() statements to include the '.js' extension.
"no-extension-in-require/main": 2,
// Allow extra spaces to be used for aligning variables.
"no-multi-spaces": 0,
// Allow variable shadowing.
"no-shadow": 0,
// Restrict what kind of objects can be used with 'throw'.
"no-throw-literal": 2,
// Allow identifiers with leading or trailing underscores.
"no-underscore-dangle": 0,
// Allow unused parameters, but not unused variables.
"no-unused-vars": [2, {"vars": "all", "args": "none"}],
// Allow functions to be used before they are defined.
"no-use-before-define": [2, "nofunc"],
// Use single quotes, except when escaping would be necessary.
"quotes": [2, "single", "avoid-escape"],
"strict": [2, "global"],
// Force IIFEs to be wrapped in parentheses.
"wrap-iife": [2, "inside"],
"yoda": 0
}
}