Skip to content

Commit a5144ed

Browse files
committed
fixup! tools: add eslint rule to only pass through 'test' to debuglog
Signed-off-by: Ruben Bridgewater <[email protected]>
1 parent 39e869d commit a5144ed

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/.eslintrc.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ rules:
3232
message: "`setTimeout()` must be invoked with at least two arguments."
3333
- selector: "CallExpression[callee.name='setInterval'][arguments.length<2]"
3434
message: "`setInterval()` must be invoked with at least two arguments."
35-
- selector: 'ThrowStatement > CallExpression[callee.name=/Error$/]'
35+
- selector: "ThrowStatement > CallExpression[callee.name=/Error$/]"
3636
message: "Use `new` keyword when throwing an `Error`."
3737
- selector: "CallExpression:matches([callee.name='notDeepStrictEqual'], [callee.property.name='notDeepStrictEqual'])[arguments.0.type='Literal']:not([arguments.1.type='Literal']):not([arguments.1.type='ObjectExpression']):not([arguments.1.type='ArrayExpression']):not([arguments.1.type='UnaryExpression'])"
3838
message: "The first argument should be the `actual`, not the `expected` value."
@@ -44,8 +44,8 @@ rules:
4444
message: "The first argument should be the `actual`, not the `expected` value."
4545
- selector: "CallExpression[callee.name='isNaN']"
4646
message: "Use Number.isNaN() instead of the global isNaN() function."
47-
- selector: "CallExpression:matches([callee.name='debuglog'], [callee.property.name='debuglog']):not([arguments.0.value='test'])"
48-
message: "Only use 'test' as debuglog value inside of the tests folder."
47+
- selector: "VariableDeclarator > CallExpression:matches([callee.name='debuglog'], [callee.property.name='debuglog']):not([arguments.0.value='test'])"
48+
message: "Use 'test' as debuglog value in tests."
4949

5050
# Custom rules in tools/eslint-rules
5151
node-core/prefer-assert-iferror: error

0 commit comments

Comments
 (0)