-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Eslint enabled by default on JSON files without proper dependency check #4004
Comments
This is something I was afraid would happen (#3873 (comment)). Currently I see no way to check if the dependency is available or not. There seems to be a way to have linters disabled by default but have no had time to figure it out. |
I also could not find a way to accomplish this. My instinct says revert as it's highly unlikely that >80% of projects would have this secondary dependency and eslint is not designed for json. |
Not sure if this is related but I notice recently when opening json files, I get "parsing error: unexpected token" error. Adding
|
@flipjs that's because you're overriding the linters list to remove eslint. It's not actually a fix for this problem sadly |
@theycallmeswift this is an attempt to disable eslint by default for json files: #4023 appreciated if you can test this. |
Assuming fixed with #4023. |
Information
VIM version
IM - Vi IMproved 8.2 (2019 Dec 12, compiled Oct 1 2021 22:47:36)
macOS version - x86_64
Operating System: Mac OS 12.0.1 (21A559)
What went wrong
When I open any JSON file in a project using eslint, I receive a parsing error. This is because #3873 made eslint enabled on JSON files by default even though eslint does not support JSON parsing out of the box. This can be fixed by adding a JSON parsing plugin to the eslint config, but not everyone realizes this is the behavior and we really should either (1) install all the dependencies or (2) check for them before bubbling up unnecessary errors to the user.
Example error:
Reproducing the bug
:ALEInfo
The text was updated successfully, but these errors were encountered: