-
Notifications
You must be signed in to change notification settings - Fork 29
Description
Describe the bug
A clear and concise description of what the bug is.
It appears that ESLint throws an error when the same plugin is defined multiple times. For microsoft/eslint-plugin-sdl, it's the react plugin:
eslint-plugin-sdl/config/react.js
Line 21 in 3196a29
| react: pluginReact |
ConfigError: Config (unnamed): Key "plugins": Cannot redefine plugin "react".
To Reproduce
Steps to reproduce the behavior:
Create an eslint config that uses eslint-plugin-react and microsoft/eslint-plugin-sdl that includes configs["react"], then run ESLint:
import microsoftSdl from "@microsoft/eslint-plugin-sdl";
import react from "eslint-plugin-react";
import tseslint from "typescript-eslint";
export default tseslint.config(
react.configs.flat.recommended,
microsoftSdl.configs.recommended
)Expected behavior
A clear and concise description of what you expected to happen.
ESLint doesn't throw when eslint-plugin-react and @microsoft/eslint-plugin-sdl used together.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: [e.g. iOS] MacOS Sequoia
- Browser [e.g. chrome, safari] N/A
- Version [e.g. 22] 1.1.0
Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
Additional context
Add any other context about the problem here.