A mighty, modern CSS linter that helps you enforce consistent conventions and avoid errors in your stylesheets.
一个强大的现代 CSS 检测器,可以让你在样式表中遵循一致的约定和避免错误。
超过 150 条规则:包括:
With stylelint, it's easy to start linting your CSS:
使用 stylelint,可以很容易开始检测你的 CSS:
决定通过什么方式使用 stylelint:
通过以下两种方式创建你自己的配置对象:
stylelint-config-standard
. It includes over 80 of stylelint's rules with sensible defaults. (You can always override specific rules after extending the config.) We update the config with each new release of stylelint. Alternately, you can search for a community config and extend that instead.stylelint-config-standard
。它包括超过 80 个 stylelint 规则,而且都有合理的默认值。 (你总是可以通过继承这个配置来覆盖特定的规则。) 我们会随每个 stylelint 新版本更新这个配置。你还可以 查找 一个社区的配置,然后 extend它。创建自己的配置,首先学习规则如何命名,如何协同配合,然后:
null
) the rules that you don't care to enforce.null
关闭)你不关心的规则。You'll find more detailed information on using stylelint and tailoring it to your needs in our guides:
你可以在以下指南中根据自己需要详细了解如何使用 stylelint:
If you're looking for help or have a support question, then check out our FAQ first. If the answer to your problem isn't there, then go to stackoverflow. stackoverflow is a huge Question and Answer community, and tagging your post there with "stylelint" will catch the stylelint team's attention.
如果你寻求帮助或有问题需要支持,请先查看FAQ。如果没有找到你想要的答案,就去stackoverflow。stackoverflow 是一个非常大的问答社区,在你的文章打上 "stylelint" 标签,这样会吸引 stylelint 团队的注意。
If you think you've found a bug or if you have feature request, then create a new GitHub issue. Be sure to follow the issue template, answering each question, as this helps us greatly in understanding your problem or request.
如果你发现了 bug 或有新特性请求,请发issue。请按照 issue 模板,回答每一个问题,这将帮助我们理解你的问题或请求。
Upgrading? Please read our CHANGELOG to learn what changes to expect in the latest version, whether that's new features, bug fixes, renamed rules, or whatever else.
升级?请阅读我们的变更日志 了解最新版本的变化,新特性,bug 复现,规则重命名或其他。
There is always a lot of work to do, and already well over 150 rules to maintain. So please help out in any way that you can:
还有很多事情需要去做,而且有超过 150 条规则需要维护。所以,用你的方式参与进来吧: