1 | # Vision
|
2 |
|
3 | A linter for CSS and CSS-like languages that is:
|
4 |
|
5 | - complete - coverage of all standard CSS syntax
|
6 | - extensible - multiple points of extension
|
7 | - configurable - no defaults and options to tailor the linter
|
8 | - robust - comprehensive test coverage and a wide range of fixtures
|
9 | - consistent - conventions for behavior, naming and documentation
|
10 | - performant - tools to test and improve performance
|
11 |
|
12 | ## Complete
|
13 |
|
14 | Provide built-in rules for standard CSS syntax that:
|
15 |
|
16 | - [detect possible errors](../user-guide/rules/list.md#possible-errors)
|
17 | - [limit language features](../user-guide/rules/list.md#limit-language-features)
|
18 | - [enforce stylistic conventions](../user-guide/rules/list.md#stylistic-issues)
|
19 |
|
20 | ### Possible errors
|
21 |
|
22 | Provide rules to catch code that is valid but likely has unintended consequences, e.g. duplicates and overrides.
|
23 |
|
24 | ### Limit language features
|
25 |
|
26 | Provide rules to limit what language features can be used to enforce:
|
27 |
|
28 | - a maximum specificity by limiting the overall specificity or the occurrence of different selector types, e.g. class, ID and attribute
|
29 | - best practice _at the configuration level_, e.g. disallowing the `all` keyword for transitions
|
30 | - the use of a subset of features to improve consistency across a codebase, e.g. limiting what units are allowed
|
31 | - specific patterns for selectors and names, e.g. those of custom properties
|
32 |
|
33 | ### Stylistic issues
|
34 |
|
35 | Provide rules to enforce a diverse range of stylistic conventions, including:
|
36 |
|
37 | - whitespace
|
38 | - case
|
39 | - quotes
|
40 |
|
41 | ## Extensible
|
42 |
|
43 | Provide multiple points of extensions, including:
|
44 |
|
45 | - [plugins](../developer-guide/plugins.md) - build community rules to support methodologies, toolsets, non-standard CSS features, or very specific use cases
|
46 | - [extendable configs](../user-guide/configure.md#extends) - extend and share configurations
|
47 | - [formatters](../developer-guide/formatters.md) - format stylelint result objects
|
48 | - [custom syntax](syntaxes.md) - use any PostCSS-compatible syntax module
|
49 |
|
50 | ## Robust
|
51 |
|
52 | Provide a robust tool with a [comprehensive test suite](../developer-guide/rules.md#write-tests), including:
|
53 |
|
54 | - high coverage, currently over 95%
|
55 | - a wide range of fixtures for rules
|
56 |
|
57 | ## Consistent
|
58 |
|
59 | Provide consistency throughout, including consistent [rules](../user-guide/rules/about.md).
|
60 |
|
61 | ## Performant
|
62 |
|
63 | Provide a fast tool and the means to test and improve performance, including [benchmarking](../developer-guide/rules.md#improve-the-performance-of-a-rule) of an individual rule's performance.
|