
Security News
Open Source Maintainers Feeling the Weight of the EU’s Cyber Resilience Act
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
eslint-plugin-typescript-sort-keys
Advanced tools
Sort interface and string enum keys
Inspired by and sourced from eslint/sort-keys
You'll first need to install
yarn add -D eslint typescript @typescript-eslint/parser
Next, install eslint-plugin-typescript-sort-keys
:
yarn add -D eslint-plugin-typescript-sort-keys
Note: If you installed ESLint globally then you must also install eslint-plugin-typescript-sort-keys
globally.
Specify the parser for typescript files in your .eslintrc
configuration file:
{
"parser": "@typescript-eslint/parser"
}
Add typescript-sort-keys
to the plugins section. You can omit the eslint-plugin-
prefix:
{
"plugins": ["typescript-sort-keys"]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"typescript-sort-keys/interface": "error",
"typescript-sort-keys/string-enum": "error"
}
}
Or enable all rules with defaults
{
"extends": ["plugin:typescript-sort-keys/recommended"]
}
Key: :heavy_check_mark: = recommended, :wrench: = fixable
Name | Description | :heavy_check_mark: | :wrench: |
---|---|---|---|
typescript-sort-keys/interface | require interface keys to be sorted | :heavy_check_mark: | :wrench: |
typescript-sort-keys/string-enum | require string enum members to be sorted | :heavy_check_mark: | :wrench: |
[3.3.0] - 2024-10-05
FAQs
Sort interface and string enum keys
The npm package eslint-plugin-typescript-sort-keys receives a total of 345,294 weekly downloads. As such, eslint-plugin-typescript-sort-keys popularity was classified as popular.
We found that eslint-plugin-typescript-sort-keys demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.