Closed darcyparker closed 3 years ago
I know there is a related pattern of using
let g:syntastic_javascript_eslint_exec = 'eslintLocal.sh'
to choose which eslint
executable to use... and there is also plugins like https://github.com/jaawerth/nrun.vim
The solution I am looking for is similar, but doesn't just choose the executable, but the list of checkers to use based on the script.
I take it this is a feature request. Now, syntastic is a framework for linting. Changing variables / settings / whatever based on repository is an exercise in general Vim scripting (f.i. you can achieve this with a single autocmd
). If you can think of a nice user interface for it, it might make an interesting idea for a separate plugin. But as it is it has nothing to do with syntastic or its scope, sorry.
@lcd047 - Yes it was a feature request. Thanks for the suggestion of trying this with a single autocmd
; that helps and I think I can figure that out.
As an example, many repos with javascript and typescript use different linters. But it is not intended to use all possible linters.
Today I can do something like:
and it runs each of the checkers listed. But the problem is that I get errors from
eslint
that do not apply to projects configured withxo
and vice versa...Projects that use xo have configuration files such as
.xo-config.json
,.xo-config.js
orxo.config.js
, orxo
property inpackage.json
. In this case, I only want to usexo
and NOTeslint
(unless for some reason there was an eslint configuration file in the root dir of repo). (Yesxo
is based oneslint
, but it hides the configuration... and if you runeslint
it does not find its configuration results and you get inappropriate validation errors.)Similarly, projects with
eslint
configuration files I want to useeslint
.I'd like to configure checkers using:
Perhaps this can be done already today, and I just need a pointer to some documentation/examples? If not, it would be great if the option could be something like (I am open to other ideas too...):