-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Webpack alias not working #1851
Comments
Try adding |
In Case 2 above (warning for '@/components/test' and no warning for @/util) there's an issue with the implementation of checking for scoped modules in the Using the See https://github.com/benmosher/eslint-plugin-import/blob/master/src/rules/extensions.js#L132 function isExternalRootModule(file) {
const slashCount = file.split('/').length - 1
if (isScopedModule(file) && slashCount <= 1) return true // <----------- problem here
if (isExternalModule(file, context, resolve(file, context)) && !slashCount) return true
return false
} and the export function isScopedModule(name) {
return name.indexOf('@') === 0
}
I think the implementation for isScopedModule should be On the other hand Run git clone --single-branch --branch 3nuc/issue1 https://github.com/3nuc/demo-vue-eslint-force-dot-vue-extension-in-imports && cd demo-vue-eslint-force-dot-vue-extension-in-imports && npm ci && npm run lint for repro (see /src/miscfile.js file)
|
…d as a package See import-js#1851.
It's work for me! |
.eslintrc.js
package.json
Result
The text was updated successfully, but these errors were encountered: