import-js/eslint-plugin-import

Feature: option caseSensitive with regex pattern

Open

#1,656 opened on Feb 14, 2020

View on GitHub
 (2 comments) (0 reactions) (0 assignees)JavaScript (1,540 forks)batch import
bughelp wantedresolver

Repository metrics

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

Description

I have the following setting with alias:

.eslintrc.js

settings: {
    "import/resolver": {
      alias: {
        map: ["@", "./src],
        extensions: [".ts", ".js", ".jsx", ".tsx", ".json"]
      }
    }
  }

someFile.js

/* There I have the error: 
Casing of @/test does not match the underlying filesystem  import/no-unresolved
*/
import testDefault from "@/test"; 

As I see the plugin doesn't look for 'alias' in 'import/resolver' It should be fixed or it can be implemented via the following case: .eslintrc.js

   "import/no-unresolved": [2, {
         caseSensitive: ["@"] // like it works for ignoreOption
    }],

Contributor guide