🗂️ A heavily opinionated Stylelint config that:
- Supports linting
.vuefiles - Orders CSS the way Perplex does
- Supports Tailwind 4 directives like
@applyand@variant
- Supports Tailwind 4 directives like
- Sorts CSS properties the way Concentric-CSS did but with:
- 'Box sizing' and 'Overflow' modules above the 'Box model - Margin' module
outlinegrouped with the 'Borders' module- 'Backgrounds and box-shadow' module below the 'Box model - Padding' module
- 'Positioning' and 'Anchor positioning' modules above the 'Transforms' module
- 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 }, };
The default setup applies these rules:
stylelint-config-standardstylelint-config-recommended-vue@stylistic/stylelint-plugin,stylelint-use-logical-specstylelint-high-performance-animation- Some overrides of these rules
order/orderwith the Perplex order.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.
import propertyGroups from '@perplex-digital/stylelint-config/property-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,
})),
},
};