-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Open
Description
Feature Request
It would be nice if it was easy to exclude '#' based imports from the "import/extensions" rule, similar to how it is easy to exclude imports from other packages for this rule.
Background
When an import starts with '#' it is resolved by looking for a matching entry in "imports". These import rules are very similar to the rules applied when you are importing from another package, especially one that specifies "exports" to translate import paths.
As such, it is normal that these kinds of imports may not require a file extension even if relative imports do.
Workaround
You can define an override for imports starting with #
, e.g.
'import/extensions': [
'error',
'ignorePackages',
{
pathGroupOverrides: [
{
pattern: '#**',
action: 'ignore',
},
],
},
],
Metadata
Metadata
Assignees
Labels
No labels