Neomake: Question: use project .eslintrc if exists, otherwise something else?

Created on 25 Sep 2015  Â·  3Comments  Â·  Source: neomake/neomake

With Synatastic, it’s possible to use eslint with an .eslintrc if it exists in the current or parent director(y/ies), and if not, revert to some other linter (e.g. Standard) (see this issue).

Is this possible to do with Neomake? I’ve read through the docs to check, but to be honest I’m still a little new to customising plugins in Vim/NeoVim.

Thanks in advance!

Most helpful comment

This just requires a small change to the suggestion in the linked syntastic issue:

if findfile('.eslintrc', '.;') ==# ''
    let g:neomake_javascript_enabled_makers = ['standard']
endif

See :h g:neomake_<ft>_enabled_makers for the docs on that config variable.

Edit: A handful of updates to make it more terse. Since eslint is enabled by default, you just have to set the enabled makers for javascript to a list that doesn't include eslint to disable it.

All 3 comments

This just requires a small change to the suggestion in the linked syntastic issue:

if findfile('.eslintrc', '.;') ==# ''
    let g:neomake_javascript_enabled_makers = ['standard']
endif

See :h g:neomake_<ft>_enabled_makers for the docs on that config variable.

Edit: A handful of updates to make it more terse. Since eslint is enabled by default, you just have to set the enabled makers for javascript to a list that doesn't include eslint to disable it.

Perfect! Thanks a ton, @benekastah — and for your work on Neomake.

You're welcome :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dolohow picture dolohow  Â·  5Comments

cideM picture cideM  Â·  6Comments

iwyg picture iwyg  Â·  6Comments

cycomanic picture cycomanic  Â·  3Comments

dj-foxxy picture dj-foxxy  Â·  7Comments