Automatically use eslint_d for eslint, when available
This commit is contained in:
0
test/eslint-test-files/app-with-eslint-d/node_modules/.bin/eslint_d
generated
vendored
Normal file
0
test/eslint-test-files/app-with-eslint-d/node_modules/.bin/eslint_d
generated
vendored
Normal file
@@ -16,7 +16,7 @@ After:
|
||||
call ale#linter#Reset()
|
||||
|
||||
Execute(create-react-app directories should be detected correctly):
|
||||
new eslint-test-files/react-app/subdir/testfile.js
|
||||
silent noautocmd new eslint-test-files/react-app/subdir/testfile.js
|
||||
|
||||
AssertEqual
|
||||
\ g:dir . '/eslint-test-files/react-app/node_modules/eslint/bin/eslint.js',
|
||||
@@ -27,7 +27,7 @@ Execute(create-react-app directories should be detected correctly):
|
||||
Execute(use-global should override create-react-app detection):
|
||||
let g:ale_javascript_eslint_use_global = 1
|
||||
|
||||
new eslint-test-files/react-app/subdir/testfile.js
|
||||
silent noautocmd new eslint-test-files/react-app/subdir/testfile.js
|
||||
|
||||
AssertEqual
|
||||
\ 'eslint_d',
|
||||
@@ -36,7 +36,7 @@ Execute(use-global should override create-react-app detection):
|
||||
:q
|
||||
|
||||
Execute(other app directories should be detected correctly):
|
||||
new eslint-test-files/other-app/subdir/testfile.js
|
||||
silent noautocmd new eslint-test-files/other-app/subdir/testfile.js
|
||||
|
||||
AssertEqual
|
||||
\ g:dir . '/eslint-test-files/node_modules/.bin/eslint',
|
||||
@@ -47,10 +47,19 @@ Execute(other app directories should be detected correctly):
|
||||
Execute(use-global should override other app directories):
|
||||
let g:ale_javascript_eslint_use_global = 1
|
||||
|
||||
new eslint-test-files/other-app/subdir/testfile.js
|
||||
silent noautocmd new eslint-test-files/other-app/subdir/testfile.js
|
||||
|
||||
AssertEqual
|
||||
\ 'eslint_d',
|
||||
\ ale#handlers#eslint#GetExecutable(bufnr(''))
|
||||
|
||||
:q
|
||||
|
||||
Execute(eslint_d should be detected correctly):
|
||||
silent noautocmd new eslint-test-files/app-with-eslint-d/testfile.js
|
||||
|
||||
AssertEqual
|
||||
\ g:dir . '/eslint-test-files/app-with-eslint-d/node_modules/.bin/eslint_d',
|
||||
\ ale#handlers#eslint#GetExecutable(bufnr(''))
|
||||
|
||||
:q
|
||||
|
||||
Reference in New Issue
Block a user