Vision
A linter for CSS and CSS-like languages that is:
- complete - coverage of all standard CSS syntax
- extensible - multiple points of extension
- configurable - no defaults and options to tailor the linter
- robust - comprehensive test coverage and a wide range of fixtures
- consistent - conventions for behavior, naming and documentation
- performant - tools to test and improve performance
Complete
Provide built-in rules for standard CSS syntax that:
Possible errors
Provide rules to catch code that is valid but likely has unintended consequences, e.g. duplicates and overrides.
Limit language features
Provide rules to limit what language features can be used to enforce:
- a maximum specificity by limiting the overall specificity or the occurrence of different selector types, e.g. class, ID and attribute
- best practice at the configuration level, e.g. disallowing the
all
keyword for transitions
- the use of a subset of features to improve consistency across a codebase, e.g. limiting what units are allowed
- specific patterns for selectors and names, e.g. those of custom properties
Stylistic issues
Provide rules to enforce a diverse range of stylistic conventions, including:
Extensible
Provide multiple points of extensions, including:
- plugins - build community rules to support methodologies, toolsets, non-standard CSS features, or very specific use cases
- extendable configs - extend and share configurations
- formatters - format stylelint result objects
- custom syntax - use any PostCSS-compatible syntax module
Robust
Provide a robust tool with a comprehensive test suite, including:
- high coverage, currently over 95%
- a wide range of fixtures for rules
Consistent
Provide consistency throughout, including consistent rules.
Provide a fast tool and the means to test and improve performance, including benchmarking of an individual rule’s performance.