1
0
Fork 0
mirror of synced 2024-11-09 10:48:58 -05:00
ultimate-vim/sources_non_forked/ale/ale_linters/json/spectral.vim

15 lines
545 B
VimL
Raw Normal View History

2021-05-05 04:25:00 -04:00
" Author: t2h5 <https://github.com/t2h5>
" Description: Integration of Stoplight Spectral CLI with ALE.
call ale#Set('json_spectral_executable', 'spectral')
call ale#Set('json_spectral_use_global', get(g:, 'ale_use_global_executables', 0))
call ale#linter#Define('json', {
\ 'name': 'spectral',
2021-05-31 16:30:26 -04:00
\ 'executable': {b -> ale#path#FindExecutable(b, 'json_spectral', [
2021-05-05 04:25:00 -04:00
\ 'node_modules/.bin/spectral',
\ ])},
\ 'command': '%e lint --ignore-unknown-format -q -f text %t',
\ 'callback': 'ale#handlers#spectral#HandleSpectralOutput'
\})