Skip to content

import/no-self-import Suspicious

What it does

Forbid a module from importing itself. This can sometimes happen during refactoring.

Example

javascript
// foo.js
import foo from "./foo.js";
const foo = require("./foo");

References

Released under the MIT License.