跳到正文
Skillpedia
通用编程75k · #2901

javascript-linter

它能做什么

这个技能用于设置并使用一种检查 JavaScript 代码错误和风格问题的工具。它面向希望代码更一致、更安全的开发者。

适用场景

  • ✓团队的代码风格在不同文件之间不一致的时候。
  • ✓明明有错误却漏过代码审查、进入测试阶段的时候。
  • ✓你开始一个新的 JavaScript 项目,希望从第一天起就有检查的时候。

技能链接

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/javascript-linter/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/javascript-linter/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 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.

repo: thedaviddias/Front-End-Checklist

热度

GitHub 星标
75k
排名
#2901
许可证
MIT
更新时间
2026/10/31

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能