stylelint-config-ultimate v0.2.2
stylelint-config-ultimate
The ultimate shareable config for stylelint.
Extends stylelint-config-standard.
Turns on additional rules to enforce the common stylistic conventions found within a handful of CSS styleguides, including: The Idiomatic CSS Principles, Google's CSS Style Guide, Airbnb's Styleguide, and @mdo's Code Guide.
It favours flexibility over strictness for things like multi-line lists and single-line rulesets, and tries to avoid potentially divisive rules.
Use it as is or as a foundation for your own config.
To see the rules that this config uses, please read the config itself.
Installation
npm install stylelint-config-ultimate --save-devUsage
If you've installed stylelint-config-ultimate locally within your project, just set your stylelint config to:
{
"extends": "stylelint-config-ultimate"
}If you've globally installed stylelint-config-ultimate using the -g flag, then you'll need to use the absolute path to stylelint-config-ultimate in your config e.g.
{
"extends": "/absolute/path/to/stylelint-config-ultimate"
}Suggested additions
stylelint-config-ultimate is a great foundation for your own config. You can extend it to create a tailored and much stricter config:
- Specify what quotes must be used using:
- If you use
autoprefixeryou'll want to disallow vendor prefixes using: - Control specificity using:
- Specify acceptable selector types, units, properties, functions and words in comments using:
at-rule-blacklistat-rule-whitelistcolor-namedcolor-no-hexcomment-word-blacklistdeclaration-no-importantdeclaration-property-unit-blacklistdeclaration-property-unit-whitelistdeclaration-property-value-blacklistdeclaration-property-value-whitelistfunction-blacklistfunction-url-scheme-blacklistfunction-url-scheme-whitelistfunction-whitelistmedia-feature-name-blacklistmedia-feature-name-whitelistproperty-blacklistproperty-whitelistselector-attribute-operator-blacklistselector-attribute-operator-whitelistselector-combinator-blacklistselector-combinator-whitelistselector-max-classselector-max-attributeselector-max-combinatorsselector-max-idselector-max-pseudo-classselector-no-qualifying-typeselector-max-typeselector-max-universalselector-pseudo-class-blacklistselector-pseudo-class-whitelistselector-pseudo-element-blacklistselector-pseudo-element-whitelistunit-blacklistunit-whitelist
- Specify acceptable naming patterns using:
- Specify a notation when there are one or more valid representations using:
- Specify what types of URLs are allowed using:
- Specify a maximum line length using: