Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
eslint-plugin-sort-exports
Advanced tools
Sort export declarations in modules, similarly to sort-imports
First install ESLint
yarn add -d eslint
Then install eslint-plugin-sort-exports
yarn add --dev eslint-plugin-sort-exports
Note: If you installed ESLint globally, you must also install eslint-plugin-sort-exports
globally.
Add sort-exports
to the plugins section of your .eslintrc
and configure the rule under the rules
section.
{
"plugins": ["sort-exports"],
"rules": {
"sort-exports/sort-exports": ["error", {"sortDir": "asc"}]
}
}
sort-exports
{
"sort-exports/sort-exports": [
"error",
{ sortDir: "asc", ignoreCase: true, sortExportKindFirst: "type" }
]
}
Options can be any of the following properties:
sortDir
: Can be either asc
(default) or desc
signifying ascending or descending sort order, respectively.ignoreCase
: If true, sorting is case-insensitive.sortExportKindFirst
: Can be type
, value
, or none
. Determines whether export
or export type
are sorted first, if not none
.disableAutofixer
: If there's a bug in the autofixer and you want to disable it but leave other rules alone, you can set this to true.pattern
: Glob pattern to select or exclude specific filenames. E.g. **/index.ts
.FAQs
Sort ES6 exports
The npm package eslint-plugin-sort-exports receives a total of 28,079 weekly downloads. As such, eslint-plugin-sort-exports popularity was classified as popular.
We found that eslint-plugin-sort-exports 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.