From 7664bf801995c4a6a15d600b4542d47075fc6194 Mon Sep 17 00:00:00 2001 From: Milos Djermanovic Date: Mon, 22 Jul 2024 17:25:14 +0200 Subject: [PATCH] feat: `eslint-plugin-react` supports ESLint v9 (#91) --- packages/migrate-config/src/compat-plugins.js | 1 - .../tests/fixtures/import-duplicate/.eslintrc.cjs | 2 +- .../tests/fixtures/import-duplicate/expected.cjs | 4 ++-- .../tests/fixtures/import-duplicate/expected.mjs | 4 ++-- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/packages/migrate-config/src/compat-plugins.js b/packages/migrate-config/src/compat-plugins.js index b188198..d9ef253 100644 --- a/packages/migrate-config/src/compat-plugins.js +++ b/packages/migrate-config/src/compat-plugins.js @@ -6,6 +6,5 @@ export default [ "eslint-plugin-ava", "eslint-plugin-react-hooks", - "eslint-plugin-react", "eslint-plugin-import", ]; diff --git a/packages/migrate-config/tests/fixtures/import-duplicate/.eslintrc.cjs b/packages/migrate-config/tests/fixtures/import-duplicate/.eslintrc.cjs index b5b0c13..6bfce2b 100644 --- a/packages/migrate-config/tests/fixtures/import-duplicate/.eslintrc.cjs +++ b/packages/migrate-config/tests/fixtures/import-duplicate/.eslintrc.cjs @@ -1,5 +1,5 @@ module.exports = { - plugins: ["react"], + plugins: ["import"], overrides: [ { plugins: ["react-hooks"], diff --git a/packages/migrate-config/tests/fixtures/import-duplicate/expected.cjs b/packages/migrate-config/tests/fixtures/import-duplicate/expected.cjs index 2d52f46..f838cef 100644 --- a/packages/migrate-config/tests/fixtures/import-duplicate/expected.cjs +++ b/packages/migrate-config/tests/fixtures/import-duplicate/expected.cjs @@ -1,4 +1,4 @@ -const react = require("eslint-plugin-react"); +const _import = require("eslint-plugin-import"); const { fixupPluginRules, @@ -8,7 +8,7 @@ const reactHooks = require("eslint-plugin-react-hooks"); module.exports = [{ plugins: { - react: fixupPluginRules(react), + import: fixupPluginRules(_import), }, }, { plugins: { diff --git a/packages/migrate-config/tests/fixtures/import-duplicate/expected.mjs b/packages/migrate-config/tests/fixtures/import-duplicate/expected.mjs index 4819412..4c962df 100644 --- a/packages/migrate-config/tests/fixtures/import-duplicate/expected.mjs +++ b/packages/migrate-config/tests/fixtures/import-duplicate/expected.mjs @@ -1,10 +1,10 @@ -import react from "eslint-plugin-react"; +import _import from "eslint-plugin-import"; import { fixupPluginRules } from "@eslint/compat"; import reactHooks from "eslint-plugin-react-hooks"; export default [{ plugins: { - react: fixupPluginRules(react), + import: fixupPluginRules(_import), }, }, { plugins: {