diff --git a/Makefile b/Makefile index 9f6c76c61f7f2d..7197252332d484 100644 --- a/Makefile +++ b/Makefile @@ -1159,7 +1159,7 @@ lint-md: | tools/.mdlintstamp LINT_JS_TARGETS = .eslintrc.js benchmark doc lib test tools run-lint-js = tools/node_modules/eslint/bin/eslint.js --cache \ - --ext=.js,.mjs,.md $(LINT_JS_TARGETS) + --report-unused-disable-directives --ext=.js,.mjs,.md $(LINT_JS_TARGETS) run-lint-js-fix = $(run-lint-js) --fix .PHONY: lint-js-fix diff --git a/test/common/wpt.js b/test/common/wpt.js index 2a25a22af53710..de8dd0fc428e4e 100644 --- a/test/common/wpt.js +++ b/test/common/wpt.js @@ -1,4 +1,3 @@ -/* eslint-disable node-core/required-modules */ 'use strict'; const assert = require('assert'); diff --git a/test/js-native-api/test_general/testInstanceOf.js b/test/js-native-api/test_general/testInstanceOf.js index 562152caa6bd1f..fb5b6334948182 100644 --- a/test/js-native-api/test_general/testInstanceOf.js +++ b/test/js-native-api/test_general/testInstanceOf.js @@ -5,7 +5,6 @@ const common = require('../../common'); const assert = require('assert'); // Addon is referenced through the eval expression in testFile -// eslint-disable-next-line no-unused-vars const addon = require(`./build/${common.buildType}/test_general`); const path = require('path'); diff --git a/test/js-native-api/test_general/testNapiRun.js b/test/js-native-api/test_general/testNapiRun.js index e322d899ed1ca9..38bfa3a516a018 100644 --- a/test/js-native-api/test_general/testNapiRun.js +++ b/test/js-native-api/test_general/testNapiRun.js @@ -4,7 +4,6 @@ const common = require('../../common'); const assert = require('assert'); // `addon` is referenced through the eval expression in testFile -// eslint-disable-next-line no-unused-vars const addon = require(`./build/${common.buildType}/test_general`); const testCase = '(41.92 + 0.08);'; diff --git a/test/parallel/test-assert-deep.js b/test/parallel/test-assert-deep.js index ceb17bdf56364d..68b3ee5497db6a 100644 --- a/test/parallel/test-assert-deep.js +++ b/test/parallel/test-assert-deep.js @@ -42,7 +42,7 @@ function re(literals, ...values) { // That is why we discourage using deepEqual in our own tests. // Turn off no-restricted-properties because we are testing deepEqual! -/* eslint-disable no-restricted-properties, prefer-common-expectserror */ +/* eslint-disable no-restricted-properties */ const arr = new Uint8Array([120, 121, 122, 10]); const buf = Buffer.from(arr); diff --git a/test/parallel/test-assert.js b/test/parallel/test-assert.js index 9028d9ae30702e..db00ed2836327f 100644 --- a/test/parallel/test-assert.js +++ b/test/parallel/test-assert.js @@ -22,8 +22,6 @@ 'use strict'; -/* eslint-disable node-core/prefer-common-expectserror */ - const common = require('../common'); const assert = require('assert'); const { inspect } = require('util'); @@ -664,7 +662,6 @@ common.expectsError( const tmp = fs.close; fs.close = common.mustCall(tmp, 1); function throwErr() { - // eslint-disable-next-line prefer-assert-methods assert( (Buffer.from('test') instanceof Error) ); diff --git a/test/parallel/test-require-extensions-same-filename-as-dir-trailing-slash.js b/test/parallel/test-require-extensions-same-filename-as-dir-trailing-slash.js index f79f07a45d9de4..2461ece8604257 100644 --- a/test/parallel/test-require-extensions-same-filename-as-dir-trailing-slash.js +++ b/test/parallel/test-require-extensions-same-filename-as-dir-trailing-slash.js @@ -19,7 +19,6 @@ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. -/* eslint-disable max-len */ 'use strict'; require('../common'); const assert = require('assert'); diff --git a/vcbuild.bat b/vcbuild.bat index a63b2dfb33c825..215d0f44543bc1 100644 --- a/vcbuild.bat +++ b/vcbuild.bat @@ -632,7 +632,7 @@ if defined lint_js_ci goto lint-js-ci if not defined lint_js goto lint-md-build if not exist tools\node_modules\eslint goto no-lint echo running lint-js -%config%\node tools\node_modules\eslint\bin\eslint.js --cache --rule "linebreak-style: 0" --ext=.js,.mjs,.md .eslintrc.js benchmark doc lib test tools +%config%\node tools\node_modules\eslint\bin\eslint.js --cache --report-unused-disable-directives --rule "linebreak-style: 0" --ext=.js,.mjs,.md .eslintrc.js benchmark doc lib test tools goto lint-md-build :lint-js-ci