From e05756f9f623d6ad84394f731d3876132ba8e28a Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Tue, 4 Mar 2025 22:18:50 +0100 Subject: [PATCH] tools: revert to use @stylistic/eslint-plugin-js v3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @stylistic/eslint-plugin-js v4 has been updated to ship ESM-only, which needs require(esm) support due to the monkey-patching we do in our eslint.config.mjs. The node-test-linter job in Jenkins still runs Node.js v20 which has not yet released unflagging of require(esm). Revert to use v3 for now until we upgrade the Node.js version used in the CI. PR-URL: https://github.com/nodejs/node/pull/57314 Refs: https://github.com/nodejs/node/pull/57261 Reviewed-By: Richard Lau Reviewed-By: Luigi Pinca Reviewed-By: Marco Ippolito Reviewed-By: Yagiz Nizipli Reviewed-By: James M Snell Reviewed-By: Juan José Arboleda --- tools/eslint/package-lock.json | 10 +++++----- tools/eslint/package.json | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/eslint/package-lock.json b/tools/eslint/package-lock.json index 892b93d11b5c64..39a4d4f06d0b5a 100644 --- a/tools/eslint/package-lock.json +++ b/tools/eslint/package-lock.json @@ -12,7 +12,7 @@ "@babel/eslint-parser": "^7.26.8", "@babel/plugin-syntax-import-attributes": "^7.26.0", "@babel/plugin-syntax-import-source": "^7.25.9", - "@stylistic/eslint-plugin-js": "^4.1.0", + "@stylistic/eslint-plugin-js": "^3.0.1", "eslint": "^9.21.0", "eslint-formatter-tap": "^8.40.0", "eslint-plugin-jsdoc": "^50.6.3", @@ -574,9 +574,9 @@ } }, "node_modules/@stylistic/eslint-plugin-js": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin-js/-/eslint-plugin-js-4.1.0.tgz", - "integrity": "sha512-YOe+dChNoR26JVVt+7BjyebsPIQF05OLNmHCXivq8lLZ4ZeVs4+wXaW+pREVboDiAaSRznauAdAU8f+iQouw6Q==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin-js/-/eslint-plugin-js-3.1.0.tgz", + "integrity": "sha512-lQktsOiCr8S6StG29C5fzXYxLOD6ID1rp4j6TRS+E/qY1xd59Fm7dy5qm9UauJIEoSTlYx6yGsCHYh5UkgXPyg==", "license": "MIT", "dependencies": { "eslint-visitor-keys": "^4.2.0", @@ -586,7 +586,7 @@ "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "peerDependencies": { - "eslint": ">=9.0.0" + "eslint": ">=8.40.0" } }, "node_modules/@stylistic/eslint-plugin-js/node_modules/eslint-visitor-keys": { diff --git a/tools/eslint/package.json b/tools/eslint/package.json index 21d8c3493c4b0e..86021edb12f5d5 100644 --- a/tools/eslint/package.json +++ b/tools/eslint/package.json @@ -7,7 +7,7 @@ "@babel/eslint-parser": "^7.26.8", "@babel/plugin-syntax-import-attributes": "^7.26.0", "@babel/plugin-syntax-import-source": "^7.25.9", - "@stylistic/eslint-plugin-js": "^4.1.0", + "@stylistic/eslint-plugin-js": "^3.0.1", "eslint": "^9.21.0", "eslint-formatter-tap": "^8.40.0", "eslint-plugin-jsdoc": "^50.6.3",