Encountering an issue while trying to upgrade eslint
to version 9.0.0
.
⋊> ~/A/fusion on turborepo ⨯ bun lint 22:21:58
$ eslint packages/*/src/**/*
Oops! Something went wrong! :(
ESLint: 9.0.0
ConfigError: Config (unnamed): Key "plugins": Cannot redefine plugin "@typescript-eslint".
at rethrowConfigError (/Users/aleksandrkireev/Apps/fusion/node_modules/@humanwhocodes/config-array/api.js:225:8)
at /Users/aleksandrkireev/Apps/fusion/node_modules/@humanwhocodes/config-array/api.js:1018:5
at Array.reduce (<anonymous>)
at FlatConfigArray.getConfig (/Users/aleksandrkireev/Apps/fusion/node_modules/@humanwhocodes/config-array/api.js:1014:39)
at FlatConfigArray.isFileIgnored (/Users/aleksandrkireev/Apps/fusion/node_modules/@humanwhocodes/config-array/api.js:1046:15)
at /Users/aleksandrkireev/Apps/fusion/node_modules/eslint/lib/eslint/eslint-helpers.js:514:38
at Array.forEach (<anonymous>)
at findFiles (/Users/aleksandrkireev/Apps/fusion/node_modules/eslint/lib/eslint/eslint-helpers.js:503:11)
at async ESLint.lintFiles (/Users/aleksandrkireev/Apps/fusion/node_modules/eslint/lib/eslint/eslint.js:846:27)
at async Object.execute (/Users/aleksandrkireev/Apps/fusion/node_modules/eslint/lib/cli.js:461:23)
⋊> ~/A/fusion on turborepo ⨯
I'm not utilizing the @humanwhocodes
package, but it appears that another package is using it.
Dependencies:
"dependencies": { "alor-api": "1.0.47", "axios": "1.6.8", "cache-manager": "5.5.1", "core-js": "3.36.1", "create-hmac": "1.1.7", "crypto-hash": "3.0.0", "date-fns": "^2.28.0", "eslint-plugin-react-hooks": "4.6.0", "moment": "2.30.1", "msgpack5": "6.0.2", "node-cron": "3.0.3", "node-fetch": "3.3.2", "node-yaml-config": "1.0.0", "react": "18.2.0", "react-dom": "18.2.0", "react-error-overlay": "6.0.11", "reflect-metadata": "0.2.2", "regenerator-runtime": "0.14.1", "request": "2.88.2", "swr": "2.2.5", "tslib": "2.6.2", "winston": "^3.8.2", "winston-daily-rotate-file": "^4.7.1", "winston-loki": "^6.0.6", "winston-telegram": "^2.6.0" }, "devDependencies": { ... <p><code>eslint.config.js
:import globals from "globals"; import tseslint from "typescript-eslint"; import pluginReactConfig from "eslint-plugin-react/configs/recommended.js"; import path from "path"; import { fileURLToPath } from "url"; import { FlatCompat } from "@eslint/eslintrc"; import pluginJs from "@eslint/js"; // mimic CommonJS variables -- not needed if using CommonJS const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); const compat = new FlatCompat({baseDirectory: __dirname, recommendedConfig: pluginJs.configs.recommended}); export default [ ... ];