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-imports-es6-autofix
Advanced tools
A sort-imports rule that properly distinguishes between ES6 import types.
A sort-imports rule that properly distinguishes between ES6 import types and that is also able to autofix all detected problems.
ESLint's built-in sort-imports
rule considers the following to be the same type of import:
import foo from 'foo';
import { bar } from 'bar';
This version of the rule fixes that.
It accepts the same options as the original rule, but the multiple
type corresponds to all named imports (regardless of how many are imported), while the single
type corresponds only to default imports.
This rule respects whitespace and comments between imports by only looking at the order of (and sorting) consecutive import statements (those without newlines/comments in between them).
This fork also fixes the import order on eslint --fix. To avoid problems, it will only switch out the import statements, not comments on the same line, etc.
ESLint's built-in sort-imports
is only able to sort variable names inside of multiple
-imports.
npm i --save-dev eslint-plugin-sort-imports-es6-autofix
{
"plugins": [
"sort-imports-es6-autofix"
],
"rules": {
"sort-imports-es6-autofix/sort-imports-es6": [2, {
"ignoreCase": false,
"ignoreMemberSort": false,
"memberSyntaxSortOrder": ["none", "all", "multiple", "single"]
}]
}
}
FAQs
A sort-imports rule that properly distinguishes between ES6 import types.
The npm package eslint-plugin-sort-imports-es6-autofix receives a total of 115,280 weekly downloads. As such, eslint-plugin-sort-imports-es6-autofix popularity was classified as popular.
We found that eslint-plugin-sort-imports-es6-autofix demonstrated a not healthy version release cadence and project activity because the last version was released 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.