From 25e1aa43b82d8959a84e4d05056f2086f031739e Mon Sep 17 00:00:00 2001 From: w0rp Date: Wed, 7 Jun 2017 16:02:05 +0100 Subject: [PATCH] Fix #631 - Fix some bad function names --- autoload/ale/fixers/prettier.vim | 6 +++--- autoload/ale/fixers/prettier_eslint.vim | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/autoload/ale/fixers/prettier.vim b/autoload/ale/fixers/prettier.vim index a9c3aaa3..ae370ac6 100644 --- a/autoload/ale/fixers/prettier.vim +++ b/autoload/ale/fixers/prettier.vim @@ -6,18 +6,18 @@ call ale#Set('javascript_prettier_executable', 'prettier') call ale#Set('javascript_prettier_use_global', 0) 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', [ \ 'node_modules/prettier-cli/index.js', \ 'node_modules/.bin/prettier', \]) 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') return { - \ 'command': ale#Escape(ale#handlers#prettier#GetExecutable(a:buffer)) + \ 'command': ale#Escape(ale#fixers#prettier#GetExecutable(a:buffer)) \ . ' %t' \ . ' ' . l:options \ . ' --write', diff --git a/autoload/ale/fixers/prettier_eslint.vim b/autoload/ale/fixers/prettier_eslint.vim index 1ba9af25..ed5dc96d 100644 --- a/autoload/ale/fixers/prettier_eslint.vim +++ b/autoload/ale/fixers/prettier_eslint.vim @@ -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_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', [ \ 'node_modules/prettier-eslint-cli/index.js', \ 'node_modules/.bin/prettier-eslint', \]) 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') return { - \ 'command': ale#Escape(ale#handlers#prettier_eslint#GetExecutable(a:buffer)) + \ 'command': ale#Escape(ale#fixers#prettier_eslint#GetExecutable(a:buffer)) \ . ' %t' \ . ' ' . l:options \ . ' --write',