summaryrefslogtreecommitdiff
path: root/ale_linters/javascript
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2019-02-22 18:05:04 +0000
committerw0rp <devw0rp@gmail.com>2019-02-22 18:05:04 +0000
commit883978ece93bd19250d6d7e8b9659b48f23522e2 (patch)
tree8ac9417b7c980906295745cc5ea709b91a789390 /ale_linters/javascript
parentf53b25d2567a2f7495dab444680596f48de427d1 (diff)
downloadale-883978ece93bd19250d6d7e8b9659b48f23522e2.zip
#2132 - Replace all uses of foo_callback with foo
Diffstat (limited to 'ale_linters/javascript')
-rw-r--r--ale_linters/javascript/eslint.vim4
-rwxr-xr-xale_linters/javascript/flow.vim2
-rw-r--r--ale_linters/javascript/flow_ls.vim6
-rw-r--r--ale_linters/javascript/jscs.vim6
-rw-r--r--ale_linters/javascript/jshint.vim6
-rw-r--r--ale_linters/javascript/standard.vim4
-rw-r--r--ale_linters/javascript/tsserver.vim6
-rw-r--r--ale_linters/javascript/xo.vim4
8 files changed, 19 insertions, 19 deletions
diff --git a/ale_linters/javascript/eslint.vim b/ale_linters/javascript/eslint.vim
index 23e16949..8aeac2d8 100644
--- a/ale_linters/javascript/eslint.vim
+++ b/ale_linters/javascript/eslint.vim
@@ -4,7 +4,7 @@
call ale#linter#Define('javascript', {
\ 'name': 'eslint',
\ 'output_stream': 'both',
-\ 'executable_callback': 'ale#handlers#eslint#GetExecutable',
-\ 'command_callback': 'ale#handlers#eslint#GetCommand',
+\ 'executable': function('ale#handlers#eslint#GetExecutable'),
+\ 'command': function('ale#handlers#eslint#GetCommand'),
\ 'callback': 'ale#handlers#eslint#Handle',
\})
diff --git a/ale_linters/javascript/flow.vim b/ale_linters/javascript/flow.vim
index 0561ab74..05aae030 100755
--- a/ale_linters/javascript/flow.vim
+++ b/ale_linters/javascript/flow.vim
@@ -168,7 +168,7 @@ endfunction
call ale#linter#Define('javascript', {
\ 'name': 'flow',
-\ 'executable_callback': 'ale_linters#javascript#flow#GetExecutable',
+\ 'executable': function('ale_linters#javascript#flow#GetExecutable'),
\ 'command_chain': [
\ {'callback': 'ale_linters#javascript#flow#VersionCheck'},
\ {'callback': 'ale_linters#javascript#flow#GetCommand'},
diff --git a/ale_linters/javascript/flow_ls.vim b/ale_linters/javascript/flow_ls.vim
index 75377183..accaaa73 100644
--- a/ale_linters/javascript/flow_ls.vim
+++ b/ale_linters/javascript/flow_ls.vim
@@ -19,10 +19,10 @@ endfunction
call ale#linter#Define('javascript', {
\ 'name': 'flow-language-server',
\ 'lsp': 'stdio',
-\ 'executable_callback': ale#node#FindExecutableFunc('javascript_flow_ls', [
+\ 'executable': {b -> ale#node#FindExecutable(b, 'javascript_flow_ls', [
\ 'node_modules/.bin/flow',
-\ ]),
+\ ])},
\ 'command': '%e lsp --from ale-lsp',
-\ 'project_root_callback': 'ale_linters#javascript#flow_ls#FindProjectRoot',
+\ 'project_root': function('ale_linters#javascript#flow_ls#FindProjectRoot'),
\ 'language': 'javascript',
\})
diff --git a/ale_linters/javascript/jscs.vim b/ale_linters/javascript/jscs.vim
index a38766a6..8905b3a1 100644
--- a/ale_linters/javascript/jscs.vim
+++ b/ale_linters/javascript/jscs.vim
@@ -53,9 +53,9 @@ endfunction
call ale#linter#Define('javascript', {
\ 'name': 'jscs',
-\ 'executable_callback': ale#node#FindExecutableFunc('javascript_jscs', [
+\ 'executable': {b -> ale#node#FindExecutable(b, 'javascript_jscs', [
\ 'node_modules/.bin/jscs',
-\ ]),
-\ 'command_callback': 'ale_linters#javascript#jscs#GetCommand',
+\ ])},
+\ 'command': function('ale_linters#javascript#jscs#GetCommand'),
\ 'callback': 'ale_linters#javascript#jscs#Handle',
\})
diff --git a/ale_linters/javascript/jshint.vim b/ale_linters/javascript/jshint.vim
index cb7f66fc..d80a2250 100644
--- a/ale_linters/javascript/jshint.vim
+++ b/ale_linters/javascript/jshint.vim
@@ -25,9 +25,9 @@ endfunction
call ale#linter#Define('javascript', {
\ 'name': 'jshint',
-\ 'executable_callback': ale#node#FindExecutableFunc('javascript_jshint', [
+\ 'executable': {b -> ale#node#FindExecutable(b, 'javascript_jshint', [
\ 'node_modules/.bin/jshint',
-\ ]),
-\ 'command_callback': 'ale_linters#javascript#jshint#GetCommand',
+\ ])},
+\ 'command': function('ale_linters#javascript#jshint#GetCommand'),
\ 'callback': 'ale#handlers#unix#HandleAsError',
\})
diff --git a/ale_linters/javascript/standard.vim b/ale_linters/javascript/standard.vim
index f16b837a..4cd2c303 100644
--- a/ale_linters/javascript/standard.vim
+++ b/ale_linters/javascript/standard.vim
@@ -24,7 +24,7 @@ endfunction
" standard uses eslint and the output format is the same
call ale#linter#Define('javascript', {
\ 'name': 'standard',
-\ 'executable_callback': 'ale_linters#javascript#standard#GetExecutable',
-\ 'command_callback': 'ale_linters#javascript#standard#GetCommand',
+\ 'executable': function('ale_linters#javascript#standard#GetExecutable'),
+\ 'command': function('ale_linters#javascript#standard#GetCommand'),
\ 'callback': 'ale#handlers#eslint#Handle',
\})
diff --git a/ale_linters/javascript/tsserver.vim b/ale_linters/javascript/tsserver.vim
index 63509022..68c252c5 100644
--- a/ale_linters/javascript/tsserver.vim
+++ b/ale_linters/javascript/tsserver.vim
@@ -8,10 +8,10 @@ call ale#Set('javascript_tsserver_use_global', get(g:, 'ale_use_global_executabl
call ale#linter#Define('javascript', {
\ 'name': 'tsserver',
\ 'lsp': 'tsserver',
-\ 'executable_callback': ale#node#FindExecutableFunc('javascript_tsserver', [
+\ 'executable': {b -> ale#node#FindExecutable(b, 'javascript_tsserver', [
\ 'node_modules/.bin/tsserver',
-\ ]),
+\ ])},
\ 'command': '%e',
-\ 'project_root_callback': 'ale#handlers#tsserver#GetProjectRoot',
+\ 'project_root': function('ale#handlers#tsserver#GetProjectRoot'),
\ 'language': '',
\})
diff --git a/ale_linters/javascript/xo.vim b/ale_linters/javascript/xo.vim
index bc8657ed..4ba39101 100644
--- a/ale_linters/javascript/xo.vim
+++ b/ale_linters/javascript/xo.vim
@@ -20,7 +20,7 @@ endfunction
" xo uses eslint and the output format is the same
call ale#linter#Define('javascript', {
\ 'name': 'xo',
-\ 'executable_callback': 'ale_linters#javascript#xo#GetExecutable',
-\ 'command_callback': 'ale_linters#javascript#xo#GetCommand',
+\ 'executable': function('ale_linters#javascript#xo#GetExecutable'),
+\ 'command': function('ale_linters#javascript#xo#GetCommand'),
\ 'callback': 'ale#handlers#eslint#Handle',
\})