#988 Take --fix-dry-run away again, because it is dumb
This commit is contained in:
parent
b5ec1a5fd0
commit
6e65998ca7
@ -32,14 +32,6 @@ function! ale#fixers#eslint#ApplyFixForVersion(buffer, version_output) abort
|
|||||||
\}
|
\}
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" 4.9.0 is the first version with --fix-dry-run
|
|
||||||
if ale#semver#GTE(l:version, [4, 9, 0])
|
|
||||||
return {
|
|
||||||
\ 'command': ale#node#Executable(a:buffer, l:executable)
|
|
||||||
\ . ' --stdin-filename %s --stdin --fix-dry-run',
|
|
||||||
\}
|
|
||||||
endif
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
\ 'command': ale#node#Executable(a:buffer, l:executable)
|
\ 'command': ale#node#Executable(a:buffer, l:executable)
|
||||||
\ . ' -c ' . ale#Escape(l:config)
|
\ . ' -c ' . ale#Escape(l:config)
|
||||||
|
@ -69,17 +69,6 @@ Execute(The version check should be correct):
|
|||||||
\ },
|
\ },
|
||||||
\ ale#fixers#eslint#Fix(bufnr(''))
|
\ ale#fixers#eslint#Fix(bufnr(''))
|
||||||
|
|
||||||
Execute(--fix-dry-run should be used for 4.9.0 and up):
|
|
||||||
call ale#test#SetFilename('../eslint-test-files/react-app/subdir/testfile.js')
|
|
||||||
|
|
||||||
AssertEqual
|
|
||||||
\ {
|
|
||||||
\ 'command': (has('win32') ? 'node.exe ' : '')
|
|
||||||
\ . ale#Escape(ale#path#Winify(g:dir . '/../eslint-test-files/react-app/node_modules/eslint/bin/eslint.js'))
|
|
||||||
\ . ' --stdin-filename %s --stdin --fix-dry-run',
|
|
||||||
\ },
|
|
||||||
\ ale#fixers#eslint#ApplyFixForVersion(bufnr(''), ['4.9.0'])
|
|
||||||
|
|
||||||
Execute(--fix-to-stdout should be used for eslint_d):
|
Execute(--fix-to-stdout should be used for eslint_d):
|
||||||
call ale#test#SetFilename('../eslint-test-files/app-with-eslint-d/testfile.js')
|
call ale#test#SetFilename('../eslint-test-files/app-with-eslint-d/testfile.js')
|
||||||
|
|
||||||
@ -125,12 +114,3 @@ Execute(The version number should be cached):
|
|||||||
\ 'command': '',
|
\ 'command': '',
|
||||||
\ },
|
\ },
|
||||||
\ ale#fixers#eslint#Fix(bufnr(''))
|
\ ale#fixers#eslint#Fix(bufnr(''))
|
||||||
|
|
||||||
" Call it again without the version output. We should use the newer command.
|
|
||||||
AssertEqual
|
|
||||||
\ {
|
|
||||||
\ 'command': (has('win32') ? 'node.exe ' : '')
|
|
||||||
\ . ale#Escape(ale#path#Winify(g:dir . '/../eslint-test-files/react-app/node_modules/eslint/bin/eslint.js'))
|
|
||||||
\ . ' --stdin-filename %s --stdin --fix-dry-run',
|
|
||||||
\ },
|
|
||||||
\ ale#fixers#eslint#ApplyFixForVersion(bufnr(''), [])
|
|
||||||
|
Loading…
Reference in New Issue
Block a user