-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Close #3872 - Add eslint-plugin-jsonc as a linter for JSON, JSONC and…
… 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
- Loading branch information
Showing
9 changed files
with
102 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
" Author: João Pesce <[email protected]> | ||
" Description: eslint for JSON files. | ||
" | ||
" Requires eslint-plugin-jsonc or a similar plugin to work | ||
" | ||
" Uses the same funtcions as ale_linters/javascript/eslint.vim by w0rp | ||
" <[email protected]> | ||
|
||
call ale#linter#Define('json', { | ||
\ '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', | ||
\}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
" Author: João Pesce <[email protected]> | ||
" Description: eslint for JSON5 files. | ||
" | ||
" Requires eslint-plugin-jsonc or a similar plugin to work | ||
" | ||
" Uses the same funtcions as ale_linters/javascript/eslint.vim by w0rp | ||
" <[email protected]> | ||
|
||
call ale#linter#Define('json5', { | ||
\ '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', | ||
\}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
" Author: João Pesce <[email protected]> | ||
" Description: eslint for JSONC files. | ||
" | ||
" Requires eslint-plugin-jsonc or a similar plugin to work | ||
" | ||
" Uses the same funtcions as ale_linters/javascript/eslint.vim by w0rp | ||
" <[email protected]> | ||
|
||
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', | ||
\}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
=============================================================================== | ||
ALE JSON5 Integration *ale-json5-options* | ||
|
||
|
||
=============================================================================== | ||
eslint *ale-json5-eslint* | ||
|
||
The `eslint` linter for JSON uses the JavaScript options for `eslint`; see: | ||
|ale-javascript-eslint|. | ||
|
||
You will need a JSON5 ESLint plugin installed for this to work. | ||
|
||
|
||
=============================================================================== | ||
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
=============================================================================== | ||
ALE JSONC Integration *ale-jsonc-options* | ||
|
||
|
||
=============================================================================== | ||
eslint *ale-jsonc-eslint* | ||
|
||
The `eslint` linter for JSON uses the JavaScript options for `eslint`; see: | ||
|ale-javascript-eslint|. | ||
|
||
You will need a JSONC ESLint plugin installed for this to work. | ||
|
||
|
||
=============================================================================== | ||
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters