Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: ESLint: 9.0.0 ConfigError: Config "typescript-eslint/base": Key "plugins": Cannot redefine plugin "@typescript-eslint". #98

Closed
sysmat opened this issue Apr 16, 2024 · 1 comment
Labels
bug Something isn't working repro:needed

Comments

@sysmat
Copy link

sysmat commented Apr 16, 2024

Environment

Node version: 20.12.0
npm version: 10.5.1
Local ESLint version: 9.0.0
Global ESLint version:
Operating System: Win 11

What parser are you using?

@typescript-eslint/parser

What did you do?

Configuration
"@eslint/eslintrc": "^3.0.2",
    "@eslint/js": "^9.0.0",
    "@typescript-eslint/eslint-plugin": "^7.7.0",
    "eslint": "^9.0.0",
    "eslint-config-standard-with-typescript": "^43.0.1",
    "eslint-plugin-deprecation": "^2.0.0",
    "eslint-plugin-import": "^2.29.1",
    "eslint-plugin-jsdoc": "48.2.3",
    "eslint-plugin-n": "^17.2.1",
    "eslint-plugin-promise": "^6.1.1",
    "globals": "^15.0.0",
    "typescript": "^5.4.5",
    "typescript-eslint": "^7.7.0",
import globals from 'globals';
import tseslint from 'typescript-eslint';

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 [
  { languageOptions: { globals: globals.browser } },
  ...compat.extends('standard-with-typescript'),
  ...tseslint.configs.recommended,
];

What did you expect to happen?

to run linting check

What actually happened?

Oops! Something went wrong! :(

ESLint: 9.0.0

ConfigError: Config "typescript-eslint/base": Key "plugins": Cannot redefine plugin "@typescript-eslint".
    at rethrowConfigError (node_modules\@[email protected]\node_modules\@humanwhocodes\config-array\api.js:225:8)

### Link to Minimal Reproducible Example

private code

### Participation

- [X] I am willing to submit a pull request for this issue.

### Additional comments

_No response_
@sysmat sysmat added bug Something isn't working repro:needed labels Apr 16, 2024
@aladdin-add aladdin-add transferred this issue from eslint/eslint Apr 16, 2024
@aladdin-add
Copy link
Member

Duplicate of #97

@aladdin-add aladdin-add marked this as a duplicate of #97 Apr 16, 2024
@github-project-automation github-project-automation bot moved this from Needs Triage to Complete in Triage Apr 16, 2024
aladdin-add added a commit that referenced this issue Apr 16, 2024
The ts style guide typically depend on tseslint, so there's no need
to install it separately. Doing so might result in multiple versions
being installed, leading to errors.

fixes #97, #98
aladdin-add added a commit that referenced this issue Apr 16, 2024
The ts style guide typically depend on tseslint, so there's no need
to install it separately. Doing so might result in multiple versions
being installed, leading to errors.

fixes #97, #98
mdjermanovic pushed a commit that referenced this issue Apr 16, 2024
The ts style guide typically depend on tseslint, so there's no need
to install it separately. Doing so might result in multiple versions
being installed, leading to errors.

fixes #97, #98
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working repro:needed
Projects
Archived in project
Development

No branches or pull requests

2 participants