eslint-plugin-esm
v0.2.1
Published
ESLint plugin for linting ESM (import/export syntax)
Downloads
715
Maintainers
Readme
eslint-plugin-esm
ESLint plugin for linting ESM (import/export syntax)
Feature
- Faster than
eslint-plugin-import
. - Easier than
eslint-plugin-import
- Zero dependencies.
Requirement
- ESLint >= 8.57.0
Usage
Install
npm i -D eslint eslint-plugin-esm
Config eslint.config.js
import * as esm from "eslint-plugin-esm";
export default [
...
{
files: ["**/*.{js,mjs,jsx,ts,mts,tsx}"],
plugins: { esm },
rules: {
"esm/no-git-ignored-imports": "error"
...
// Visit https://github.com/zanminkian/fenge/tree/main/packages/eslint-plugin-esm/doc/rules for more other rules
},
},
...
];
Config package.json
{
"scripts": {
"lint": "eslint .",
"lint:fix": "eslint . --fix"
}
}
Rules
Click here.
License
MIT