InternetProgramming/Lab3/node_modules/eslint-plugin-import/docs/rules/no-self-import.md
2023-12-15 14:42:22 +04:00

417 B

import/no-self-import

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

Rule Details

Fail

// foo.js
import foo from './foo';

const foo = require('./foo');
// index.js
import index from '.';

const index = require('.');

Pass

// foo.js
import bar from './bar';

const bar = require('./bar');