跳到正文
Skillpedia
网站与界面(前端)75k · #3039

styles-lint

它能做什么

这个技能设置一个 CSS 和 SCSS 检查工具,检查样式表中的错误和样式规则,并能自动修复许多问题。它面向希望样式表一致、整洁的前端团队。

适用场景

  • ✓你请智能体为项目添加样式检查工具的时候。
  • ✓团队的样式表不一致,或存在被遗漏的错误的时候。
  • ✓你希望在提交或部署代码之前自动运行样式检查的时候。

技能链接

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

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

使用方法

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

可直接粘贴的消息

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

可以这样问 AI

“请帮我为项目设置 CSS 检查工具,让样式错误能被自动发现吗?”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会使用标准配置安装 Stylelint,并在需要的地方添加 SCSS 支持。然后它会把检查工具接入你的编辑器、提交前检查和持续集成流程。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Lint CSS and SCSS files

CSS linting catches syntax errors, enforces consistent coding standards, and prevents maintainability issues before they reach production.

Quick Reference

  • Install Stylelint with stylelint-config-standard
  • Add SCSS support with stylelint-config-standard-scss
  • Enable auto-fix in your IDE and pre-commit hooks
  • Include in CI/CD pipeline to catch issues early

Check

Set up CSS/SCSS linting tools like Stylelint to automatically detect syntax errors, enforce coding standards, and maintain consistent code quality.

Fix

Configure Stylelint with appropriate rules and integrate it into your build process and code editor for real-time error detection and fixing.

Explain

Explain how CSS linting prevents errors, enforces consistent coding standards, and improves maintainability of stylesheets across the team.

Code Review

Review stylesheets, component styles, and responsive states related to Lint CSS and SCSS files. Flag exact selectors, declarations, or breakpoints that violate the rule in the rendered UI.


For full implementation details, code examples, and framework-specific guidance, see references/rule.md.

Rule page: https://frontendchecklist.io/rules/css/styles-lint

常见问题

什么是 Stylelint?

它是一个检查 CSS 和 SCSS 文件中的错误和编码标准的工具。

它能自动修复问题吗?

这个技能提到可以在编辑器和提交前钩子中启用自动修复。

应该在哪里运行检查?

这个技能建议在编辑器、提交时以及持续集成流程中运行,以便及早发现问题。

详情

作者的原始描述

Use when reviewing stylesheets, component styles, and responsive behavior related to Lint CSS and SCSS files. Check the rendered layout across breakpoints and interaction states before proposing a fix.

repo: thedaviddias/Front-End-Checklist

热度

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

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能