From eb11b5b35a6a797dc7fba6df53b1c4dada3a2a55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=94=AF=E7=84=B6?= Date: Wed, 17 Apr 2024 17:40:32 +0800 Subject: [PATCH] chore: upgrade globals v15 (#241) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: failing tests Signed-off-by: 唯然 * Update eslint-rule-tester.js --------- Signed-off-by: 唯然 --- package.json | 2 +- tests/eslint-rule-tester.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 250ccd5f..908b3957 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "enhanced-resolve": "^5.15.0", "eslint-plugin-es-x": "^7.5.0", "get-tsconfig": "^4.7.0", - "globals": "^14.0.0", + "globals": "^15.0.0", "ignore": "^5.2.4", "minimatch": "^9.0.0", "semver": "^7.5.3" diff --git a/tests/eslint-rule-tester.js b/tests/eslint-rule-tester.js index e4379ba1..28a4e95f 100644 --- a/tests/eslint-rule-tester.js +++ b/tests/eslint-rule-tester.js @@ -23,7 +23,9 @@ const defaultConfig = { languageOptions: { ecmaVersion: 6, sourceType: "commonjs", - globals: globals.node, + // TODO: remove global.es2105 when dropping eslint v8 -- it has been fixed in eslint v9 + // see: https://github.com/eslint/eslint/commit/0db676f9c64d2622ada86b653136d2bda4f0eee0 + globals: { ...globals.es2015, ...globals.node }, }, } exports.RuleTester = function (config = defaultConfig) {