Skip to content

Commit 6285fe9

Browse files
Trotttargos
authored andcommitted
tools: do not disable quotes rule in .eslintrc.js
Re-enable `quotes` rule in .eslintrc.js and fix code to abide by the rule. As a bonus, this makes the code (IMO, anyway) more readable. (It certainly isn't *less* readable, at least not IMO.) PR-URL: #21338 Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Weijia Wang <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
1 parent 318d683 commit 6285fe9

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

.eslintrc.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -147,32 +147,32 @@ module.exports = {
147147
message: '__defineSetter__ is deprecated.',
148148
}
149149
],
150-
/* eslint-disable max-len, quotes */
150+
/* eslint-disable max-len */
151151
// If this list is modified, please copy the change to lib/.eslintrc.yaml
152152
'no-restricted-syntax': [
153153
'error',
154154
{
155155
selector: "CallExpression[callee.object.name='assert'][callee.property.name='doesNotThrow']",
156-
message: "Please replace `assert.doesNotThrow()` and add a comment next to the code instead."
156+
message: 'Please replace `assert.doesNotThrow()` and add a comment next to the code instead.'
157157
},
158158
{
159-
selector: `CallExpression[callee.object.name='assert'][callee.property.name='rejects'][arguments.length<2]`,
159+
selector: "CallExpression[callee.object.name='assert'][callee.property.name='rejects'][arguments.length<2]",
160160
message: 'assert.rejects() must be invoked with at least two arguments.',
161161
},
162162
{
163-
selector: `CallExpression[callee.object.name='assert'][callee.property.name='throws'][arguments.1.type='Literal']:not([arguments.1.regex])`,
163+
selector: "CallExpression[callee.object.name='assert'][callee.property.name='throws'][arguments.1.type='Literal']:not([arguments.1.regex])",
164164
message: 'Use an object as second argument of assert.throws()',
165165
},
166166
{
167-
selector: `CallExpression[callee.object.name='assert'][callee.property.name='throws'][arguments.length<2]`,
167+
selector: "CallExpression[callee.object.name='assert'][callee.property.name='throws'][arguments.length<2]",
168168
message: 'assert.throws() must be invoked with at least two arguments.',
169169
},
170170
{
171-
selector: `CallExpression[callee.name='setTimeout'][arguments.length<2]`,
171+
selector: "CallExpression[callee.name='setTimeout'][arguments.length<2]",
172172
message: 'setTimeout() must be invoked with at least two arguments.',
173173
},
174174
{
175-
selector: `CallExpression[callee.name='setInterval'][arguments.length<2]`,
175+
selector: "CallExpression[callee.name='setInterval'][arguments.length<2]",
176176
message: 'setInterval() must be invoked with at least 2 arguments.',
177177
},
178178
{

0 commit comments

Comments
 (0)