Replies: 1 comment 2 replies
-
The easiest thing to do right now is to have a config in each package directory, and then have a root config that reads in each of the package-specific configs. We are working on changing the lookup to work more like eslintrc: |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've been busy migrating a monorepo to ESLint 9, where each of the monorepo packages had its own eslint config. That is still the case in the new setup and everything works fine, except when I want to lint the entire monorepo with one command (e.g. for linting all staged files).
ESLint <=8 picked the most appropriate config file for each linted file, but with ESLint 9 that no longer seems the case, and it seems to expect a single config file.
I definitely do not want to do that - the config for each monorepo package should be its own responsibility, and I should not have to install all package linting deps at the root level just so I can have a single config. Not only that, but each package might have a different version of the same linting dep (e.g. different versions of an eslint plugin).
How would you suggest dealing with this problem? I've been trying to create a special eslint config that imports all of the other ones and merges them together, but that hasn't been working very well. I'm not aware of any special merging utilities, and the manual low-level merging I've been doing doesn't work well because of having to adjust all of the glob patterns and mismatched eslint plugin versions (or them not being available at root level)
Beta Was this translation helpful? Give feedback.
All reactions