Skip to content

#local imports paths being recognized in no-unassigned-import config #347

@fregante

Description

@fregante

Code:

import "#app/side-effects.js"

Config:

"import-x/no-unassigned-import": [
  "error",
  {
    allow: [
      "**/*.css",
      "**/*.scss",
      "#app/side-effects.js",
    ]
  }
]

Error:

  1:1  error  Imported module should be assigned  import-x/no-unassigned-import

#208 reportedly added support for these paths but not here. eslint-plugin-import is also affected.

Workaround:

"import-x/no-unassigned-import": [
  "error",
  {
    allow: [
      "**/*.css",
      "**/*.scss",
-     "#app/side-effects.js",
+     "*app/side-effects.js",
    ]
  }
]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions