-
-
Notifications
You must be signed in to change notification settings - Fork 493
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
Enabling type-aware rules for custom file extensions (e.g. svelte) #408
Comments
|
It works when I do that. From the 4 command examples in the original post, the first 2 don't work, the final 2 work. To be clear, type-aware linting works on all the svelte files in the project (as long as we pass either a single file or As far tsconfig goes, I did try messing around with patterns and simplifying it to try and find the cause, but nothing worked. I concluded that the svelte files must be included in the tsconfig properly, otherwise none of the four commands listed above would work. Essentially, I don't understand why The behavior I'm seeing makes little sense to me, which is why I'm assuming that this is either a bug in eslint, a misconfiguration in my eslint config, or in my fundamental understanding of how eslint is supposed to work. |
It seems that the directory passed to the eslint cli determines whether this issue is reproduced or not. If
This feels more like a bug than an issue with my config. I'm not yet sure how to narrow down the culprit though. |
I'm going to close it as this issue is likely not a result of our eslint config, but a bug somewhere else. |
Describe the bug
I'm trying to debug an issue with type-aware rules for svelte files. Given the following config:
Type aware rules only work "sometimes". Of the 4 following commands, the first 2 result in parsing errors and the last 2 run as expected.
The error that happens on svelte files is:
Reproduction
pnpm install
pnpm eslint .
pnpm eslint src/routes
ts/no-floating-promises
) are reported in svelte files as expected.Other
I'm trying to determine whether this is specific to svelte or not. Is anyone else having difficulty enabling type-aware rules for custom extensions (e.g. vue) as well?
Reproduction
https://github.com/thenbe/sveltekit-eslint-antfu/tree/repro-type-aware
System Info
Used Package Manager
pnpm
Validations
The text was updated successfully, but these errors were encountered: