javascript-linter
它能做什么
这个技能用于设置并使用一种检查 JavaScript 代码错误和风格问题的工具。它面向希望代码更一致、更安全的开发者。
适用场景
- ✓团队的代码风格在不同文件之间不一致的时候。
- ✓明明有错误却漏过代码审查、进入测试阶段的时候。
- ✓你开始一个新的 JavaScript 项目,希望从第一天起就有检查的时候。
技能链接
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/javascript-linter/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请帮我为项目设置 ESLint,并修复它报出的警告吗?”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会用共享的规则集设置代码检查工具,把它接入编辑器并加入构建流程。然后它会逐一处理工具报告的错误和警告。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Lint JavaScript code
Linting catches bugs before runtime, enforces team coding standards, and prevents common mistakes that slip through code review.
Quick Reference
- Set up ESLint with
pnpm dlx eslint --init - Use shared configs (eslint:recommended, @typescript-eslint)
- Integrate with your editor for real-time feedback
- Add lint checks to CI/CD pipeline
Check
Set up JavaScript linting tools like ESLint to automatically detect syntax errors, enforce coding standards, and maintain consistent code quality across the team.
Fix
Configure ESLint with appropriate rules and plugins, integrate it into your development workflow, and fix all linting errors and warnings.
Explain
Explain how JavaScript linting prevents bugs, enforces consistent coding standards, improves code readability, and catches potential issues before runtime.
Code Review
Review scripts, client components, and browser execution paths related to Lint JavaScript code. Flag exact imports, event handlers, runtime side effects, or blocking operations that violate the rule, and state how the change should be verified in the browser.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/rules/javascript/javascript-linter
常见问题
什么是 ESLint?
它是一种读取 JavaScript 代码,并报告可能的错误和风格问题的工具。
文中提到了哪些配置?
这个技能提到了 ESLint 推荐规则和 TypeScript ESLint 规则。
代码检查应该在 CI 中运行吗?
这个技能建议把代码检查加入 CI 和部署流程。
详情
作者的原始描述
Use when reviewing scripts, client components, bundles, or runtime behavior related to Lint JavaScript code. Inspect both source code and the browser execution path so fixes target the real bottleneck or bug.
热度
- GitHub 星标
- 75k
- 排名
- #2901
- 许可证
- MIT
- 更新时间
- 2026/10/31
评论
- …
同一仓库的更多技能
frontendchecklist
75k使用命令行工具,依据 380 多条关于无障碍、速度、SEO 和安全的规则,检查前端代码和线上页面。
frontend-checklist-global
75k依据全部 386 条 Front-End Checklist 规则审查前端项目,并为发现的每个问题给出具体修复方法。
404-page
75k检查你的页面缺失提示是否提供有用的链接,并返回真正的 404 状态,帮助迷路的访客找到方向。
about-page
75k审查你的网站是否有清晰的关于页面,说明由谁运营,以建立访客和搜索引擎的信任。