Skip to content

Latest commit

 

History

History
35 lines (21 loc) · 1.58 KB

File metadata and controls

35 lines (21 loc) · 1.58 KB

repro-vim-ale-bin-fixers-extra-exec

This repo is to reproduce a bug I noticed while using the vim-ale plugin

Bug

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.

Test case

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:

image

I don't have a global prettier executable available:

image

Here the result of npm ls prettier in the project:

image

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.