Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Allow failing of linting if an alias isn't used #12

Open
dr3 opened this issue Aug 28, 2019 · 1 comment
Open

Feature: Allow failing of linting if an alias isn't used #12

dr3 opened this issue Aug 28, 2019 · 1 comment

Comments

@dr3
Copy link

dr3 commented Aug 28, 2019

Setting up aliases are great, but they can just be ignored and use the normal relative path. For consistency it would be nice to have the ability to throw a eslint warning/error if an alias isnt used, or a path where one exists.

Example, with config

settings: {
  'import/resolver': {
    alias: {
      map: [
        ['components', './src/app/components'],
      ],
    },
  },
},
import Button from '../../components/Button

would throw a warning/error as you didnt do

import Button from 'components/Button
@TSMMark
Copy link

TSMMark commented Feb 4, 2022

Would love to see this. @ Maintainers any chance this would see a merge if I submitted a PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants