import-js/eslint-plugin-import

Feature: option caseSensitive with regex pattern

Open

#1656 aperta il 14 feb 2020

Vedi su GitHub
 (2 commenti) (0 reazioni) (0 assegnatari)JavaScript (1540 fork)batch import
bughelp wantedresolver

Metriche repository

Star
 (4946 star)
Metriche merge PR
 (Merge medio 138g 22h) (3 PR mergiate in 30 g)

Descrizione

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
    }],

Guida contributor