Skip to content

Characters in aliases interpreted as regex #15

@slifty

Description

@slifty

Thank you for the project!

We're using module-alias in our project to prevent import hell. According to this issue they are recommending a $ prefix to aliases in order to avoid the @ that is being used as a namespace among npm packages.

It looks like your plugin will interpret $ as regex, which means if I had an alias for $src defined, I would need to write in my eslint alias settings:

'\\$src', './src'

I'm not sure the ideal solution from a project perspective, but it would be great to be able to use $ (or other regex characters) in my aliases.

Note: in our case we are addressing this by changing $src to %src but ideally we wouldn't have to.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions