43081j / 43081j/eslint-plugin-wc
Rule proposal: no-unused-scoped-elements
未关闭
- 主要语言
- TypeScript
- 星标
- 113
- 派生
- 19
- 平均合并
- 3 小时 14 分钟
- 30 天内合并 PR
- 2
描述
eslint-plugin-wc could use a rule that reports entries in static scopedElements that are declared but never used in the component’s templates or class method bodies.
Unused scoped element mappings tend to accumulate during refactors and leave registries noisy or misleading. This rule would help keep scoped registries accurate and maintainable by flagging stale tag mappings early.
贡献指南
这个仓库没有索引到贡献指南
调研方向
查看 plugin 中现有的规则,以了解 scopedElements 的 AST 结构。首先检查静态 scopedElements 如何在类中定义,以及如何跟踪模板中的使用情况。该规则需要遍历组件类,收集已声明的 scoped element 名称,并检查它们在模板和方法体中的引用。在测试套件中编写一个测试,以验证该规则会标记未使用的条目。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript
- 领域
- devtools, tooling
- Issue 类型
- 功能
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 活跃
- 描述清晰度
- 基本清楚
- 新手友好度
- 65/100