Commit dec5900
tools: add lint rule to enforce timer arguments
Add a custom ESLint rule to require that setTimeout() and setInterval()
get called with at least two arguments. This prevents omitting the
duration or interval.
PR-URL: #9472
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>1 parent 09f35a4 commit dec5900Copy full SHA for dec5900
File tree
Expand file treeCollapse file tree
2 files changed
+26
-0
lines changedOpen diff view settings
Filter options
- tools/eslint-rules
Expand file treeCollapse file tree
2 files changed
+26
-0
lines changedOpen diff view settings
Collapse file
+1Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
124 | 124 | |
125 | 125 | |
126 | 126 | |
| 127 | + |
127 | 128 | |
128 | 129 | |
129 | 130 | |
|
Collapse file
tools/eslint-rules/timer-arguments.js
Copy file name to clipboard+25Lines changed: 25 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
0 commit comments