-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
Does not handle correctly absolute paths in baseUrl
and paths
#50
Comments
Can you update your reproduction to be minimal (e.g. only FWIW we have tests that prove absolute paths are handled: |
@privatenumber |
But your file loads a directory that isn't in the project: I'm closing this for now, but I'm happy to re-open once the repo is minimal ( |
You need to run |
I looked into it and I'm able to reproduce it, but this reproduction could have been a lot more minimal. If you use Will fix soon. |
Thank you very much and sorry if the reproduction repo was too bloated. I tried to demonstrate my workflow and how I came to the need of absolute paths handling. |
I just tried 4.6.1, and running {
baseUrl: { broken: '..', correct: '..' }, // fixed
matcher: {
broken: [
'C:/Users/my-username/Documents/a/b/eslint-plugin-import-with-nuxt-3.6-false-reports/C:/Users/my-username/Documents/a/b/eslint-plugin-import-with-nuxt-3.6-false-reports/.nuxt/imports'
],
correct: [ 'C:/Users/my-username/Documents/a/.nuxt/imports' ]
}
} I understood that the generated absolute paths do not need to be real, but the output still looks quite weird (plus Just for comparison, this is 4.6.0 output
{
baseUrl: {
broken: './C:/Users/my-username/Documents/a/b/eslint-plugin-import-with-nuxt-3.6-false-reports',
correct: '..'
},
matcher: {
broken: [
'C:/Users/my-username/Documents/a/b/eslint-plugin-import-with-nuxt-3.6-false-reports/.nuxt/C:/Users/my-username/Documents/a/b/eslint-plugin-import-with-nuxt-3.6-false-reports/C:/Users/my-username/Documents/a/b/eslint-plugin-import-with-nuxt-3.6-false-reports/.nuxt/imports'
],
correct: [ 'C:/Users/my-username/Documents/a/.nuxt/imports' ]
}
} |
🎉 This issue has been resolved in version 4.6.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Give this a try ^ |
Everything works now, thank you a lot for the quick fix 💯 🥇 |
Nuxt 3.6.x generates a
tsconfig
file with absolute paths inbaseUrl
andpaths
fields. This causeseslint-import-resolver-typescript
(which depends onget-tsconfig
) to incorrectly report that imports with nuxt aliases cannot be resolved.Reproduction
https://github.com/andreww2012/eslint-plugin-import-with-nuxt-3.6-false-reports
The text was updated successfully, but these errors were encountered: