@putout/plugin-declare-imports-first

2.1.0 • Public • Published

@putout/plugin-declare-imports-first NPM version

The static import declaration is used to import read-only live bindings which are exported by another module.

(c) MDN

🐊Putout plugin adds ability to declare imports first.

Check out in 🐊Putout Editor.

Install

npm i @putout/plugin-declare-imports-first

Rule

{
    "rules": {
        "declare-imports-first": "on"
    }
}

Example of incorrect code

const [arg] = process.argv;
import esbuild from 'esbuild';

Example of correct code

import esbuild from 'esbuild';
const [arg] = process.argv;

License

MIT

Package Sidebar

Install

npm i @putout/plugin-declare-imports-first

Weekly Downloads

3,277

Version

2.1.0

License

MIT

Unpacked Size

5.29 kB

Total Files

4

Last publish

Collaborators

  • coderaiser