-
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
Close #3872 - Add eslint-plugin-jsonc as a linter for JSON, JSONC and JSON5 #3873
Conversation
Use the same lint configuration as eslint for javascript.
Looks good. You are already reusing well the code for eslint and just defining the linter for additional languages. The only problem I see is that this would enable the eslint linter for JSON, JSONC, and JSON5 files even if the plugin is not present. Ensure to update the list of supported tools in supported-tools.md, ale-supported-languages-and-tools.txt, and add entries to ale.txt for the newly supported languages. See ale-graphql-eslint for example. |
Updated 🐸 |
Remove any preference for eslint plugins, since there are more thant one that would work
@jpesce sorry I forgot to mention that the list of supported linters must be sorted alphabetically or the tests would fail. This is the correct sorting:
|
Makes sense, thanks! Updated them 🐸 |
Sorry, there was a misalignment in Fixed it in d0156e6 |
Test still failing... I think because the order within ale.txt must also match the order in supported tools. If you have docker daemon would be good to run the tests locally before pushing the chages:
|
Sorry about that, I installed docker and ran the tests and now it's passing. One remark though — the test expects the following order in
but it wierdly expects json5 to be before jsonc in
Here's the test output
Let me know how you prefer to continue 🐸 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution and patience.
Use the same lint configuration as eslint for javascript in JSON, JSONC and JSON5 files. Requires
eslint-plugin-jsonc
in.eslintrc
.This is the first time working with the codebase, so let me know if there's an easier way to reuse the eslint configuration without having to copy everything. :)
If you think the PR makes sense, I'll try to write the tests.
Closes #3872