The shareable stylelint config for Polymer elements.
$ npm install stylelint-config-polymer
Set your stylelint config to:
{
"extends": "stylelint-config-polymer",
"processors": [ "stylelint-processor-html" ]
}
Note: you need to install stylelint-processor-html to lint inline styles.
Simply add a "rules"
key to your config, then add your overrides and additions there.
For example, to change the indentation to tabs and turn off the number-leading-zero
rule:
{
"extends": "stylelint-config-polymer",
"processors": [ "stylelint-processor-html" ],
"rules": {
"indentation": "tab",
"number-leading-zero": null
}
}
stylelint-config-polymer
is based on stylelint-config-standard with some additions:
- selector-type-no-unknown is configured to match Custom Elements selectors
- selector-pseudo-class-no-unknown is configured to ignore
:host
selector - selector-pseudo-element-no-unknown is configured to ignore
::content
and::shadow
selectors