All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@git.madduck.net.
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
2 call ale#assert#SetUpFixerTest('javascript', 'prettier_eslint')
3 Save g:ale_command_wrapper
5 let g:ale_command_wrapper = ''
8 call ale#assert#TearDownFixerTest()
10 Execute(The default command should be correct):
13 \ 'read_temporary_file': 1,
15 \ ale#Escape('prettier-eslint')
20 Execute(Additional options should be used when set):
21 let b:ale_javascript_prettier_eslint_options = '--foobar'
25 \ 'read_temporary_file': 1,
27 \ ale#Escape('prettier-eslint')
29 \ . ' --foobar --write'
32 Execute(--eslint-config-path should be set for 4.2.0 and up):
33 call ale#test#SetFilename('../test-files/eslint/react-app/foo/bar.js')
35 GivenCommandOutput ['4.2.0']
38 \ 'read_temporary_file': 1,
40 \ ale#Escape('prettier-eslint')
42 \ . ' --eslint-config-path ' . ale#Escape(ale#test#GetFilename('../test-files/eslint/react-app/.eslintrc.js'))
46 Execute(--eslint-config-path shouldn't be used for older versions):
47 call ale#test#SetFilename('../test-files/eslint/react-app/foo/bar.js')
51 \ 'read_temporary_file': 1,
53 \ ale#Escape('prettier-eslint')
58 Execute(The version check should be correct):
60 \ ale#Escape('prettier-eslint') . ' --version',
62 \ 'read_temporary_file': 1,
64 \ ale#Escape('prettier-eslint')
70 Execute(The new --stdin-filepath option should be used when the version is new enough):
71 call ale#test#SetFilename('../test-files/eslint/react-app/foo/bar.js')
73 GivenCommandOutput ['4.4.0']
77 \ 'command': ale#Escape('prettier-eslint')
78 \ . ' --eslint-config-path ' . ale#Escape(ale#test#GetFilename('../test-files/eslint/react-app/.eslintrc.js'))
79 \ . ' --stdin-filepath %s --stdin',
82 Execute(The version number should be cached):
83 GivenCommandOutput ['4.4.0']
87 \ 'command': ale#Escape('prettier-eslint')
88 \ . ' --stdin-filepath %s --stdin',
95 \ 'command': ale#Escape('prettier-eslint')
96 \ . ' --stdin-filepath %s --stdin',