43081j / 43081j/eslint-plugin-lit

Type export change after 2.x.x update causes different import behavior

未关闭
#228 7 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
TypeScript
星标
138
派生
26
平均合并
23 小时 29 分钟
30 天内合并 PR
4

描述

Hi!
First of all, thank you for your work on such an amazing plugin.

After updating the package from **1.14.0** to a **2.x.x** version, I noticed that the type definitions in the library have changed slightly, which now requires importing the package differently.

Image

Image

This happens because the current `export default` is just `ESLint.Plugin`, where configs is simply an indexed record. This differs from how other ESLint plugins usually handle their exports.

Image

Image

What do you think – would it be possible to restore the previous behavior?

P.S. The same issue occurs with `eslint-plugin-wc`, since (as far as I know) you’re the author of both 🙂

贡献指南

这个仓库没有索引到贡献指南

调研方向

查看插件源代码中的 TypeScript 类型定义,可能位于 index.d.ts 或 main .ts 文件中。比较 1.x 和 2.x 之间的导出结构。理解 ESLint.Plugin 目前如何导出,以及与预期 configs record 的区别。检查 eslint-plugin-wc 是否具有相同的代码模式。修复涉及将导出调整为符合预期形状,然后在测试项目中验证 import 是否可用。

由索引模型根据 Issue 内容生成。

评估

领域
devtools, tooling
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。