-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Bug: 6.0.0 - cannot use parser with absolute path anymore #7226
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
Comments
This is just a quirk of how package.json exports work in conjunction with
You will want to either use |
I already use
This doesn't work with a .json config obviously This worked fine before 6.0.0, not sure how this is a user error? |
True! ESLint is moving away from
Before 6, you're right again - it would have been a bug. As of the changes described by https://typescript-eslint.io/blog/announcing-typescript-eslint-v6#package-exports, it's now intentional. We don't want to work against native Node/ESM |
That's what I wanted to do, but it turns out @typescript-eslint isn't compatible with the new flat config yet. But alas, that's what I'm doing now. |
Got it - I meant to suggest just switching over to a Thanks for the conversation, by the way! This was very helpful in understanding a way we didn't previously know about how folks use us. |
Note that the migration from
And that's it! JSON is valid JS so there are no further updates required to your config file (unless you have prettier or something which will want to format it...). There's no difference in resolution or anything between the two config file types - so you can fearlessly make the switch now to improve your experience :) |
Before You File a Bug Report Please Confirm You Have Done The Following...
Relevant Package
parser
Playground Link
No response
Repro Code
ESLint Config
tsconfig
No response
Expected Result
Should work
Actual Result
Additional Info
With 5.62.0 (and before) it works perfectly fine.
However with 6.0.0 it fails.
The package @typescript-eslint/parser is there, is accessible (correct permissions) and also shows perfectly fine when checking with
npm list
.I spent hours today thinking it was a bug in eslint, but it turns out it's not, and I am stuck at a dead-end.
I'd really appreciate if you could fix this!
Versions
@typescript-eslint/eslint-plugin
6.0.0
@typescript-eslint/parser
6.0.0
TypeScript
5.1.4
ESLint
8.45.0
node
16.19.1
The text was updated successfully, but these errors were encountered: