@10stars/stylelint-config 中文文档教程
@10stars/stylelint-config
Install
npm i -g \
stylelint \
@10stars/stylelint-config
Set up your global stylelint rules
复制 user-config/.stylelintrc.js
到 ~/.stylelintrc.js
cp user-config/.stylelintrc.js ~/.stylelintrc.js
Extending the config
只需将 "rules"
键添加到您的配置中,然后在那里添加您的覆盖和添加。
例如,要关闭 block-no-empty
规则:
module.exports = {
extends: "/usr/local/lib/node_modules/@10stars/stylelint-config", // use only this
rules: {
"block-no-empty": null,
},
}
@10stars/stylelint-config
Install
npm i -g \
stylelint \
@10stars/stylelint-config
Set up your global stylelint rules
Copy user-config/.stylelintrc.js
to ~/.stylelintrc.js
cp user-config/.stylelintrc.js ~/.stylelintrc.js
Extending the config
Simply add a "rules"
key to your config, then add your overrides and additions there.
For example, to turn off the block-no-empty
rule:
module.exports = {
extends: "/usr/local/lib/node_modules/@10stars/stylelint-config", // use only this
rules: {
"block-no-empty": null,
},
}