Open tmnvanderberg opened 2 years ago
@tmnvanderberg I had the same issue in a monorepo project that had multiple different npm modules under subdirectories, but a single .eslintrc
file in a separate subdirectory that was symlinked from each npm module in each subdir.
I was able to resolve my problem of coc-eslint
looking for the eslint config in the root of the project by tweaking the "coc.preferences.rootPatterns"
coc-nvim config, as linked to by @chemzqm. I changed the value of this preference from [".git", ".hg", ".projections.json"]
to [".git", ".hg", ".projections.json", "package.json"]
.
Your situation is a bit different though.. you could try adding .eslintrc
to the rootPatterns
config but that might mess up other functionality, since technically the subdirs where your .eslintrc
files exist are not the root directory. So some other assumptions might fail with that.
I'm also struggling with it. @tmnvanderberg, did you find any solution after these months?
Hi Evan,
No unfortunately not, I stopped using coc-eslint end moved to neovim.
Our project requires different linting configurations for different folders
/src/
,/test/
, etc.When I place the
.eslintrc
file in the root folder of the project,coc-eslint
correctly uses my configuration. When I move it to/src/
it does not correctly lint files in/src/
.