Security News
Introducing the Socket Python SDK
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
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 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 rule.
// eslint.config.js
import importSortingPlugin from 'eslint-plugin-import-sorting'
export default [
{
plugins: {
'import-sorting': importSortingPlugin,
},
rules: {
'import-sorting/order': 'warn',
},
},
]
// .eslintrc.js
module.exports = {
plugins: ['import-sorting'],
rules: {
'import-sorting/order': 'warn',
},
}
See the order rule docs for more configuration options.
FAQs
ESLint plugin to group and sort imports by module, à la Python isort
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
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Security News
Floating dependency ranges in npm can introduce instability and security risks into your project by allowing unverified or incompatible versions to be installed automatically, leading to unpredictable behavior and potential conflicts.
Security News
A new Rust RFC proposes "Trusted Publishing" for Crates.io, introducing short-lived access tokens via OIDC to improve security and reduce risks associated with long-lived API tokens.