Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eslint --fix for javascript #851

Merged
merged 1 commit into from Sep 22, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 11 additions & 0 deletions autoload/SpaceVim/layers/lang/javascript.vim
Expand Up @@ -17,6 +17,17 @@ endfunction

function! SpaceVim#layers#lang#javascript#config() abort
call SpaceVim#mapping#gd#add('javascript', function('s:gotodef'))
if !exists(g:spacevim_javascript_autofix)
let g:spacevim_javascript_autofix = 1
endif
if (g:spacevim_javascript_autofix)
" Only use eslint
let g:neomake_javascript_enabled_makers = ['eslint']
" Use the fix option of eslint
let g:neomake_javascript_eslint_args = ['-f', 'compact', '--fix']
au User NeomakeFinished checktime
au FocusGained * checktime
endif
endfunction

function! s:gotodef() abort
Expand Down