eslint-plugin-misc

ESLint plugin

This project is maintained by iliubinskii

no-self-import

ESLint plugin / no-self-import

Disallows self-import.

module.exports = {
  plugins: ["misc"],
  rules: {
    "misc/no-self-import": "error"
  }
};

Examples of incorrect code

// filename: file.ts
import { a } from "./file";
import { b } from "./file.ts";

Examples of correct code

// filename: file.ts
import { a } from "@/file";
import { b } from "@/file.ts";