
Security News
ESLint Adds Official Support for Linting HTML
ESLint now supports HTML linting with 48 new rules, expanding its language plugin system to cover more of the modern web development stack.
eslint-plugin-import-sorting
Advanced tools
ESLint plugin to group and sort imports by module, à la Python isort
Enforce a convention in the order of import
statements, inspired by
isort’s grouping style:
This plugin includes an additional group for “style” imports where the import
source ends in .css
or other style format. Imports are sorted alphabetically,
except for local modules, which are sorted by the number of .
segements in
the path first, then alphabetically.
Install the plugin, and ESLint if it is not already.
npm install --save-dev eslint eslint-plugin-import-sorting
Include the plugin in the plugins
key of your ESLint config and enable the
rules.
// eslint.config.js
import importSortingPlugin from 'eslint-plugin-import-sorting'
export default [
{
plugins: {
'import-sorting': importSortingPlugin,
},
rules: {
'import-sorting/order': 'error',
},
},
]
🔧 Automatically fixable by the --fix
CLI option.
Name | Description | 🔧 |
---|---|---|
order | Consistently order import statements. | 🔧 |
specifier-order | Consistently order named import specifiers. | 🔧 |
FAQs
ESLint plugin to group and sort imports by module, à la Python isort
The npm package eslint-plugin-import-sorting receives a total of 44 weekly downloads. As such, eslint-plugin-import-sorting popularity was classified as not popular.
We found that eslint-plugin-import-sorting demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
ESLint now supports HTML linting with 48 new rules, expanding its language plugin system to cover more of the modern web development stack.
Security News
CISA is discontinuing official RSS support for KEV and cybersecurity alerts, shifting updates to email and social media, disrupting automation workflows.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.