This repository has been archived by the owner on Aug 4, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.eslintrc.json
187 lines (131 loc) · 4.44 KB
/
.eslintrc.json
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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
{
"rules": {
// Braces only needed for multi-line arrow function blocks
"arrow-body-style": [2, "as-needed"],
// Require spacing around =>
"arrow-spacing": 2,
// Always require spacing around a single line block
"block-spacing": 2,
// No space before always a space after a comma
"comma-spacing": [2, {"before": false, "after": true}],
// Commas at the end of the line not the start
"comma-style": 2,
// Don't require spaces around computed properties
"computed-property-spacing": [2, "never"],
// Functions must always return something or nothing
"consistent-return": 2,
// Require braces around blocks that start a new line
"curly": [2, "multi-line"],
// Always require a trailing EOL
"eol-last": 2,
// Require function* name()
"generator-star-spacing": [2, {"before": false, "after": true}],
// Space after colon not before in property declarations
"key-spacing": [2, { "beforeColon": false, "afterColon": true, "mode": "minimum" }],
// Require spaces around keywords
"keyword-spacing": 2,
// Unix linebreaks
"linebreak-style": [2, "unix"],
// Always require parenthesis for new calls
"new-parens": 2,
// Use [] instead of Array()
"no-array-constructor": 2,
// Disallow use of debugger
"no-debugger": 2,
// No duplicate arguments in function declarations
"no-dupe-args": 2,
// No duplicate keys in object declarations
"no-dupe-keys": 2,
// No duplicate cases in switch statements
"no-duplicate-case": 2,
// No labels
"no-labels": 2,
// If an if block ends with a return no need for an else block
"no-else-return": 2,
// No empty character classes in regex
"no-empty-character-class": 2,
// Disallow empty destructuring
"no-empty-pattern": 2,
// No assigning to exception variable
"no-ex-assign": 2,
// No using !! where casting to boolean is already happening
"no-extra-boolean-cast": 2,
// No double semicolon
"no-extra-semi": 2,
// No overwriting defined functions
"no-func-assign": 2,
// No invalid regular expressions
"no-invalid-regexp": 2,
// No odd whitespace characters
"no-irregular-whitespace": 2,
// No single if block inside an else block
"no-lonely-if": 2,
// No mixing spaces and tabs in indent
"no-mixed-spaces-and-tabs": [2, "smart-tabs"],
// No unnecessary spacing
"no-multi-spaces": [2, { "exceptions": {
"AssignmentExpression": true,
"VariableDeclarator": true,
"ArrayExpression": true,
"ObjectExpression": true
}}],
// No reassigning native JS objects
"no-native-reassign": 2,
// No (!foo in bar)
"no-negated-in-lhs": 2,
// Nested ternary statements are confusing
"no-nested-ternary": 2,
// Use {} instead of new Object()
"no-new-object": 2,
// No Math() or JSON()
"no-obj-calls": 2,
// No octal literals
"no-octal": 2,
// No redeclaring variables
"no-redeclare": 2,
// No unnecessary comparisons
"no-self-compare": 2,
// No declaring variables that hide things like arguments
"no-shadow-restricted-names": 2,
// No spaces between function name and parentheses
"no-spaced-func": 2,
// Disallow throwing literals (eg. |throw "error"| instead of
// |throw new Error("error")|)
"no-throw-literal": 2,
// No trailing whitespace
"no-trailing-spaces": 2,
// No using undeclared variables
"no-undef": 2,
// Error on newline where a semicolon is needed
"no-unexpected-multiline": 2,
// No unreachable statements
"no-unreachable": 2,
// No expressions where a statement is expected
"no-unused-expressions": 2,
// No using with
"no-with": 2,
// Always require semicolon at end of statement
"semi": [2, "always"],
// Require space before blocks
"space-before-blocks": 2,
// No space padding in parentheses
"space-in-parens": [2, "never"],
// Require spaces around operators
"space-infix-ops": 2,
// ++ and -- should not need spacing
"space-unary-ops": [2, { "words": true, "nonwords": false }],
// Require "use strict" to be defined globally in the script.
"strict": [2, "global"],
// No comparisons to NaN
"use-isnan": 2,
// Only check typeof against valid results
"valid-typeof": 2
},
"env": {
"browser": true
},
"globals": {
"Components": false,
"dump": false
}
}