Linting Scope
- stylelint-config-recommended:
Covers a broad range of common CSS issues, including syntax errors, invalid properties, and best practices.
- stylelint-config-standard:
Provides a wide-ranging set of rules for general CSS linting, addressing both syntax and best practices.
- stylelint-config-recommended-scss:
Targets SCSS-specific issues, including nested rules, mixins, and SCSS syntax errors.
- stylelint-config-sass-guidelines:
Aligns with Sass community guidelines, focusing on best practices and common pitfalls in Sass development.
- stylelint-config-idiomatic-order:
Focuses on the order of CSS properties within rules, promoting an idiomatic and consistent structure.
Customization
- stylelint-config-recommended:
Offers a solid base with some flexibility for customization, allowing teams to adjust rules as needed.
- stylelint-config-standard:
Highly customizable, enabling teams to modify rules while maintaining a comprehensive linting framework.
- stylelint-config-recommended-scss:
Provides SCSS-specific rules with room for customization, particularly for teams that want to extend SCSS linting.
- stylelint-config-sass-guidelines:
Follows established guidelines but allows for customization to fit team preferences and project needs.
- stylelint-config-idiomatic-order:
Allows for customization of property order, but primarily focuses on enforcing a specific ordering methodology.
Ease of Integration
- stylelint-config-recommended:
Seamless integration with Stylelint, making it a go-to choice for many projects.
- stylelint-config-standard:
Widely used and well-documented, ensuring easy integration into various workflows.
- stylelint-config-recommended-scss:
Designed for quick integration into SCSS projects, ensuring immediate linting of SCSS files.
- stylelint-config-sass-guidelines:
Simple integration for teams adopting Sass guidelines, promoting consistency from the start.
- stylelint-config-idiomatic-order:
Easy to integrate into existing projects, especially those already using Stylelint.
Community Support
- stylelint-config-recommended:
Part of the larger Stylelint ecosystem, benefiting from strong community support and ongoing development.
- stylelint-config-standard:
One of the most popular configurations, with extensive community support and contributions.
- stylelint-config-recommended-scss:
Supported by the SCSS community, providing resources and updates for SCSS-specific linting.
- stylelint-config-sass-guidelines:
Aligns with the Sass community, which actively promotes and supports these guidelines.
- stylelint-config-idiomatic-order:
Backed by a community that values idiomatic CSS practices, though smaller than some other configurations.
Code Examples
- stylelint-config-recommended:
Example of
stylelint-config-recommendedcatching an error:.button { color: blue; background-colour: white; /* This will trigger a linting error */ } - stylelint-config-standard:
Example of
stylelint-config-standard:.button { color: blue; background-color: white; margin: 10px; padding: 5px; /* This will catch common linting issues */ } - stylelint-config-recommended-scss:
Example of
stylelint-config-recommended-scssfor SCSS:.button { color: blue; background-color: white; @include mixin(); /* SCSS-specific linting */ } - stylelint-config-sass-guidelines:
Example of
stylelint-config-sass-guidelines:.button { color: blue; background-color: white; @include mixin(); /* Follow Sass guidelines for nesting and mixins */ } - stylelint-config-idiomatic-order:
Example of
stylelint-config-idiomatic-orderin action:/* stylelint-disable property-no-unknown */ .button { color: blue; background-color: white; margin: 10px; padding: 5px; }