Installations
npm install @r1chm8/eslint-plugin-sort-destructure-keys
Developer Guide
Typescript
No
Module System
CommonJS
Min. Node Version
>=6.0.0
Node Version
16.13.2
NPM Version
8.1.2
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (100%)
Developer
Download Statistics
Total Downloads
30,785
Last Day
30
Last Week
109
Last Month
608
Last Year
8,574
GitHub Statistics
95 Stars
490 Commits
9 Forks
2 Watching
9 Branches
7 Contributors
Bundle Size
2.56 kB
Minified
1.25 kB
Minified + Gzipped
Package Meta Information
Latest Version
0.0.1
Package Id
@r1chm8/eslint-plugin-sort-destructure-keys@0.0.1
Unpacked Size
10.63 kB
Size
4.03 kB
File Count
6
NPM Version
8.1.2
Node Version
16.13.2
Total Downloads
Cumulative downloads
Total Downloads
30,785
Last day
42.9%
30
Compared to previous day
Last week
-18.7%
109
Compared to previous week
Last month
12.2%
608
Compared to previous month
Last year
-42.4%
8,574
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": [ 3 "sort-destructure-keys" 4 ] 5}
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.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 binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: ISC License: LICENSE:0
Reason
4 existing vulnerabilities detected
Details
- 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
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
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
Found 1/13 approved changesets -- 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.5
/10
Last Scanned on 2025-01-27
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