JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 321
  • Score
    100M100P100Q76934F
  • License MIT

ESLint plugin for linting ESM (import/export syntax)

Package Exports

  • eslint-plugin-esm

Readme

eslint-plugin-esm

PRs Welcome

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