eslint-config-uphold 0.2.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +23 -4
- package/package.json +21 -10
- package/src/index.js +51 -101
- package/src/rules/explicit-sinon-use-fake-timers.js +50 -0
- package/.travis.yml +0 -12
- package/CHANGELOG.md +0 -21
- package/test/fixtures/correct.js +0 -317
- package/test/fixtures/environment.js +0 -5
- package/test/fixtures/incorrect.js +0 -334
- package/test/index.js +0 -109
- package/yarn.lock +0 -1159
package/test/fixtures/correct.js
DELETED
|
@@ -1,317 +0,0 @@
|
|
|
1
|
-
// env: jasmine.
|
|
2
|
-
try {
|
|
3
|
-
fail();
|
|
4
|
-
} catch (e) {
|
|
5
|
-
// eslint-disable-line no-empty
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
// env: jest and mocha.
|
|
9
|
-
describe();
|
|
10
|
-
|
|
11
|
-
// Avoid extra `no-unused-vars` violations.
|
|
12
|
-
function noop() {
|
|
13
|
-
// do nothing
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
// `array-bracket-spacing`, `comma-spacing` and `no-multi-spaces`.
|
|
17
|
-
noop(['bar', 'foo']);
|
|
18
|
-
|
|
19
|
-
// `arrow-parens`
|
|
20
|
-
noop(() => 'bar');
|
|
21
|
-
noop(foo => foo);
|
|
22
|
-
noop((foo, bar) => [foo, bar]);
|
|
23
|
-
|
|
24
|
-
// `brace-style`.
|
|
25
|
-
try {
|
|
26
|
-
noop();
|
|
27
|
-
} catch (e) {
|
|
28
|
-
noop();
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
noop(function *() { return yield noop(); });
|
|
32
|
-
|
|
33
|
-
// `comma-dangle`, `comma-style`.
|
|
34
|
-
noop({ bar: 'foo', foo: 'bar' });
|
|
35
|
-
|
|
36
|
-
// `consistent-this`.
|
|
37
|
-
const self = this;
|
|
38
|
-
|
|
39
|
-
noop(self);
|
|
40
|
-
|
|
41
|
-
// `curly`, `keyword-spacing`, `no-empty` and `space-before-blocks`.
|
|
42
|
-
let mixedRules = true;
|
|
43
|
-
|
|
44
|
-
if (mixedRules) {
|
|
45
|
-
mixedRules = false;
|
|
46
|
-
} else {
|
|
47
|
-
mixedRules = true;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
// `dot-notation`.
|
|
51
|
-
const dotNotation = {};
|
|
52
|
-
|
|
53
|
-
dotNotation.foo = 'bar';
|
|
54
|
-
|
|
55
|
-
// `generator-star-spacing`
|
|
56
|
-
noop(function *() {});
|
|
57
|
-
noop(function *foo() {});
|
|
58
|
-
noop({ *foo() {} });
|
|
59
|
-
|
|
60
|
-
// `id-match`.
|
|
61
|
-
let idmatch;
|
|
62
|
-
let idMatch;
|
|
63
|
-
let IdMatch;
|
|
64
|
-
let IDMatch;
|
|
65
|
-
let IDMATCH;
|
|
66
|
-
let ID_MATCH;
|
|
67
|
-
let ID_M_ATCH;
|
|
68
|
-
|
|
69
|
-
noop(idmatch);
|
|
70
|
-
noop(idMatch);
|
|
71
|
-
noop(IdMatch);
|
|
72
|
-
noop(IDMatch);
|
|
73
|
-
noop(IDMATCH);
|
|
74
|
-
noop(ID_MATCH);
|
|
75
|
-
noop(ID_M_ATCH);
|
|
76
|
-
noop(__dirname);
|
|
77
|
-
noop(`${__dirname}`);
|
|
78
|
-
|
|
79
|
-
// `key-spacing`.
|
|
80
|
-
noop({ foo: 'bar' });
|
|
81
|
-
|
|
82
|
-
// `mocha/no-exclusive-tests`.
|
|
83
|
-
describe('noExclusiveTests', () => {
|
|
84
|
-
it('should work');
|
|
85
|
-
});
|
|
86
|
-
|
|
87
|
-
// `new-cap`.
|
|
88
|
-
const Cap = require('cap');
|
|
89
|
-
const newCap = new Cap();
|
|
90
|
-
|
|
91
|
-
noop(newCap);
|
|
92
|
-
|
|
93
|
-
// `newline-after-var`.
|
|
94
|
-
const newLineAfterVar = 'foo';
|
|
95
|
-
|
|
96
|
-
noop(newLineAfterVar);
|
|
97
|
-
|
|
98
|
-
// `newline-before-return`.
|
|
99
|
-
function funcThatReturns(bar) {
|
|
100
|
-
if (!bar) {
|
|
101
|
-
return;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
return bar;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
funcThatReturns('foo');
|
|
108
|
-
|
|
109
|
-
// `no-class-assign`.
|
|
110
|
-
class NoClassAssign { }
|
|
111
|
-
|
|
112
|
-
noop(NoClassAssign);
|
|
113
|
-
|
|
114
|
-
// `no-const-assign`.
|
|
115
|
-
let noConstAssign = true;
|
|
116
|
-
|
|
117
|
-
noConstAssign = false;
|
|
118
|
-
|
|
119
|
-
noop(noConstAssign);
|
|
120
|
-
|
|
121
|
-
// `no-constant-condition`.
|
|
122
|
-
const noConstantCondition = true;
|
|
123
|
-
|
|
124
|
-
if (noConstantCondition) {
|
|
125
|
-
noop(noConstantCondition);
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
// `no-dupe-class-members`.
|
|
129
|
-
class NoDupeClassMembers {
|
|
130
|
-
bar() {
|
|
131
|
-
return 'bar';
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
foo() {
|
|
135
|
-
return 'foo';
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
noop(NoDupeClassMembers);
|
|
140
|
-
|
|
141
|
-
// `no-labels`.
|
|
142
|
-
const noLabels = { label: true };
|
|
143
|
-
|
|
144
|
-
while (noLabels.label) {
|
|
145
|
-
break;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
// `no-multi-str`.
|
|
149
|
-
const noMultiStr = `Line 1
|
|
150
|
-
Line 2`;
|
|
151
|
-
|
|
152
|
-
noop(noMultiStr);
|
|
153
|
-
|
|
154
|
-
// `no-multiple-empty-lines`.
|
|
155
|
-
const noMultipleEmptyLines = true;
|
|
156
|
-
|
|
157
|
-
noop(noMultipleEmptyLines);
|
|
158
|
-
|
|
159
|
-
// `no-spaced-func`.
|
|
160
|
-
noop();
|
|
161
|
-
|
|
162
|
-
// `no-this-before-super`.
|
|
163
|
-
const NoThisBeforeSuper = require('no-this-before-super');
|
|
164
|
-
|
|
165
|
-
class Child extends NoThisBeforeSuper {
|
|
166
|
-
constructor() {
|
|
167
|
-
super();
|
|
168
|
-
this.foo = 'bar';
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
noop(Child);
|
|
173
|
-
|
|
174
|
-
// `no-warning-comments`.
|
|
175
|
-
|
|
176
|
-
// TODO: do something.
|
|
177
|
-
// FIXME: this is not a good idea.
|
|
178
|
-
|
|
179
|
-
// `object-curly-spacing`.
|
|
180
|
-
const objectCurlySpacing1 = { foo: 'bar' };
|
|
181
|
-
const objectCurlySpacing2 = {};
|
|
182
|
-
|
|
183
|
-
noop(objectCurlySpacing1);
|
|
184
|
-
noop(objectCurlySpacing2);
|
|
185
|
-
|
|
186
|
-
// `one-var`, `one-var-declaration-per-line`.
|
|
187
|
-
const oneVar1 = 'foo';
|
|
188
|
-
const oneVar2 = 'bar';
|
|
189
|
-
|
|
190
|
-
noop(oneVar1);
|
|
191
|
-
noop(oneVar2);
|
|
192
|
-
|
|
193
|
-
// `operator-linebreak`.
|
|
194
|
-
const operatorLineBreak = 1 + 2;
|
|
195
|
-
|
|
196
|
-
noop(operatorLineBreak);
|
|
197
|
-
|
|
198
|
-
// `padded-blocks`.
|
|
199
|
-
const paddedBlocks = true;
|
|
200
|
-
|
|
201
|
-
if (paddedBlocks) {
|
|
202
|
-
noop();
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
// `prefer-destructuring`.
|
|
206
|
-
let { bar } = {};
|
|
207
|
-
let [biz] = bar;
|
|
208
|
-
let baz = bar[biz];
|
|
209
|
-
|
|
210
|
-
bar.baz = bar.baz;
|
|
211
|
-
bar = biz.bar;
|
|
212
|
-
biz = baz[0];
|
|
213
|
-
baz = bar;
|
|
214
|
-
|
|
215
|
-
// `quote-props`.
|
|
216
|
-
const quoteProps = {
|
|
217
|
-
0: 0,
|
|
218
|
-
foo: 0,
|
|
219
|
-
'foo-bar': 0,
|
|
220
|
-
null: 0,
|
|
221
|
-
true: 0
|
|
222
|
-
};
|
|
223
|
-
|
|
224
|
-
noop(quoteProps);
|
|
225
|
-
|
|
226
|
-
// `quotes`.
|
|
227
|
-
const quotes1 = 'foo';
|
|
228
|
-
const quotes2 = `foo`;
|
|
229
|
-
|
|
230
|
-
noop(quotes1);
|
|
231
|
-
noop(quotes2);
|
|
232
|
-
|
|
233
|
-
// `require-await`.
|
|
234
|
-
(async () => {
|
|
235
|
-
await noop();
|
|
236
|
-
})();
|
|
237
|
-
|
|
238
|
-
// `semi`.
|
|
239
|
-
noop();
|
|
240
|
-
|
|
241
|
-
// `semi-spacing`.
|
|
242
|
-
for (let semiSpacing = 0; semiSpacing < 10; ++semiSpacing) {
|
|
243
|
-
noop();
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
// `sort-imports`.
|
|
247
|
-
import 'import-1';
|
|
248
|
-
import * as Import6 from 'import-2';
|
|
249
|
-
import { Import5, import4 } from 'import-3';
|
|
250
|
-
import { import3 } from 'import-4';
|
|
251
|
-
import Import2 from 'import-5';
|
|
252
|
-
import import1 from 'import-6';
|
|
253
|
-
|
|
254
|
-
noop(Import2);
|
|
255
|
-
noop(Import5);
|
|
256
|
-
noop(Import6);
|
|
257
|
-
noop(import1);
|
|
258
|
-
noop(import3);
|
|
259
|
-
noop(import4);
|
|
260
|
-
|
|
261
|
-
// `sort-keys`.
|
|
262
|
-
const sortObjectProps = {
|
|
263
|
-
var1: 'foo',
|
|
264
|
-
var9: 'bar',
|
|
265
|
-
var10: 'biz'
|
|
266
|
-
};
|
|
267
|
-
|
|
268
|
-
noop(sortObjectProps);
|
|
269
|
-
|
|
270
|
-
// `space-before-function-paren`.
|
|
271
|
-
(function() {
|
|
272
|
-
noop();
|
|
273
|
-
})();
|
|
274
|
-
|
|
275
|
-
// `space-in-parens`.
|
|
276
|
-
noop('foo');
|
|
277
|
-
|
|
278
|
-
// `space-infix-ops`.
|
|
279
|
-
const spaceInfixOps = 1 + 2;
|
|
280
|
-
|
|
281
|
-
noop(spaceInfixOps);
|
|
282
|
-
|
|
283
|
-
// `space-unary-ops`.
|
|
284
|
-
let spaceUnaryOps1 = 1;
|
|
285
|
-
const spaceUnaryOps2 = ++spaceUnaryOps1;
|
|
286
|
-
|
|
287
|
-
noop(spaceUnaryOps2);
|
|
288
|
-
|
|
289
|
-
// `spaced-comment`.
|
|
290
|
-
// spaced comment.
|
|
291
|
-
|
|
292
|
-
// `sql-template/no-unsafe-query`.
|
|
293
|
-
const db = {
|
|
294
|
-
query: noop()
|
|
295
|
-
};
|
|
296
|
-
const foo = 'foo';
|
|
297
|
-
const sql = 'sql-tag';
|
|
298
|
-
|
|
299
|
-
db.query(sql`SELECT ${foo} FROM bar`);
|
|
300
|
-
db.query(`SELECT foo FROM bar`);
|
|
301
|
-
|
|
302
|
-
// `template-curly-spacing`.
|
|
303
|
-
const templateCurlySpacing = 'foo';
|
|
304
|
-
|
|
305
|
-
noop(`${templateCurlySpacing}`);
|
|
306
|
-
|
|
307
|
-
// `wrap-iife`.
|
|
308
|
-
(function() {
|
|
309
|
-
noop();
|
|
310
|
-
})();
|
|
311
|
-
|
|
312
|
-
// `yoda`.
|
|
313
|
-
let yoda = true;
|
|
314
|
-
|
|
315
|
-
if (yoda === true) {
|
|
316
|
-
yoda = false;
|
|
317
|
-
}
|
|
@@ -1,334 +0,0 @@
|
|
|
1
|
-
// Avoid extra `no-unused-vars` violations.
|
|
2
|
-
function noop() {
|
|
3
|
-
// do nothing
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
// `array-bracket-spacing`.
|
|
7
|
-
noop([ 'bar', 'foo']);
|
|
8
|
-
|
|
9
|
-
// `arrow-parens`
|
|
10
|
-
noop((foo) => noop(foo));
|
|
11
|
-
|
|
12
|
-
// `brace-style`.
|
|
13
|
-
try {
|
|
14
|
-
noop();
|
|
15
|
-
}
|
|
16
|
-
catch (e) {
|
|
17
|
-
noop();
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
// `comma-dangle`.
|
|
21
|
-
noop({ bar: 'foo', foo: 'bar', });
|
|
22
|
-
|
|
23
|
-
// `comma-spacing`.
|
|
24
|
-
noop(['bar','foo']);
|
|
25
|
-
|
|
26
|
-
// `comma-style`.
|
|
27
|
-
noop({
|
|
28
|
-
bar: 'foo'
|
|
29
|
-
, foo: 'bar'
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
// `consistent-this`.
|
|
33
|
-
const consistentThis = this;
|
|
34
|
-
|
|
35
|
-
noop(consistentThis);
|
|
36
|
-
|
|
37
|
-
// `curly`.
|
|
38
|
-
let curly = true;
|
|
39
|
-
|
|
40
|
-
if (curly)
|
|
41
|
-
curly = false;
|
|
42
|
-
|
|
43
|
-
// `dot-notation`.
|
|
44
|
-
const dotNotation = {};
|
|
45
|
-
|
|
46
|
-
dotNotation['foo'] = 'bar';
|
|
47
|
-
|
|
48
|
-
// `generator-star-spacing`
|
|
49
|
-
noop(function* () {});
|
|
50
|
-
noop(function* foo() {});
|
|
51
|
-
noop({ * foo() {} });
|
|
52
|
-
|
|
53
|
-
// `id-match`.
|
|
54
|
-
let id_match;
|
|
55
|
-
|
|
56
|
-
noop(id_match);
|
|
57
|
-
|
|
58
|
-
// `indent`.
|
|
59
|
-
noop({
|
|
60
|
-
bar: 'foo'
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
// `key-spacing`.
|
|
64
|
-
noop({ foo:'bar' });
|
|
65
|
-
|
|
66
|
-
// `keyword-spacing`.
|
|
67
|
-
let keywordSpacing = true;
|
|
68
|
-
|
|
69
|
-
if(keywordSpacing) {
|
|
70
|
-
keywordSpacing = false;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
// `mocha/no-exclusive-tests`.
|
|
74
|
-
describe.only('noExclusiveTests', () => {
|
|
75
|
-
it('should not work');
|
|
76
|
-
});
|
|
77
|
-
|
|
78
|
-
// `mocha/no-identical-title`.
|
|
79
|
-
describe('noIdenticalTitle', () => {
|
|
80
|
-
it('should not work');
|
|
81
|
-
it('should not work');
|
|
82
|
-
});
|
|
83
|
-
|
|
84
|
-
// `mocha/no-nested-tests`.
|
|
85
|
-
it('noNestedTests', () => {
|
|
86
|
-
it('should not work');
|
|
87
|
-
});
|
|
88
|
-
|
|
89
|
-
// `mocha/no-sibling-hooks`.
|
|
90
|
-
describe('noSiblingHooks', () => {
|
|
91
|
-
before(() => {});
|
|
92
|
-
before(() => {});
|
|
93
|
-
});
|
|
94
|
-
|
|
95
|
-
// `new-cap`.
|
|
96
|
-
const cap = require('cap');
|
|
97
|
-
|
|
98
|
-
new cap();
|
|
99
|
-
|
|
100
|
-
// `newline-after-var`.
|
|
101
|
-
const newLineAfterVar = 'foo';
|
|
102
|
-
noop(newLineAfterVar);
|
|
103
|
-
|
|
104
|
-
// `newline-before-return`.
|
|
105
|
-
function funcThatReturns(bar) {
|
|
106
|
-
if (!bar) {
|
|
107
|
-
return;
|
|
108
|
-
}
|
|
109
|
-
return bar;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
funcThatReturns('foo');
|
|
113
|
-
|
|
114
|
-
// `no-class-assign`.
|
|
115
|
-
class NoClassAssign { }
|
|
116
|
-
|
|
117
|
-
NoClassAssign = 'foobar';
|
|
118
|
-
|
|
119
|
-
noop(NoClassAssign);
|
|
120
|
-
|
|
121
|
-
// `no-const-assign`.
|
|
122
|
-
const noConstAssign = true;
|
|
123
|
-
|
|
124
|
-
noConstAssign = false;
|
|
125
|
-
|
|
126
|
-
noop(noConstAssign);
|
|
127
|
-
|
|
128
|
-
// `no-constant-condition`.
|
|
129
|
-
if (true) {
|
|
130
|
-
noop(true);
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
// `no-dupe-class-members`.
|
|
134
|
-
class NoDupeClassMembers {
|
|
135
|
-
foo() {
|
|
136
|
-
return 'bar';
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
foo() {
|
|
140
|
-
return 'foo';
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
noop(NoDupeClassMembers);
|
|
145
|
-
|
|
146
|
-
// `no-empty`.
|
|
147
|
-
try {
|
|
148
|
-
noop();
|
|
149
|
-
} catch (e) {}
|
|
150
|
-
|
|
151
|
-
// `no-labels`.
|
|
152
|
-
noLabels: {
|
|
153
|
-
break noLabels;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
// `no-multi-spaces`.
|
|
157
|
-
noop(['foo', 'bar']);
|
|
158
|
-
|
|
159
|
-
// `no-multi-str`.
|
|
160
|
-
const noMultiStr = 'Line 1 \
|
|
161
|
-
Line 2';
|
|
162
|
-
|
|
163
|
-
noop(noMultiStr);
|
|
164
|
-
|
|
165
|
-
// `no-multiple-empty-lines`.
|
|
166
|
-
const noMultipleEmptyLines = true;
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
noop(noMultipleEmptyLines);
|
|
170
|
-
|
|
171
|
-
// `no-spaced-func`.
|
|
172
|
-
noop ();
|
|
173
|
-
|
|
174
|
-
// `no-this-before-super`.
|
|
175
|
-
const NoThisBeforeSuper = require('no-this-before-super');
|
|
176
|
-
|
|
177
|
-
class Child extends NoThisBeforeSuper {
|
|
178
|
-
constructor() {
|
|
179
|
-
this.foo = 'bar';
|
|
180
|
-
super();
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
noop(Child);
|
|
185
|
-
|
|
186
|
-
// `no-underscore-dangle`.
|
|
187
|
-
class NoUnderscoreDangle {
|
|
188
|
-
constructor() {
|
|
189
|
-
this._foo();
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
noop(new NoUnderscoreDangle());
|
|
194
|
-
|
|
195
|
-
// `no-unused-vars`
|
|
196
|
-
const foobar = '';
|
|
197
|
-
|
|
198
|
-
// `object-curly-spacing`.
|
|
199
|
-
const objectCurlySpacing = {foo: 'bar'};
|
|
200
|
-
|
|
201
|
-
noop(objectCurlySpacing);
|
|
202
|
-
|
|
203
|
-
// `one-var`.
|
|
204
|
-
const oneVar1 = 'foo', oneVar2 = 'bar';
|
|
205
|
-
|
|
206
|
-
noop(oneVar1);
|
|
207
|
-
noop(oneVar2);
|
|
208
|
-
|
|
209
|
-
// `one-var-declaration-per-line`.
|
|
210
|
-
const oneVarDeclarationPerLine1 = 'foo'; const oneVarDeclarationPerLine2 = 'bar';
|
|
211
|
-
|
|
212
|
-
noop(oneVarDeclarationPerLine1);
|
|
213
|
-
noop(oneVarDeclarationPerLine2);
|
|
214
|
-
|
|
215
|
-
// `operator-linebreak`.
|
|
216
|
-
const operatorLineBreak = 1 +
|
|
217
|
-
2;
|
|
218
|
-
|
|
219
|
-
noop(operatorLineBreak);
|
|
220
|
-
|
|
221
|
-
// `padded-blocks`.
|
|
222
|
-
const paddedBlocks = true;
|
|
223
|
-
|
|
224
|
-
if (paddedBlocks) {
|
|
225
|
-
|
|
226
|
-
noop();
|
|
227
|
-
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
// `prefer-destructuring`.
|
|
231
|
-
const bar = {};
|
|
232
|
-
const biz = bar.biz;
|
|
233
|
-
const baz = biz[0];
|
|
234
|
-
|
|
235
|
-
noop(biz, baz);
|
|
236
|
-
|
|
237
|
-
// `quote-props`.
|
|
238
|
-
const quoteProps = {
|
|
239
|
-
'0': 0,
|
|
240
|
-
'foo': 0,
|
|
241
|
-
'foo-bar': 0,
|
|
242
|
-
'null': 0,
|
|
243
|
-
'true': 0
|
|
244
|
-
};
|
|
245
|
-
|
|
246
|
-
noop(quoteProps);
|
|
247
|
-
|
|
248
|
-
// `quotes`.
|
|
249
|
-
const quotes = "foo";
|
|
250
|
-
|
|
251
|
-
noop(quotes);
|
|
252
|
-
|
|
253
|
-
// `require-await`.
|
|
254
|
-
(async () => {})();
|
|
255
|
-
|
|
256
|
-
// `semi`.
|
|
257
|
-
noop()
|
|
258
|
-
|
|
259
|
-
// `semi-spacing`.
|
|
260
|
-
for (let semiSpacing = 0;semiSpacing < 10;++semiSpacing) {
|
|
261
|
-
noop();
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
// `sort-imports`.
|
|
265
|
-
import import1 from 'import-1';
|
|
266
|
-
import { import2 } from 'import-2';
|
|
267
|
-
|
|
268
|
-
noop(import1);
|
|
269
|
-
noop(import2);
|
|
270
|
-
|
|
271
|
-
// `sort-keys`.
|
|
272
|
-
const sortObjectProps = {
|
|
273
|
-
var1: 'foo',
|
|
274
|
-
var10: 'bar',
|
|
275
|
-
var9: 'biz'
|
|
276
|
-
};
|
|
277
|
-
|
|
278
|
-
noop(sortObjectProps);
|
|
279
|
-
|
|
280
|
-
// `space-before-blocks`.
|
|
281
|
-
let spaceBeforeBlocks = true;
|
|
282
|
-
|
|
283
|
-
if (spaceBeforeBlocks){
|
|
284
|
-
spaceBeforeBlocks = false;
|
|
285
|
-
} else {
|
|
286
|
-
spaceBeforeBlocks = true;
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
// `space-before-function-paren`.
|
|
290
|
-
(function () {
|
|
291
|
-
noop();
|
|
292
|
-
})();
|
|
293
|
-
|
|
294
|
-
// `space-in-parens`.
|
|
295
|
-
noop( 'foo' );
|
|
296
|
-
|
|
297
|
-
// `space-infix-ops`.
|
|
298
|
-
const spaceInfixOps = 1+2;
|
|
299
|
-
|
|
300
|
-
noop(spaceInfixOps);
|
|
301
|
-
|
|
302
|
-
// `space-unary-ops`.
|
|
303
|
-
let spaceUnaryOps1 = 1;
|
|
304
|
-
const spaceUnaryOps2 = ++ spaceUnaryOps1;
|
|
305
|
-
|
|
306
|
-
noop(spaceUnaryOps2);
|
|
307
|
-
|
|
308
|
-
// `spaced-comment`.
|
|
309
|
-
//Comment missing space.
|
|
310
|
-
|
|
311
|
-
// `sql-template/no-unsafe-query`.
|
|
312
|
-
const db = {
|
|
313
|
-
query: noop()
|
|
314
|
-
};
|
|
315
|
-
const foo = 'foo';
|
|
316
|
-
|
|
317
|
-
db.query(`SELECT ${foo} FROM bar`);
|
|
318
|
-
|
|
319
|
-
// `template-curly-spacing`.
|
|
320
|
-
const templateCurlySpacing = 'foo';
|
|
321
|
-
|
|
322
|
-
noop(`${ templateCurlySpacing }`);
|
|
323
|
-
|
|
324
|
-
// `wrap-iife`.
|
|
325
|
-
(function() {
|
|
326
|
-
noop();
|
|
327
|
-
}());
|
|
328
|
-
|
|
329
|
-
// `yoda`.
|
|
330
|
-
let yoda = true;
|
|
331
|
-
|
|
332
|
-
if (true === yoda) {
|
|
333
|
-
yoda = false;
|
|
334
|
-
}
|