Better fix with ALE

This commit is contained in:
Zhou Yicheng 2018-12-04 16:08:23 +08:00
parent 7159f94e3d
commit f4337b533d
2 changed files with 2 additions and 7 deletions

View File

@ -0,0 +1,2 @@
let b:ale_fixers = ['prettier', 'eslint']
let g:ale_fix_on_save = 1

View File

@ -1,7 +0,0 @@
function! FixEsLint()
silent !clear
execute "!" . "yarn eslint --fix " . bufname("%")
execute "e!"
endfunction
au FileType javascript nmap <leader>e :call FixEsLint()<cr>