Adopt ESLint for frontend static analysis
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 43/100
- Issue 类型
- 功能
- 描述清晰度
- 描述清楚
- 活跃度
- 停滞
- 技术栈
- eslint, github-actions, react, tauri, typescript
调研方向
Start by reading the current frontend scripts and CLAUDE.md, then inspect .github/workflows/ci.yml and CONTRIBUTING.md to see how checks are run and documented. Add the flat ESLint setup and npm run lint described in the issue, then run it on main and address violations without undocumented suppressions. Done means lint passes locally and CI runs it on every PR.
由索引模型根据 Issue 内容生成。
描述
Context
Today the only frontend static-analysis gate is npx tsc --noEmit (per CLAUDE.md). CodeRabbit also flags this on every PR ("ESLint skipped: no ESLint configuration detected").
tsc catches type errors but misses real classes of bugs in a React + Tauri codebase:
- React Hooks violations — missing
useEffectdeps, conditional hooks, stale closures.eslint-plugin-react-hooks'sexhaustive-depsis the highest-value rule here and catches actual runtime bugstsccannot see. - Floating promises — easy to miss in a Tauri app where every IPC call is async.
@typescript-eslint/no-floating-promisescatches them. - Contributor PR floor — raises baseline quality without manual nitpicking in review.
Proposal
Minimal flat-config ESLint setup, additive to existing CI.
Scope:
eslint.config.js(flat config)- Presets:
@eslint/jsrecommended,typescript-eslintrecommended (notrecommended-type-checked— too noisy on first run),eslint-plugin-react-hooks,eslint-plugin-react-refresh - New script:
npm run lint - Wire into
.github/workflows/ci.ymlalongsidetsc --noEmit - Update
CLAUDE.mdto reflect ESLint as a gate - Update
CONTRIBUTING.mdto mention the lint step
Explicitly out of scope:
- Prettier — separate decision, separate PR
recommended-type-checkedrules — can be enabled later once the codebase is clean against the base ruleset- Backend (Rust) —
cargo clippy -- -D warningsis already wired
Acceptance criteria
-
npm run lintpasses onmain - CI runs lint on every PR
- No suppressions added to make the initial pass green that don't have a tracking comment or follow-up issue
-
CLAUDE.mdupdated
Notes
Expect a non-trivial first-pass cleanup. If the violation count is large, split into:
- Land config + CI wiring with whatever minimum suppressions are needed
- Follow-up PR(s) to remove suppressions
- 主要语言
- TypeScript
- 星标
- 6
- 派生
- 1
- 平均合并
- 17 分钟
- 30 天内合并 PR
- 2
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
openidle-dev/queryden 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 62/100
openidle-dev/queryden#240 ·
-
bug enhancement
难度 2/5 1-3 小时 新手友好度 76/100
openidle-dev/queryden#187 ·
-
难度 2/5 1-3 小时 新手友好度 58/100
openidle-dev/queryden#237 ·
-
难度 4/5 3-5 天 新手友好度 55/100
openidle-dev/queryden#192 ·
-
dependencies
难度 2/5 1-3 小时 新手友好度 58/100
openidle-dev/queryden#186 ·
查看 openidle-dev/queryden 的全部 Issue
相似的 Issue
-
Mend: dependency security vulnerability
难度 1/5 1-3 小时 新手友好度 65/100
fdm-monster/fdm-monster#5563 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
be-BOP-io-SA/be-BOP#2849 ·
-
难度 2/5 1-3 小时 新手友好度 79/100
维护者通常 1 天内回复
-
1️⃣ phase/under-investigation flaky/confirmed flaky/needs-decision type/bug
难度 2/5 1-3 小时 新手友好度 65/100
growilabs/growi#12246 · 3 条评论 ·
维护者通常 1 天内回复
-
🐛 The Rulekeeper - An index run that gives up on the lock ends Succeeded可能已有人在做 @github-actions 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
SSWConsulting/SSW.Rules#2809 · 1 条评论 ·
维护者通常 1 天内回复