2.0.2 • Published 5 months ago
@perplex-digital/stylelint-config v2.0.2
Perplex Property Order
A heavily opinionated Stylelint config that also sorts CSS declarations and properties the way Perplex does.
*With some modifications & additions for modern properties.
Usage
- Add stylelint and this package to your project:
pnpm add stylelint @perplex-digital/stylelint-config - Configure your stylelint configuration file to extend this package:
export default { extends: ['@perplex-digital/stylelint-config'], rules: { // Add overrides and additional rules here }, };
Advanced
The default setup applies these rules:
stylelint-config-standardstylelint-config-recommended-vueorder/orderwith the various custom properties and declarations.order/properties-orderwith the various property groups. If you need to configure other options for this rule, the groups can be imported separately and the rule configured to your needs.stylelint-use-logical-specstylelint-high-performance-animation
import propertyGroups from '@perplex-digital/stylelint-config/groups';
export default {
extends: [], // Do not extend the config here.
rules: {
// Configure the rule manually.
'order/properties-order': propertyGroups.map((group) => ({
...group,
emptyLineBefore: 'always',
noEmptyLineBetween: true,
})),
},
};