import-js/eslint-plugin-import

import/no-self-import incorrectly identifies self.

Open

#1,247 opened on Dec 18, 2018

View on GitHub
 (4 comments) (1 reaction) (0 assignees)JavaScript (1,540 forks)batch import
bughelp wanted

Repository metrics

Stars
 (4,946 stars)
PR merge metrics
 (Avg merge 138d 22h) (3 merged PRs in 30d)

Description

The issue seems to be when you have a local directory that has the same name as a global import. For example, I have a project that uses redis, and the code that uses it sits in a redis directory.

e.g. File: redis/index.js

const redis = require('redis'); // <-- import/no-self-import error here

Contributor guide