Skip to content
This repository has been archived by the owner on Mar 21, 2022. It is now read-only.

Add eslint configuration to ALE linters #13

Closed
jpesce opened this issue Aug 13, 2021 · 4 comments
Closed

Add eslint configuration to ALE linters #13

jpesce opened this issue Aug 13, 2021 · 4 comments

Comments

@jpesce
Copy link

jpesce commented Aug 13, 2021

Eslint allows linting via the eslint-plugin-jsonc plugin.

I've tested it with ALE and it works fine, we just need to add the following linter configuration:
https://github.com/jpesce/vim-jsonc/blob/master/ale_linters/jsonc/eslint.vim

call ale#linter#Define('jsonc', {
\   'name': 'eslint',
\   'output_stream': 'both',
\   'executable': function('ale#handlers#eslint#GetExecutable'),
\   'cwd': function('ale#handlers#eslint#GetCwd'),
\   'command': function('ale#handlers#eslint#GetCommand'),
\   'callback': 'ale#handlers#eslint#HandleJSON',
\})

To make it easier, if you want I can make the pull request.

@kevinoid
Copy link
Owner

Neat! Good find @jpesce!

Have you considered submitting a PR to https://github.com/dense-analysis/ale so all ALE users could benefit, whether or not they use this particular jsonc plugin? If there's reason not to, I'm not opposed to adding it here. Just trying to find the best spot.

@jpesce
Copy link
Author

jpesce commented Aug 14, 2021

@kevinoid great! 🐸 I just made the pull request:
dense-analysis/ale#3873

Let's see what they think

@kevinoid
Copy link
Owner

Great work! Thanks again @jpesce!

I'll follow that PR and issue. Let me know if there's anything I can do to help.

@kevinoid
Copy link
Owner

Congratulations on getting dense-analysis/ale#3873 merged, and thanks for all of your effort on it @jpesce!

Presumably there's no longer a benefit to adding the configuration to this plugin, so I'll close this issue. Feel free to reopen if there's anything I've missed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants