best ts eslint setup for large monorepo? #8506
Replies: 1 comment 4 replies
-
Context: in my day job work on a repo with >90k TS files. At that scale it's unfortunately a physical impossibility to use the ESLint CLI out-of-the-box.
You can make it all work - however you will need to build out some infra based on your company's setup. For example you can build a layer on top of ESLint that runs each "package" in its own thread to isolate it and its memory from one another. At Canva we don't use type-aware linting from the CLI because our repo doesn't have a nice "package" structure that would lend itself to clean isolation across threads. Instead we lint our files by roughly partitioning files across We do have some type-aware lint rules turned on via a custom TypeScript Language Server Plugin whose code is forked from this project. But we don't enforce type-aware rules at CI/CLI lint time. |
Beta Was this translation helpful? Give feedback.
-
Our monorepo is quite massive, and I wanted to share some statistics from the tsc to give you an idea of the scale:
To ensure code quality, I've been exploring options for linting within our monorepo. I've referred to the documentation (link), but I still have a few questions.
Since each package has its own compilerOptions, I'm unsure about the configuration details. Can someone provide guidance on the compilerOptions for the root tsconfig.eslint.json file?
It is helpful if we have enabled EXPERIMENTAL_useProjectService?
Beta Was this translation helpful? Give feedback.
All reactions