mirror of
https://github.com/dense-analysis/ale.git
synced 2026-02-05 09:27:44 +08:00
#2132 - Replace all uses of foo_callback with foo
This commit is contained in:
@@ -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',
|
||||
\})
|
||||
|
||||
@@ -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'},
|
||||
|
||||
@@ -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',
|
||||
\})
|
||||
|
||||
@@ -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',
|
||||
\})
|
||||
|
||||
@@ -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',
|
||||
\})
|
||||
|
||||
@@ -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',
|
||||
\})
|
||||
|
||||
@@ -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': '',
|
||||
\})
|
||||
|
||||
@@ -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',
|
||||
\})
|
||||
|
||||
Reference in New Issue
Block a user