| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent c41e402 commit dc14bd8
4 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -31,8 +31,6 @@ rules: | |||
| 31 | 31 | message: "Use an object as second argument of `assert.throws()`." | |
| 32 | 32 | - selector: "CallExpression:matches([callee.name='throws'], [callee.property.name='throws'])[arguments.length<2]" | |
| 33 | 33 | message: "`assert.throws()` must be invoked with at least two arguments." | |
| 34 | - - selector: "CallExpression[callee.name='setTimeout'][arguments.length<2]" | ||
| 35 | - message: "`setTimeout()` must be invoked with at least two arguments." | ||
| 36 | 34 | - selector: "CallExpression[callee.name='setInterval'][arguments.length<2]" | |
| 37 | 35 | message: "`setInterval()` must be invoked with at least two arguments." | |
| 38 | 36 | - selector: "ThrowStatement > CallExpression[callee.name=/Error$/]" | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -12,7 +12,6 @@ const assert = require('assert'); | |||
| 12 | 12 | { | |
| 13 | 13 | class Foo extends Duplex { | |
| 14 | 14 | async _destroy(err, cb) { | |
| 15 | - // eslint-disable-next-line no-restricted-syntax | ||
| 16 | 15 | await setTimeout(common.platformTimeout(1)); | |
| 17 | 16 | throw new Error('boom'); | |
| 18 | 17 | } | |
@@ -31,7 +30,6 @@ const assert = require('assert'); | |||
| 31 | 30 | { | |
| 32 | 31 | class Foo extends Duplex { | |
| 33 | 32 | async _destroy(err, cb) { | |
| 34 | - // eslint-disable-next-line no-restricted-syntax | ||
| 35 | 33 | await setTimeout(common.platformTimeout(1)); | |
| 36 | 34 | } | |
| 37 | 35 | } | |
@@ -46,7 +44,6 @@ const assert = require('assert'); | |||
| 46 | 44 | { | |
| 47 | 45 | class Foo extends Duplex { | |
| 48 | 46 | async _construct() { | |
| 49 | - // eslint-disable-next-line no-restricted-syntax | ||
| 50 | 47 | await setTimeout(common.platformTimeout(1)); | |
| 51 | 48 | } | |
| 52 | 49 | ||
@@ -64,7 +61,6 @@ const assert = require('assert'); | |||
| 64 | 61 | { | |
| 65 | 62 | class Foo extends Duplex { | |
| 66 | 63 | async _construct(callback) { | |
| 67 | - // eslint-disable-next-line no-restricted-syntax | ||
| 68 | 64 | await setTimeout(common.platformTimeout(1)); | |
| 69 | 65 | callback(); | |
| 70 | 66 | } | |
@@ -88,7 +84,6 @@ const assert = require('assert'); | |||
| 88 | 84 | }); | |
| 89 | 85 | ||
| 90 | 86 | async _final() { | |
| 91 | - // eslint-disable-next-line no-restricted-syntax | ||
| 92 | 87 | await setTimeout(common.platformTimeout(1)); | |
| 93 | 88 | } | |
| 94 | 89 | } | |
@@ -105,7 +100,6 @@ const assert = require('assert'); | |||
| 105 | 100 | }); | |
| 106 | 101 | ||
| 107 | 102 | async _final(callback) { | |
| 108 | - // eslint-disable-next-line no-restricted-syntax | ||
| 109 | 103 | await setTimeout(common.platformTimeout(1)); | |
| 110 | 104 | callback(); | |
| 111 | 105 | } | |
@@ -123,7 +117,6 @@ const assert = require('assert'); | |||
| 123 | 117 | }); | |
| 124 | 118 | ||
| 125 | 119 | async _final() { | |
| 126 | - // eslint-disable-next-line no-restricted-syntax | ||
| 127 | 120 | await setTimeout(common.platformTimeout(1)); | |
| 128 | 121 | throw new Error('boom'); | |
| 129 | 122 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -59,7 +59,6 @@ function oneTo5Async() { | |||
| 59 | 59 | ||
| 60 | 60 | { | |
| 61 | 61 | async function checkDestroyed(stream) { | |
| 62 | - // eslint-disable-next-line no-restricted-syntax | ||
| 63 | 62 | await setTimeout(); | |
| 64 | 63 | assert.strictEqual(stream.destroyed, true); | |
| 65 | 64 | } | |
@@ -109,7 +108,6 @@ function oneTo5Async() { | |||
| 109 | 108 | // Concurrency doesn't affect which value is found. | |
| 110 | 109 | const found = await Readable.from([1, 2]).find(async (val) => { | |
| 111 | 110 | if (val === 1) { | |
| 112 | - // eslint-disable-next-line no-restricted-syntax | ||
| 113 | 111 | await setTimeout(100); | |
| 114 | 112 | } | |
| 115 | 113 | return true; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -9,7 +9,6 @@ const { setTimeout } = require('timers/promises'); | |||
| 9 | 9 | { | |
| 10 | 10 | class Foo extends Duplex { | |
| 11 | 11 | async _final(callback) { | |
| 12 | - // eslint-disable-next-line no-restricted-syntax | ||
| 13 | 12 | await setTimeout(common.platformTimeout(1)); | |
| 14 | 13 | callback(); | |
| 15 | 14 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments