$ cnpm install @putout/plugin-group-imports-by-source
The static import declaration is used to import read-only live bindings which are exported by another module. The imported bindings are called live bindings because they are updated by the module that exported the binding, but cannot be re-assigned by the importing module.
(c) MDN
????Putout plugin adds ability to find and group import statements by source. Checkout in ????Putout Editor. For CommonJS use nodejs/group-require-by-id.
Merged with @putout/plugin-esm.
Group order:
npm i @putout/plugin-group-imports-by-source
{
"rules": {
"group-imports-by-source": "on"
}
}
import fs from 'node:fs';
import {lodash} from 'lodash';
import react from 'react';
import d from '../hello.js';
import ss from '../../bb/ss.js';
import b from './ss.js';
const c = 5;
import fs from 'node:fs';
import react from 'react';
import {lodash} from 'lodash';
import b from './ss.js';
import d from '../hello.js';
import ss from '../../bb/ss.js';
const c = 5;
MIT
Copyright 2013 - present © cnpmjs.org | Home |