import-js/eslint-plugin-import

Feature: option caseSensitive with regex pattern

Open

#1,656 opened on Feb 14, 2020

 (2 comments) (0 reactions) (0 assignees)JavaScript (1,548 forks)batch import
bughelp wantedresolver

Repository metrics

Stars
 (5,940 stars)
PR merge metrics
 (PR metrics pending)

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