Skip to content

TypeError: Cannot redefine plugin #135

@zwaittt

Description

@zwaittt

happens when migrate legacy eslintrc config with flat configs.

const { FlatCompat } = require("@eslint/eslintrc");
const antfu = require('@antfu/eslint-config').default;

const compat = new FlatCompat({});

module.exports = [
  ...compat.config({
    "extends": "next/core-web-vitals"
  }),
  ...antfu({
    typescript: true,
  }),
];
Oops! Something went wrong! :(

ESLint: 8.53.0

TypeError: Cannot redefine plugin "import".

both legacy and flat from @antfu/eslint-config contains eslint-plugin-import, but seems this was fixed in #91

Metadata

Metadata

Assignees

Labels

acceptedbugSomething isn't working

Type

No type

Projects

Status

Complete

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions