The bug occurs when you use this vim-ale
plugin configuration:
let g:ale_fixers = {
\ 'javascript': ['prettier'],
\}
In a JS project, if you have the configuration above while one of your dependency have a dependency on a fixer you defined in your Vim configuration but that is not directly a dependency of your own project it is still getting run even though that's not your project configuration. I'd expect vim-ale
to run only the enabled fixers that are present but also that are either available globally in your system or mentioned in your package.json
dependencies.
I included a test file in this project: index.js
. If you open this file with a vim instance using the above configuration and run :ALEFix
the content of the file will be fixed to:
I don't have a global prettier
executable available:
Here the result of npm ls prettier
in the project:
For this case I would expect vim-ale
to not fix the file since no prettier
executable are intentionally added to the project or globally available.