Fix #631 - Fix some bad function names

This commit is contained in:
w0rp 2017-06-07 16:02:05 +01:00
parent 9ee7a6d57c
commit 25e1aa43b8
2 changed files with 6 additions and 6 deletions

View File

@ -6,18 +6,18 @@ call ale#Set('javascript_prettier_executable', 'prettier')
call ale#Set('javascript_prettier_use_global', 0) call ale#Set('javascript_prettier_use_global', 0)
call ale#Set('javascript_prettier_options', '') call ale#Set('javascript_prettier_options', '')
function! ale#handlers#prettier#GetExecutable(buffer) abort function! ale#fixers#prettier#GetExecutable(buffer) abort
return ale#node#FindExecutable(a:buffer, 'javascript_prettier', [ return ale#node#FindExecutable(a:buffer, 'javascript_prettier', [
\ 'node_modules/prettier-cli/index.js', \ 'node_modules/prettier-cli/index.js',
\ 'node_modules/.bin/prettier', \ 'node_modules/.bin/prettier',
\]) \])
endfunction endfunction
function! ale#handlers#prettier#Fix(buffer, lines) abort function! ale#fixers#prettier#Fix(buffer) abort
let l:options = ale#Var(a:buffer, 'javascript_prettier_options') let l:options = ale#Var(a:buffer, 'javascript_prettier_options')
return { return {
\ 'command': ale#Escape(ale#handlers#prettier#GetExecutable(a:buffer)) \ 'command': ale#Escape(ale#fixers#prettier#GetExecutable(a:buffer))
\ . ' %t' \ . ' %t'
\ . ' ' . l:options \ . ' ' . l:options
\ . ' --write', \ . ' --write',

View File

@ -6,18 +6,18 @@ call ale#Set('javascript_prettier_eslint_executable', 'prettier-eslint')
call ale#Set('javascript_prettier_eslint_use_global', 0) call ale#Set('javascript_prettier_eslint_use_global', 0)
call ale#Set('javascript_prettier_eslint_options', '') call ale#Set('javascript_prettier_eslint_options', '')
function! ale#handlers#prettier_eslint#GetExecutable(buffer) abort function! ale#fixers#prettier_eslint#GetExecutable(buffer) abort
return ale#node#FindExecutable(a:buffer, 'javascript_prettier_eslint', [ return ale#node#FindExecutable(a:buffer, 'javascript_prettier_eslint', [
\ 'node_modules/prettier-eslint-cli/index.js', \ 'node_modules/prettier-eslint-cli/index.js',
\ 'node_modules/.bin/prettier-eslint', \ 'node_modules/.bin/prettier-eslint',
\]) \])
endfunction endfunction
function! ale#handlers#prettier_eslint#Fix(buffer, lines) abort function! ale#fixers#prettier_eslint#Fix(buffer, lines) abort
let l:options = ale#Var(a:buffer, 'javascript_prettier_eslint_options') let l:options = ale#Var(a:buffer, 'javascript_prettier_eslint_options')
return { return {
\ 'command': ale#Escape(ale#handlers#prettier_eslint#GetExecutable(a:buffer)) \ 'command': ale#Escape(ale#fixers#prettier_eslint#GetExecutable(a:buffer))
\ . ' %t' \ . ' %t'
\ . ' ' . l:options \ . ' ' . l:options
\ . ' --write', \ . ' --write',