Skip to content

Commit 89e1892

Browse files
committed
Fix lint
1 parent 0bb189c commit 89e1892

5 files changed

+32
-33
lines changed

addon/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export default function setupDeprecationWorkflow(config) {
99
};
1010

1111
registerDeprecationHandler((message, options, next) =>
12-
handleDeprecationWorkflow(config, message, options, next)
12+
handleDeprecationWorkflow(config, message, options, next),
1313
);
1414

1515
registerDeprecationHandler(deprecationCollector);
@@ -87,7 +87,7 @@ export function handleDeprecationWorkflow(config, message, options, next) {
8787
console.warn('DEPRECATION: ' + message);
8888
if (count === LOG_LIMIT) {
8989
console.warn(
90-
'To avoid console overflow, this deprecation will not be logged any more in this run.'
90+
'To avoid console overflow, this deprecation will not be logged any more in this run.',
9191
);
9292
}
9393
}

tests/acceptance/flush-deprecations-test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ setupDeprecationWorkflow({
6161
{ handler: "silence", matchId: "test" },
6262
{ handler: "silence", matchId: "log-strict" }
6363
]
64-
});`
64+
});`,
6565
);
6666
});
6767
});

tests/unit/deprecation-collector-test.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ module('deprecationCollector', function (hooks) {
3737
until: 'forever',
3838
for: 'testing',
3939
},
40-
() => {}
40+
() => {},
4141
);
4242
deprecationCollector(
4343
'Second deprecation',
@@ -47,7 +47,7 @@ module('deprecationCollector', function (hooks) {
4747
until: 'forever',
4848
for: 'testing',
4949
},
50-
() => {}
50+
() => {},
5151
);
5252

5353
assert.deepEqual(self.deprecationWorkflow.deprecationLog.messages, {
@@ -71,7 +71,7 @@ module('deprecationCollector', function (hooks) {
7171
until: 'forever',
7272
for: 'testing',
7373
},
74-
next
74+
next,
7575
);
7676
});
7777

@@ -84,7 +84,7 @@ module('deprecationCollector', function (hooks) {
8484
until: 'forever',
8585
for: 'testing',
8686
},
87-
() => {}
87+
() => {},
8888
);
8989
deprecationCollector(
9090
'Second deprecation',
@@ -94,7 +94,7 @@ module('deprecationCollector', function (hooks) {
9494
until: 'forever',
9595
for: 'testing',
9696
},
97-
() => {}
97+
() => {},
9898
);
9999

100100
// do it again
@@ -106,7 +106,7 @@ module('deprecationCollector', function (hooks) {
106106
until: 'forever',
107107
for: 'testing',
108108
},
109-
() => {}
109+
() => {},
110110
);
111111
deprecationCollector(
112112
'Second deprecation',
@@ -116,7 +116,7 @@ module('deprecationCollector', function (hooks) {
116116
until: 'forever',
117117
for: 'testing',
118118
},
119-
() => {}
119+
() => {},
120120
);
121121

122122
assert.deepEqual(self.deprecationWorkflow.deprecationLog.messages, {

tests/unit/flush-deprecations-test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ setupDeprecationWorkflow({
4343
{ handler: "silence", matchId: "first" },
4444
{ handler: "silence", matchId: "second" }
4545
]
46-
});`
46+
});`,
4747
);
4848
});
4949
});

tests/unit/handle-deprecation-workflow-test.js

+21-22
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ module('handleDeprecationWorkflow', function (hooks) {
2828
});
2929

3030
test('specifying `throwOnUnhandled` as true raises', function (assert) {
31-
assert.expect(2);
32-
3331
const config = {
3432
throwOnUnhandled: true,
3533
workflow: [{ handler: 'silence', matchMessage: 'Sshhhhh!!' }],
@@ -46,11 +44,11 @@ module('handleDeprecationWorkflow', function (hooks) {
4644
id: 'foobar',
4745
for: 'testing',
4846
},
49-
() => {}
47+
() => {},
5048
);
5149
},
5250
/Foobarrrzzzz/,
53-
'setting raiseOnUnhandled throws for unknown workflows'
51+
'setting raiseOnUnhandled throws for unknown workflows',
5452
);
5553

5654
handleDeprecationWorkflow(
@@ -62,14 +60,12 @@ module('handleDeprecationWorkflow', function (hooks) {
6260
until: 'forever',
6361
for: 'testing',
6462
},
65-
() => {}
63+
() => {},
6664
);
6765
assert.ok(true, 'did not throw when silenced');
6866
});
6967

7068
test('specifying `throwOnUnhandled` as false does nothing', function (assert) {
71-
assert.expect(1);
72-
7369
const config = {
7470
throwOnUnhandled: false,
7571
};
@@ -83,7 +79,7 @@ module('handleDeprecationWorkflow', function (hooks) {
8379
until: 'forever',
8480
for: 'testing',
8581
},
86-
() => {}
82+
() => {},
8783
);
8884

8985
assert.ok(true, 'does not die when throwOnUnhandled is false');
@@ -103,6 +99,7 @@ module('handleDeprecationWorkflow', function (hooks) {
10399
assert.ok(true, 'Deprecation did not raise');
104100
});
105101

102+
// eslint-disable-next-line qunit/require-expect
106103
test('deprecation logs with string matcher', function (assert) {
107104
assert.expect(1);
108105

@@ -111,7 +108,7 @@ module('handleDeprecationWorkflow', function (hooks) {
111108
assert.strictEqual(
112109
passedMessage.indexOf('DEPRECATION: ' + message),
113110
0,
114-
'deprecation logs'
111+
'deprecation logs',
115112
);
116113
};
117114

@@ -128,7 +125,7 @@ module('handleDeprecationWorkflow', function (hooks) {
128125
id: 'interesting',
129126
for: 'testing',
130127
},
131-
() => {}
128+
() => {},
132129
);
133130
});
134131

@@ -147,7 +144,7 @@ module('handleDeprecationWorkflow', function (hooks) {
147144
until: 'forever',
148145
for: 'testing',
149146
},
150-
() => {}
147+
() => {},
151148
);
152149
}, 'deprecation throws');
153150
});
@@ -166,22 +163,23 @@ module('handleDeprecationWorkflow', function (hooks) {
166163
until: 'forever',
167164
for: 'testing',
168165
},
169-
() => {}
166+
() => {},
170167
);
171168

172169
assert.ok(true, 'Deprecation did not raise');
173170
});
174171

172+
// eslint-disable-next-line qunit/require-expect
175173
test('deprecation logs with regex matcher', function (assert) {
176174
assert.expect(1);
177175

178176
let message = 'Interesting';
179177

180178
console.warn = function (passedMessage) {
181-
assert.equal(
179+
assert.strictEqual(
182180
passedMessage,
183181
'DEPRECATION: ' + message,
184-
'deprecation logs'
182+
'deprecation logs',
185183
);
186184
};
187185

@@ -198,7 +196,7 @@ module('handleDeprecationWorkflow', function (hooks) {
198196
until: 'forever',
199197
for: 'testing',
200198
},
201-
() => {}
199+
() => {},
202200
);
203201
});
204202

@@ -217,7 +215,7 @@ module('handleDeprecationWorkflow', function (hooks) {
217215
until: 'forever',
218216
for: 'testing',
219217
},
220-
() => {}
218+
() => {},
221219
);
222220
}, 'deprecation throws');
223221
});
@@ -240,7 +238,7 @@ module('handleDeprecationWorkflow', function (hooks) {
240238
until: 'forever',
241239
for: 'testing',
242240
},
243-
() => {}
241+
() => {},
244242
);
245243
}, 'deprecation throws');
246244
});
@@ -259,22 +257,23 @@ module('handleDeprecationWorkflow', function (hooks) {
259257
until: '3.0.0',
260258
for: 'testing',
261259
},
262-
() => {}
260+
() => {},
263261
);
264262

265263
assert.ok(true, 'Deprecation did not raise');
266264
});
267265

266+
// eslint-disable-next-line qunit/require-expect
268267
test('deprecation logs with id matcher', function (assert) {
269268
assert.expect(1);
270269

271270
let message = 'Slightly interesting';
272271

273272
console.warn = function (passedMessage) {
274-
assert.equal(
273+
assert.strictEqual(
275274
passedMessage,
276275
'DEPRECATION: ' + message,
277-
'deprecation logs'
276+
'deprecation logs',
278277
);
279278
};
280279

@@ -291,7 +290,7 @@ module('handleDeprecationWorkflow', function (hooks) {
291290
until: '3.0.0',
292291
for: 'testing',
293292
},
294-
() => {}
293+
() => {},
295294
);
296295
});
297296

@@ -309,7 +308,7 @@ module('handleDeprecationWorkflow', function (hooks) {
309308
until: '3.0.0',
310309
for: 'testing',
311310
},
312-
() => {}
311+
() => {},
313312
);
314313
}, 'deprecation throws');
315314
});

0 commit comments

Comments
 (0)