ESLint with multiple configuration in monorepo

Hey Codacy Team,
while we use Codacy for .NET projects in our company we have problems with our particular setup of NodeJs solution where we have front and backend modules separate but kept in one source code repository. The applicable rules are not the same for those and we are hence blocked on leveraging from the platform for these projects (each has its own .eslintrc). We’ve discussed this with support quite long ago and there were no plans to tackle it back then. But it was over 1yr ago, so we figured it would be worth asking if something has changed in this regard or if you see any workarounds we could employ.

Best regards,
Marcin

Hi @merdacz,
Thanks for sharing your issue here.

our particular setup of NodeJs solution where we have front and backend modules separate but kept in one source code repository. The applicable rules are not the same for those (…) (each has its own .eslintrc)

If I’m interpreting your use case correctly, this should be supported. I’ve tried replicating this behavior with a simple example repository.
In this case, Codacy was able to successfully pick up both configuration files automatically, and report different issues for each configuration.

If I missed something can you let me know how your setup differs from the example? :sweat_smile:

2 Likes

This is interesting. Consulted with tech lead on the project and the difference might be due to using some private repository rules as well which Codacy wouldn’t see (requires customization of .npmrc). We will look into this a bit more and I will let you know.

2 Likes

Indeed we use a private registry that holds a multitude of different eslint and prettier configs (separate for pure JS, TS, backend, frontend and then some more). Does Codacy support providing a custom .npmrc file, or is this somewhere on the roadmap?