-
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
Add support for eslint-plugin-jsonc plugin #3872
Comments
… JSON5 (#3873) * Add eslint as linter for JSON, JSONC and JSON5 Use the same lint configuration as eslint for javascript. * Add documentation for JSON* eslint support * Fix spacing in documentation * Update docs to be unopinionated about plugins Remove any preference for eslint plugins, since there are more thant one that would work * Reorder languages and tools in alphabetic order * Fix misalignment * Change orders to pass the tests
I think I'm running into an issue with this. I recently updated ALE and am now seeing eslint errors in json files, presumably because I don't have this plugin installed. Is there a config to turn off eslint for json, or should there be a new ticket to make it so that it only tries json files if the plugin is installed? Every line of the json file is underlined and I get the following error:
Or maybe I need to update my eslintrc to ignore json files (or add the plugin)? |
I also just tried adding
|
Try configuring g:ale_linters so json is not linted by eslint. |
Nice, this worked well:
Since I tend to use prettier instead of eslint for json, I see this working fine for me, but I feel like that approach might not be the best if e.g. I wanted it to be on for some projects and not for others. For example I use The tricky part here is that eslint is installed, but not the json plugin. |
This can be achieved by having project-specific vim configurations. There are many alternatives for this: |
Name: eslint with eslint-plugin-jsonc plugin
URL: https://ota-meshi.github.io/eslint-plugin-jsonc/
Linter and fixer for JSON, JSONC and JSON5 files that uses
eslint
. Sinceeslint
is already supported for other filetypes, this should be trivial. I'll make a very basic pull request with the minimum required configuration and let me know if it makes sense supporting it so I can improve it. 🐸Cheers
The text was updated successfully, but these errors were encountered: