mirror of
https://github.com/dense-analysis/ale.git
synced 2026-01-08 12:34:51 +08:00
Fix #895 - Run Node.js scripts with node.exe instead of node on Windows
This commit is contained in:
@@ -67,7 +67,7 @@ Execute(.js files should be executed with node on Windows):
|
||||
\ ale_linters#javascript#standard#GetExecutable(bufnr(''))
|
||||
|
||||
AssertEqual
|
||||
\ 'node ' . ale#Escape(b:executable) . ' --stdin %s',
|
||||
\ ale#Escape('node.exe') . ' ' . ale#Escape(b:executable) . ' --stdin %s',
|
||||
\ ale_linters#javascript#standard#GetCommand(bufnr(''))
|
||||
|
||||
Execute(The global executable should be used otherwise):
|
||||
|
||||
@@ -26,7 +26,7 @@ Execute(The eslint fixer with eslint.js should be run with node on Windows):
|
||||
AssertEqual
|
||||
\ {
|
||||
\ 'read_temporary_file': 1,
|
||||
\ 'command': 'node '
|
||||
\ 'command': ale#Escape('node.exe') . ' '
|
||||
\ . ale#Escape(simplify(g:dir . '/../eslint-test-files/react-app/node_modules/eslint/bin/eslint.js'))
|
||||
\ . ' --config ' . ale#Escape(simplify(g:dir . '/../eslint-test-files/react-app/.eslintrc.js'))
|
||||
\ . ' --fix %t',
|
||||
|
||||
@@ -25,7 +25,7 @@ Execute(The standard fixer with standard.js should be run with node on Windows):
|
||||
AssertEqual
|
||||
\ {
|
||||
\ 'read_temporary_file': 1,
|
||||
\ 'command': 'node '
|
||||
\ 'command': ale#Escape('node.exe') . ' '
|
||||
\ . ale#Escape(simplify(g:dir . '/../eslint-test-files/react-app/node_modules/standard/bin/cmd.js'))
|
||||
\ . ' --fix %t',
|
||||
\ },
|
||||
|
||||
@@ -25,7 +25,7 @@ Execute(The stylelint fixer with stylelint.js should be run with node on Windows
|
||||
AssertEqual
|
||||
\ {
|
||||
\ 'read_temporary_file': 1,
|
||||
\ 'command': 'node '
|
||||
\ 'command': ale#Escape('node.exe') . ' '
|
||||
\ . ale#Escape(simplify(g:dir . '/../eslint-test-files/react-app/node_modules/stylelint/bin/stylelint.js'))
|
||||
\ . ' --fix %t',
|
||||
\ },
|
||||
|
||||
@@ -58,7 +58,7 @@ Execute(eslint.js executables should be run with node on Windows):
|
||||
|
||||
" We have to execute the file with node.
|
||||
AssertEqual
|
||||
\ 'node '''
|
||||
\ . g:dir . '/eslint-test-files/react-app/node_modules/eslint/bin/eslint.js'
|
||||
\ . ''' -f unix --stdin --stdin-filename %s',
|
||||
\ ale#Escape('node.exe') . ' '
|
||||
\ . ale#Escape(g:dir . '/eslint-test-files/react-app/node_modules/eslint/bin/eslint.js')
|
||||
\ . ' -f unix --stdin --stdin-filename %s',
|
||||
\ ale#handlers#eslint#GetCommand(bufnr(''))
|
||||
|
||||
Reference in New Issue
Block a user