Skip to content
Projets

stormwarning/stylelint-config-recess-order

Voir sur GitHub

À propos

🗂️ Ordre de tri des propriétés pour Stylelint, basé sur Recess.

Développement web et applicatif

Comment ces chiffres sont mesurés

Progression mesurée des étoiles

in 24h
0
in 7 days
0
in 15 days
+3
in 1 month
Historique en cours

Variations nettes sur des périodes qui se chevauchent, pas des totaux quotidiens. Les mesures absentes restent vides. Les étoiles indiquent l’intérêt, pas la qualité.

README.md

Original

Recess* Property Order StyleLint

npm version npm downloads github issues

A Stylelint config that sorts CSS properties the way Recess did and Bootstrap did/does.

*With some modifications & additions for modern properties.

Usage

  1. Add stylelint, stylelint-order, and this package to your project:
    npm install --save-dev stylelint stylelint-order stylelint-config-recess-order
    
  2. Configure your Stylelint configuration file to extend this package:
    /** @type {import('stylelint').Config} */
    export default {
        extends: ['stylelint-config-recess-order'],
        rules: {
            // Add overrides and additional rules here
        },
    }
    

Advanced

The default setup applies only the 'order/properties-order' rule with 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 'stylelint-config-recess-order/groups'

/** @type {import('stylelint').Config} */
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,
		})),
	},
}

[!TIP] If you need the Recess property order for any Rust-based tooling, there’s now a crate for that!

References

@mdo on CSS Property Order

Explorer des projets similaires

Chargement…