Commit 85fd7bb
tools: fix inspector-check reporting
Currently the inspector-check rule does not store the node when the
usage of a require('inspector') is done. This means that it is not
possible to disable this rule. For example, if you add the following to
a test that uses the inspector module:
//common.skipIfInspectorDisabled();
/* eslint-disable inspector-check */
This will not disable the check and there will still be a lint error
reported.
This commit stores the node where the require statement is done which
allows for the rule to also be disabled.
PR-URL: #16902
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>1 parent 5c8fb6a commit 85fd7bbCopy full SHA for 85fd7bb
File tree
Expand file treeCollapse file tree
1 file changed
+6
-4
lines changedOpen diff view settings
Filter options
- tools/eslint-rules
Expand file treeCollapse file tree
1 file changed
+6
-4
lines changedOpen diff view settings
Collapse file
tools/eslint-rules/inspector-check.js
Copy file name to clipboardExpand all lines: tools/eslint-rules/inspector-check.js+6-4Lines changed: 6 additions & 4 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
14 | 14 | |
15 | 15 | |
16 | 16 | |
17 | | - |
| 17 | + |
18 | 18 | |
19 | 19 | |
20 | 20 | |
21 | 21 | |
22 | | - |
| 22 | + |
23 | 23 | |
24 | 24 | |
25 | 25 | |
| ||
30 | 30 | |
31 | 31 | |
32 | 32 | |
33 | | - |
34 | | - |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
35 | 37 | |
36 | 38 | |
37 | 39 | |
|
0 commit comments