AlloyTeam / eslint-config-alloy

Progressive ESLint config for your React/Vue/TypeScript projects
https://alloyteam.github.io/eslint-config-alloy/
2.65k stars 317 forks source link

4.6.1 版本 TypeScript 下的 [no-duplicate-imports] 规则问题 #227

Closed GoodbyeNJN closed 2 years ago

GoodbyeNJN commented 2 years ago

示例代码:

import webpack from "webpack";
import type { Configuration } from "webpack"; // 4.6.1 版本下会有 no-duplicate-imports 报错

查到是这次改动引入的问题: https://github.com/AlloyTeam/eslint-config-alloy/commit/0cfc621cd8185ed47a57e526ff5c8299a0151e5b#diff-7143e2c180e0770e8d09db390b477b6988574907696c3d3762b1afc6525059e0L200

@typescript-eslint/no-duplicate-imports 已标记为弃用,官方推荐使用 import/no-duplicates,但需要额外增加 eslint-plugin-import 依赖

后续是否考虑修复?

xcatliu commented 2 years ago

Fixed in 4.6.1

xcatliu commented 2 years ago

已关闭 no-duplicate-imports 暂不开启 import/no-duplicates,下个大版本添加 import 插件