A plugin pack of order related linting rules for Stylelint.
Installations
npm install stylelint-order
Score
75
Supply Chain
90.8
Quality
74.1
Maintenance
100
Vulnerability
98.9
License
Developer
hudochenkov
Developer Guide
Module System
CommonJS
Min. Node Version
Typescript Support
No
Node Version
20.10.0
NPM Version
10.2.5
Statistics
915 Stars
271 Commits
61 Forks
11 Watching
2 Branches
20 Contributors
Updated on 24 Nov 2024
Bundle Size
29.62 kB
Minified
6.65 kB
Minified + Gzipped
Languages
JavaScript (100%)
Total Downloads
Cumulative downloads
Total Downloads
311,717,639
Last day
-1.6%
298,818
Compared to previous day
Last week
1.8%
1,646,909
Compared to previous week
Last month
4.3%
6,961,433
Compared to previous month
Last year
2%
76,951,435
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
2
Peer Dependencies
1
stylelint-order
A plugin pack of order-related linting rules for Stylelint. Every rule supports autofixing (stylelint --fix
).
Installation
- If you haven't, install Stylelint:
npm install stylelint --save-dev
- Install
stylelint-order
:
npm install stylelint-order --save-dev
Usage
Add stylelint-order
to your Stylelint config plugins
array, then add rules you need to the rules list. All rules from stylelint-order need to be namespaced with order
.
1{ 2 "plugins": [ 3 "stylelint-order" 4 ], 5 "rules": { 6 "order/order": [ 7 "custom-properties", 8 "declarations" 9 ], 10 "order/properties-order": [ 11 "width", 12 "height" 13 ] 14 } 15}
Rules
order
: Specify the order of content within declaration blocks.properties-order
: Specify the order of properties within declaration blocks.properties-alphabetical-order
: Specify the alphabetical order of properties within declaration blocks.
Autofixing
Every rule supports autofixing with stylelint --fix
. postcss-sorting is used internally for order autofixing.
Automatic sorting has some limitations that are described for every rule, if any. Please, take a look at how comments are handled by postcss-sorting
.
CSS-in-JS styles with template interpolation could be ignored by autofixing to avoid style corruption.
Autofixing in Less syntax may work but isn't officially supported.
Example configs
All these configs have properties-order
configured with logical properties groups:
stylelint-config-idiomatic-order
stylelint-config-hudochenkov/order
stylelint-config-recess-order
stylelint-config-property-sort-order-smacss
stylelint-config-clean-order
Thanks
properties-order
and properties-alphabetical-order
code and README were based on the declaration-block-properties-order
rule which was a core rule prior to Stylelint 8.0.0.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE.md:0
- Info: FSF or OSI recognized license: MIT License: LICENSE.md:0
Reason
1 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
Reason
6 commit(s) and 4 issue activity found in the last 90 days -- score normalized to 8
Reason
dependency not pinned by hash detected -- score normalized to 3
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/lint.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/hudochenkov/stylelint-order/lint.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/lint.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/hudochenkov/stylelint-order/lint.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/hudochenkov/stylelint-order/test.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/hudochenkov/stylelint-order/test.yml/master?enable=pin
- Info: 0 out of 4 GitHub-owned GitHubAction dependencies pinned
- Info: 2 out of 2 npmCommand dependencies pinned
Reason
Found 4/30 approved changesets -- score normalized to 1
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/lint.yml:1
- Warn: no topLevel permission defined: .github/workflows/test.yml:1
- Info: no jobLevel write permissions found
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 4 are checked with a SAST tool
Score
4.4
/10
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More