Installations
npm install @ptb/eslint-plugin-sort-destructure-keys
Developer Guide
Typescript
No
Module System
CommonJS
Min. Node Version
>=12
Node Version
20.12.0
NPM Version
10.5.0
Score
65.4
Supply Chain
92.3
Quality
74.4
Maintenance
100
Vulnerability
98.9
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (100%)
validate.email 🚀
Verify real, reachable, and deliverable emails with instant MX records, SMTP checks, and disposable email detection.
Developer
Download Statistics
Total Downloads
124
Last Day
1
Last Week
1
Last Month
10
Last Year
124
GitHub Statistics
ISC License
96 Stars
490 Commits
9 Forks
1 Watchers
9 Branches
7 Contributors
Updated on Feb 11, 2025
Bundle Size
2.95 kB
Minified
1.39 kB
Minified + Gzipped
Package Meta Information
Latest Version
1.6.0
Package Id
@ptb/eslint-plugin-sort-destructure-keys@1.6.0
Unpacked Size
12.26 kB
Size
4.41 kB
File Count
6
NPM Version
10.5.0
Node Version
20.12.0
Published on
Apr 08, 2024
Total Downloads
Cumulative downloads
Total Downloads
124
Last Day
0%
1
Compared to previous day
Last Week
0%
1
Compared to previous week
Last Month
42.9%
10
Compared to previous month
Last Year
0%
124
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
1
Peer Dependencies
1
Dev Dependencies
5
eslint-plugin-sort-destructure-keys
require object destructure key to be sorted
Installation
You'll first need to install ESLint:
$ npm i eslint --save-dev
Next, install eslint-plugin-sort-destructure-keys
:
$ npm install eslint-plugin-sort-destructure-keys --save-dev
Note: If you installed ESLint globally (using the -g
flag) then you must also install eslint-plugin-sort-destructure-keys
globally.
Usage
Add sort-destructure-keys
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
1{ 2 "plugins": ["sort-destructure-keys"] 3}
Then configure the rule under the rules section.
1{ 2 "rules": { 3 "sort-destructure-keys/sort-destructure-keys": 2 4 } 5}
Rule Options
1{ 2 "sort-destructure-keys/sort-destructure-keys": [2, { "caseSensitive": false }] 3}
caseSensitive
When true
the rule will enforce properties to be in case-sensitive order. Default is true
.
Example of incorrect code for the {"caseSensitive": false}
option:
1let { B, a, c } = obj;
Example of correct code for the {"caseSensitive": false}
option:
1let { a, B, c } = obj;
Example of incorrect code for the {"caseSensitive": true}
option:
1let { a, B, c } = obj;
Example of correct code for the {"caseSensitive": true}
option:
1let { B, a, c } = obj;
Changelog
1.5.0
- Allow sorting properties with defaults when the default doesn't reference other properties (#215, by ianobermiller).
1.4.0
- Add compatibility with eslint 8. (#123)
1.3.5
1.3.4
- Fixes TypeError issue with multiple property expressions (#20)
1.3.3
1.3.2
1.3.1
- Fix bug with rest properties being sorted incorrectly. (#11, #12, thanks @briandastous and @njdancer!)
1.3.0
- Add support for
--fix
eslint cli flag
1.2.0
- Add peer dependency support for eslint
^5.0.0
1.1.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:0
- Info: FSF or OSI recognized license: ISC License: LICENSE:0
Reason
6 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8
- Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55
- Warn: Project is vulnerable to: GHSA-76p7-773f-r4q5
Reason
dependency not pinned by hash detected -- score normalized to 2
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/mthadley/eslint-plugin-sort-destructure-keys/main.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/mthadley/eslint-plugin-sort-destructure-keys/main.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/mthadley/eslint-plugin-sort-destructure-keys/main.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:32: update your workflow using https://app.stepsecurity.io/secureworkflow/mthadley/eslint-plugin-sort-destructure-keys/main.yml/master?enable=pin
- Warn: npmCommand not pinned by hash: .github/workflows/main.yml:24
- Info: 0 out of 4 GitHub-owned GitHubAction dependencies pinned
- Info: 2 out of 3 npmCommand dependencies pinned
Reason
Found 1/13 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/main.yml:1
- Info: no jobLevel write permissions found
Reason
0 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
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
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 22 are checked with a SAST tool
Score
3.3
/10
Last Scanned on 2025-03-10
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