Skip to content

Commit

Permalink
fix: eslint config file parseOptions.project path is updated (#1008)
Browse files Browse the repository at this point in the history
I found out that the problem of slow down is the use of
parseOption.project with multiple tsconfig files which increases usage
of memory consumption quite a lot.

Here is the reference I found to resolve this issue:

[reference
link](typescript-eslint/typescript-eslint#1192)
[Doc
link](https://typescript-eslint.io/getting-started/typed-linting/monorepos/)

Based on this reference I created the solution and tested out locally it
does reduce the eslint time.

#1002
  • Loading branch information
Mythie committed Mar 10, 2024
2 parents c3c00df + 3b5f8d1 commit 373e806
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/eslint-config/index.cjs
Expand Up @@ -20,7 +20,7 @@ module.exports = {

parserOptions: {
tsconfigRootDir: __dirname,
project: ['../../apps/*/tsconfig.json', '../../packages/*/tsconfig.json'],
project: ['../../tsconfig.eslint.json'],
ecmaVersion: 2022,
ecmaFeatures: {
jsx: true,
Expand Down
4 changes: 4 additions & 0 deletions tsconfig.eslint.json
@@ -0,0 +1,4 @@
{
"extends": "./packages/tsconfig/base.json",
"include": ["packages/**/*", "apps/**/*"]
}

0 comments on commit 373e806

Please sign in to comment.