mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-06 12:44:23 +08:00
* 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
This commit is contained in:
16
ale_linters/json/eslint.vim
Normal file
16
ale_linters/json/eslint.vim
Normal file
@@ -0,0 +1,16 @@
|
||||
" Author: João Pesce <joao@pesce.cc>
|
||||
" 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
|
||||
" <devw0rp@gmail.com>
|
||||
|
||||
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',
|
||||
\})
|
||||
16
ale_linters/json5/eslint.vim
Normal file
16
ale_linters/json5/eslint.vim
Normal file
@@ -0,0 +1,16 @@
|
||||
" Author: João Pesce <joao@pesce.cc>
|
||||
" 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
|
||||
" <devw0rp@gmail.com>
|
||||
|
||||
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',
|
||||
\})
|
||||
16
ale_linters/jsonc/eslint.vim
Normal file
16
ale_linters/jsonc/eslint.vim
Normal file
@@ -0,0 +1,16 @@
|
||||
" Author: João Pesce <joao@pesce.cc>
|
||||
" 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
|
||||
" <devw0rp@gmail.com>
|
||||
|
||||
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',
|
||||
\})
|
||||
Reference in New Issue
Block a user