Commit dcada80
tools: remove conditional assignment in custom ESLint rule
These changes no-duplicate-require.js so that it doesn't use an
assignment in a conditional, which can be easy to misread as a
comparison rather than an assignment. It also means we change a do/while
(which we don't use much in our code) to the much more common while
construct.
PR-URL: #41325
Reviewed-By: Michaël Zasso <targos@protonmail.com>1 parent 3c8b25b commit dcada80Copy full SHA for dcada80
File tree
Expand file treeCollapse file tree
1 file changed
+10
-9
lines changedOpen diff view settings
Filter options
- tools/eslint-rules
Expand file treeCollapse file tree
1 file changed
+10
-9
lines changedOpen diff view settings
Collapse file
tools/eslint-rules/no-duplicate-requires.js
Copy file name to clipboardExpand all lines: tools/eslint-rules/no-duplicate-requires.js+10-9Lines changed: 10 additions & 9 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
10 | 10 | |
11 | 11 | |
12 | 12 | |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
13 | 17 | |
14 | 18 | |
15 | | - |
16 | | - |
17 | | - |
18 | | - |
19 | | - |
20 | | - |
21 | | - |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
22 | 23 | |
23 | | - |
24 | | - |
| 24 | + |
| 25 | + |
25 | 26 | |
26 | 27 | |
27 | 28 | |
|
0 commit comments