Gathering detailed insights and metrics for eslint-plugin-sort-keys-custom-order-fix
Gathering detailed insights and metrics for eslint-plugin-sort-keys-custom-order-fix
Gathering detailed insights and metrics for eslint-plugin-sort-keys-custom-order-fix
Gathering detailed insights and metrics for eslint-plugin-sort-keys-custom-order-fix
Fork of https://eslint.org/docs/rules/sort-keys with a custom order and autofix enabled
npm install eslint-plugin-sort-keys-custom-order-fix
Typescript
Module System
Min. Node Version
Node Version
NPM Version
84.9
Supply Chain
95.5
Quality
74.8
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
4 Stars
34 Commits
1 Forks
2 Watchers
1 Branches
1 Contributors
Updated on May 03, 2025
Minified
Minified + Gzipped
Latest Version
0.1.1
Package Id
eslint-plugin-sort-keys-custom-order-fix@0.1.1
Unpacked Size
87.54 kB
Size
15.21 kB
File Count
9
NPM Version
6.14.12
Node Version
14.16.1
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
Fork of eslint rule that sorts keys in objects (https://eslint.org/docs/rules/sort-keys) with a custom order and autofix enabled.
You'll first need to install ESLint:
$ npm i eslint --save-dev
Next, install eslint-plugin-sort-keys-custom-order-fix
:
$ npm i eslint-plugin-sort-keys-custom-order-fix --save-dev
Note: If you installed ESLint globally (using the -g
flag), then you must also install eslint-plugin-sort-keys-custom-order-fix
globally.
Add sort-keys-custom-order-fix
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
1{ 2 "plugins": ["sort-keys-custom-order-fix"] 3}
Then add sort-keys-custom-order-fix
rule under the rules section:
1{ 2 "rules": { 3 "sort-keys-custom-order-fix/sort-keys-custom-order-fix": "warn" 4 } 5}
Example using custom
order:
1{ 2 "rules": { 3 "sort-keys-custom-order-fix/sort-keys-custom-order-fix": ["warn", "custom", { "order": ["a", "c", "b"] }] 4 } 5}
Example using custom
order + orderBy
:
1{ 2 "rules": { 3 "sort-keys-custom-order-fix/sort-keys-custom-order-fix": [ 4 "warn", 5 "custom", 6 { "orderBy": "asc", "order": ["a", "c", "b"] } 7 ] 8 } 9}
Often it makes sense to enable sort-keys-custom-order-fix
only for certain files/directories. For cases like that, use override key of eslint config:
1{ 2 "rules": { 3 // ... 4 }, 5 "overrides": [ 6 { 7 "files": ["src/alphabetical.js", "bin/*.js", "lib/*.js"], 8 "rules": { 9 "sort-keys-custom-order-fix/sort-keys-custom-order-fix": "warn" 10 } 11 } 12 ] 13}
For available config options, see official sort-keys reference. All options supported by sort-keys
, besides minKeys
, are supported by sort-keys-custom-order-fix
.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
1 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
no SAST tool detected
Details
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
security policy file not detected
Details
Reason
license file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
33 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-05-05
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