@gglnx/stylelint-config
v1.0.0
Published
Shared Stylelint configuration
Downloads
9
Readme
@gglnx/stylelint-config
This is my personal Stylelint shared configuration. It's based on the stylelint-config-sass-guidelines
.
Installation
Install the configuration and all peer dependencies:
npm install --save-dev @gglnx/stylelint-config
Usage
Create an .stylelintrc
file in your project root:
{
"extends": "@gglnx/stylelint-config"
}
Deviations
csstools/use-logical
: Use logical props (except for float)selector-max-compound-selectors
: Limited to 4 compound selectorsselector-class-pattern
: Allows only the BEM naming scheme (.block__element--modifier
) and helper and theming classes (.has-*
,.u-*
,.js-*
,.is-*
,.t-*
)max-nesting-depth
: Limits to one nesting level except for pseudo-classes, at-rules and theming classes (.t-*
)property-no-unknown
: Adds allowance for:export
property (CSS modules)order/properties-alphabetical-order
: Enforce alphabetical order for all propertiesorder/order
: Custom order inside selectors:- SCSS variables
@extend
at-rules@include use-*
at-rules- Custom properties
- Declarations
- Nested rules beginning with
&
- Nested rules for pseudo-classes (like
:hover
) - Nested rules for pseudo-elements (
::before/::after
) - Other rules and at-rules
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
License
Distributed under the MIT License. See LICENSE
for more information.