
Security News
Risky Biz Podcast: Making Reachability Analysis Work in Real-World Codebases
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
@ecosia/stylelint-config-property-sort-order-smacss
Advanced tools
Stylelint config for Property Sort Ordering based on the SMACSS methodology
Stylelint config for Property Sort Ordering based on the SMACSS methodology.
The following patterns are considered violations:
a {
color: red;
top: 0;
}
a {
top: 0;
color: black;
position: absolute;
display: block;
}
The following patterns are not considered violations:
a {
top: 0;
color: red;
}
a {
display: block;
position: absolute;
top: 0;
color: black;
}
Refer to css-property-sort-order-smacss for the comprehensive list of property orders.
For more information on configuring Stylelint, check out the configuration guide.
This is currently only possible with an exported JavaScript configuration.
The basic usage outlined above, will enforce that properties are strictly sorted within their groups (box, border, background etc). Given this configuration makes use of stylelint-order under the hood, there's a couple extra bits of functionality that can be configured. This will require manually generating the configuration - but passing in extra options as seen fit. These will be applied to each property group.
Refer to the properties-order documentation for a list of available options.
All options except properties
and groupName
can be modified.
This will allow properties within the same group to be in any order.
Given:
// stylelint.config.js
const sortOrderSmacss = require('stylelint-config-property-sort-order-smacss/generate');
module.exports = {
plugins: ['stylelint-order'],
rules: {
'order/properties-order': [
sortOrderSmacss()
],
},
};
The following patterns are considered violations:
a {
top: 0;
position: absolute;
display: block;
color: black;
}
Given:
// stylelint.config.js
const sortOrderSmacss = require('stylelint-config-property-sort-order-smacss/generate');
module.exports = {
plugins: ['stylelint-order'],
rules: {
'order/properties-order': [
sortOrderSmacss({ order: 'flexible' })
],
},
};
The following patterns are not considered violations:
a {
top: 0;
position: absolute;
display: block;
color: black;
}
This will allow an empty line after each property group:
Given:
// stylelint.config.js
const sortOrderSmacss = require('stylelint-config-property-sort-order-smacss/generate');
module.exports = {
plugins: ['stylelint-order'],
rules: {
'order/properties-order': [
sortOrderSmacss({ emptyLineBefore: 'never' })
],
},
};
The following patterns are considered violations:
a {
display: block;
position: absolute;
top: 0;
color: black;
}
Given:
// stylelint.config.js
const sortOrderSmacss = require('stylelint-config-property-sort-order-smacss/generate');
module.exports = {
plugins: ['stylelint-order'],
rules: {
'order/properties-order': [
sortOrderSmacss({ emptyLineBefore: 'always' })
],
},
};
The following patterns are not considered violations:
a {
display: block;
position: absolute;
top: 0;
color: black;
}
See CONTRIBUTING.md for contribution guidelines.
See LICENSE.md for license information.
FAQs
Stylelint config for Property Sort Ordering based on the SMACSS methodology
The npm package @ecosia/stylelint-config-property-sort-order-smacss receives a total of 672 weekly downloads. As such, @ecosia/stylelint-config-property-sort-order-smacss popularity was classified as not popular.
We found that @ecosia/stylelint-config-property-sort-order-smacss demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 49 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.