GeezerVison is showing github.com — test: enable no-empty ESLint rule · nodejs/node@c8e59cb
File treeExpand file treeCollapse file tree Open diff view settings Some content is hiddenLarge Commits have some content hidden by default. Use the searchbox below for content that may be hidden. Dismiss bannerExpand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: test/.eslintrc.yaml +2-1Lines changed: 2 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 5 | 5 | es6: true | 6 | 6 |
| 7 | 7 | rules: | | 8 | + multiline-comment-style: ["error", "separate-lines"] | | 9 | + no-empty: error | 8 | 10 | no-var: error | 9 | 11 | prefer-const: error | 10 | 12 | symbol-description: off | 11 | | - multiline-comment-style: ["error", "separate-lines"] | 12 | 13 |
| 13 | 14 | no-restricted-syntax: | 14 | 15 | # Config copied from .eslintrc.js | |
Collapse file Copy file name to clipboardExpand all lines: test/addons/uv-handle-leak/test.js +3-1Lines changed: 3 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 16 | 16 | const { isMainThread } = require('worker_threads'); | 17 | 17 | if (!isMainThread) | 18 | 18 | common.skip('Cannot run test in environment with clean-exit policy'); | 19 | | -} catch {} | | 19 | +} catch { | | 20 | + // Continue regardless of error. | | 21 | +} | 20 | 22 |
| 21 | 23 | binding.leakHandle(); | 22 | 24 | binding.leakHandle(0); | |
Collapse file Copy file name to clipboardExpand all lines: test/common/inspector-helper.js +1-2Lines changed: 1 addition & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -365,8 +365,7 @@ class NodeInstance extends EventEmitter { | 365 | 365 | ['--expose-internals'], | 366 | 366 | `${scriptContents}\nprocess._rawDebug('started');`, undefined); | 367 | 367 | const msg = 'Timed out waiting for process to start'; | 368 | | - while (await fires(instance.nextStderrString(), msg, TIMEOUT) !== | 369 | | - 'started') {} | | 368 | + while (await fires(instance.nextStderrString(), msg, TIMEOUT) !== 'started'); | 370 | 369 | process._debugProcess(instance._process.pid); | 371 | 370 | return instance; | 372 | 371 | } | |
Collapse file Copy file name to clipboardExpand all lines: test/common/report.js +3-1Lines changed: 3 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -46,7 +46,9 @@ function validateContent(report, fields = []) { | 46 | 46 | } catch (err) { | 47 | 47 | try { | 48 | 48 | err.stack += util.format('\n------\nFailing Report:\n%O', report); | 49 | | - } catch {} | | 49 | + } catch { | | 50 | + // Continue regardless of error. | | 51 | + } | 50 | 52 | throw err; | 51 | 53 | } | 52 | 54 | } | |
Collapse file Copy file name to clipboardExpand all lines: test/internet/test-dgram-broadcast-multi-process.js +3-1Lines changed: 3 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -184,7 +184,9 @@ if (process.argv[2] !== 'child') { | 184 | 184 | const buf = messages[i++]; | 185 | 185 |
| 186 | 186 | if (!buf) { | 187 | | - try { sendSocket.close(); } catch {} | | 187 | + try { sendSocket.close(); } catch { | | 188 | + // Continue regardless of error. | | 189 | + } | 188 | 190 | return; | 189 | 191 | } | 190 | 192 |
| |
Collapse file Copy file name to clipboardExpand all lines: test/internet/test-dgram-multicast-multi-process.js +3-1Lines changed: 3 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -170,7 +170,9 @@ if (process.argv[2] !== 'child') { | 170 | 170 | const buf = messages[i++]; | 171 | 171 |
| 172 | 172 | if (!buf) { | 173 | | - try { sendSocket.close(); } catch {} | | 173 | + try { sendSocket.close(); } catch { | | 174 | + // Continue regardless of error. | | 175 | + } | 174 | 176 | return; | 175 | 177 | } | 176 | 178 |
| |
Collapse file Copy file name to clipboardExpand all lines: test/internet/test-dgram-multicast-ssm-multi-process.js +3-1Lines changed: 3 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -164,7 +164,9 @@ if (process.argv[2] !== 'child') { | 164 | 164 | const buf = messages[i++]; | 165 | 165 |
| 166 | 166 | if (!buf) { | 167 | | - try { sendSocket.close(); } catch {} | | 167 | + try { sendSocket.close(); } catch { | | 168 | + // Continue regardless of error. | | 169 | + } | 168 | 170 | return; | 169 | 171 | } | 170 | 172 |
| |
Collapse file Copy file name to clipboardExpand all lines: test/internet/test-dgram-multicast-ssmv6-multi-process.js +3-1Lines changed: 3 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -164,7 +164,9 @@ if (process.argv[2] !== 'child') { | 164 | 164 | const buf = messages[i++]; | 165 | 165 |
| 166 | 166 | if (!buf) { | 167 | | - try { sendSocket.close(); } catch {} | | 167 | + try { sendSocket.close(); } catch { | | 168 | + // Continue regardless of error. | | 169 | + } | 168 | 170 | return; | 169 | 171 | } | 170 | 172 |
| |
Collapse file Copy file name to clipboardExpand all lines: test/message/vm_dont_display_runtime_error.js +3-1Lines changed: 3 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 30 | 30 | filename: 'test.vm', | 31 | 31 | displayErrors: false | 32 | 32 | }); | 33 | | -} catch {} | | 33 | +} catch { | | 34 | + // Continue regardless of error. | | 35 | +} | 34 | 36 |
| 35 | 37 | console.error('middle'); | 36 | 38 |
| |
Collapse file Copy file name to clipboardExpand all lines: test/message/vm_dont_display_syntax_error.js +3-1Lines changed: 3 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 30 | 30 | filename: 'test.vm', | 31 | 31 | displayErrors: false | 32 | 32 | }); | 33 | | -} catch {} | | 33 | +} catch { | | 34 | + // Continue regardless of error. | | 35 | +} | 34 | 36 |
| 35 | 37 | console.error('middle'); | 36 | 38 |
| |
|