Last active
September 23, 2022 16:25
-
-
Save mrv1k/f472db1054f35e1179b0eedd0d7fcb94 to your computer and use it in GitHub Desktop.
Resolve path starting "@/*". eslint-plugin-import / eslint-import-resolver-webpack
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Good article to read what is `@` in `.vue` files | |
* {@link https://www.jerriepelser.com/blog/til-at-symbol-javascript-import/} | |
* | |
* More on `import/no-unresolved` rule: | |
* {@link https://github.com/benmosher/eslint-plugin-import/blob/HEAD/docs/rules/no-unresolved.md#ignore} | |
*/ | |
// `/` is just for sanity and can be ommited. | |
// Add this line to your .eslint.rc | |
'import/no-unresolved': [2, { ignore: ['^@\/'] }], | |
// If you import `.js` files using `@` import is gonna complain again. So you need to update `extensions` rule as well. | |
'import/extensions': [2, { | |
'js': 'never', | |
'vue': 'always' | |
}], |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment