From 04d261cd98632c8585dfa84b3da5e498c089b701 Mon Sep 17 00:00:00 2001 From: nameless-mc Date: Tue, 22 Oct 2024 17:16:14 +0900 Subject: [PATCH] chore: fix plugin-packer eslint config --- packages/plugin-packer/bin/.eslintrc.js | 4 ---- packages/plugin-packer/eslint.config.mjs | 9 +++++++++ packages/plugin-packer/site/.eslintrc.js | 8 -------- packages/plugin-packer/test/.eslintrc.js | 5 ----- 4 files changed, 9 insertions(+), 17 deletions(-) delete mode 100644 packages/plugin-packer/bin/.eslintrc.js delete mode 100644 packages/plugin-packer/site/.eslintrc.js delete mode 100644 packages/plugin-packer/test/.eslintrc.js diff --git a/packages/plugin-packer/bin/.eslintrc.js b/packages/plugin-packer/bin/.eslintrc.js deleted file mode 100644 index 674a76fe58..0000000000 --- a/packages/plugin-packer/bin/.eslintrc.js +++ /dev/null @@ -1,4 +0,0 @@ -module.exports = { - root: true, - extends: "@cybozu/eslint-config/presets/node-prettier", -}; diff --git a/packages/plugin-packer/eslint.config.mjs b/packages/plugin-packer/eslint.config.mjs index eb9d1761a1..549eef4356 100644 --- a/packages/plugin-packer/eslint.config.mjs +++ b/packages/plugin-packer/eslint.config.mjs @@ -1,6 +1,7 @@ import rootConfig from "../../eslint.config.mjs"; import siteConfig from "./site/eslint.config.mjs"; import binConfig from "./bin/eslint.config.mjs"; +import globals from "globals"; /** @type {import("eslint").Linter.Config[]} */ export default [ @@ -16,4 +17,12 @@ export default [ ignores: ["site/*", "bin/*"], ...configObject, })), + { + files: ["test/**/*.{js,ts}"], + languageOptions: { + globals: { + ...globals.jest, + }, + }, + }, ]; diff --git a/packages/plugin-packer/site/.eslintrc.js b/packages/plugin-packer/site/.eslintrc.js deleted file mode 100644 index 78962aa23f..0000000000 --- a/packages/plugin-packer/site/.eslintrc.js +++ /dev/null @@ -1,8 +0,0 @@ -module.exports = { - root: true, - extends: "@cybozu/eslint-config/presets/prettier", - env: { - jest: true, - node: true, - }, -}; diff --git a/packages/plugin-packer/test/.eslintrc.js b/packages/plugin-packer/test/.eslintrc.js deleted file mode 100644 index 6052da089b..0000000000 --- a/packages/plugin-packer/test/.eslintrc.js +++ /dev/null @@ -1,5 +0,0 @@ -module.exports = { - env: { - jest: true, - }, -};