feat: fecs support for js/html/css lint and format

`fecs` is a lint tool for HTML/CSS/JavaScript,
see http://fecs.baidu.com for more options.
This commit is contained in:
harttle committed 2019-04-11 16:24:58 +08:00
1 parent 4813165614
commit c820089c44
13 files changed
+199

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
" Author: harttle <yangjvn@126.com>
" Description: Apply fecs format to a file.
call ale#Set('html_fecs_executable', 'fecs')
call ale#Set('html_fecs_use_global', get(g:, 'ale_use_global_executables', 0))
function! ale#fixers#fecs#Fix(buffer) abort
let l:executable = ale#handlers#fecs#GetExecutable(a:buffer)
if !executable(l:executable)
return 0
endif
let l:config_options = ' format --replace=true'
return {
\ 'command': ale#Escape(l:executable) . l:config_options . ' %t',
\ 'read_temporary_file': 1,
\}
endfunction