Browse Source

Update js settings

master
Schneider 3 years ago
parent
commit
09e1e0753a
Signed by: schneider GPG Key ID: 3F50B02A50039F3B
  1. 22
      vim/ftplugin/javascript.vim
  2. 3
      vim/ftplugin/json.vim

22
vim/ftplugin/javascript.vim

@ -1,15 +1,25 @@
" use prettier in ALE
let b:ale_fixers = {} let b:ale_fixers = {}
let b:ale_fixers['javascript'] = ['prettier']
let b:ale_fixers['typescript'] = ['prettier']
let b:ale_javascript_prettier_options = '--no-semi --single-quote'
let b:ale_typescript_prettier_options = '--no-semi --single-quote'
let b:ale_fixers['javascript'] = ['eslint']
let b:ale_fixers['typescript'] = ['eslint']
let b:ale_fixers['json'] = ['eslint']
let b:ale_javascript_prettier_options = '--no-semi --single-quote --tab-width 4'
let b:ale_typescript_prettier_options = '--no-semi --single-quote --tab-width 4'
let b:ale_fixers['vue'] = ['prettier'] let b:ale_fixers['vue'] = ['prettier']
let b:ale_vue_prettier_options = '--no-semi --single-quote' let b:ale_vue_prettier_options = '--no-semi --single-quote'
let b:ale_fix_on_save = 1 let b:ale_fix_on_save = 1
let b:ale_javascript_prettier_use_local_config = 1 let b:ale_javascript_prettier_use_local_config = 1
let b:ale_typescript_prettier_use_local_config = 1 let b:ale_typescript_prettier_use_local_config = 1
let b:ale_linters=['']
" config for local eslint
g:ale_javascript_eslint_use_global = 1
g:ale_javascript_eslint_executable = 'yarn'
g:ale_javascript_eslint_options = 'run eslint'
g:ale_typescript_eslint_use_global = 1
g:ale_typescript_eslint_executable = 'yarn'
g:ale_typescript_eslint_options = 'run eslint'
g:ale_json_eslint_use_global = 1
g:ale_json_eslint_executable = 'yarn'
g:ale_json_eslint_options = 'run eslint'
"autocmd bufwritepost *.js silent !standard --fix % "autocmd bufwritepost *.js silent !standard --fix %
setlocal wildignore+=node_modules setlocal wildignore+=node_modules

3
vim/ftplugin/json.vim

@ -1,2 +1,3 @@
let g:ale_fixers['json'] = ['prettier'] let g:ale_fixers['json'] = ['prettier']
let g:ale_fix_on_save = 1
let g:ale_fix_on_save = 0
let b:ale_json_prettier_options = '--no-semi --single-quote --tab-width 4'
Loading…
Cancel
Save