You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just created a new turborepo using "pnpm dlx create-turbo@latest" then I created a new Nest.JS app inside the "apps" folder.
If I use "pnpm run lint" everything works fine.
The error comes when I try to follow the example called "with-nestjs" and I create a typescript configuration "nestjs.json" inside "typescript-config" package and extends it in my newly created Nest.JS app the same way it's done in the "with-nestjs" example. I get some eslint error in my untouched "ui" package which is not even used in my Nest.JS app.
My understanding of the error is that since Nest.JS doesn't already support ESLint v9, I have two different versions of it in my monorepo and it seems that the version 8.57.1 is used to lint the "ui" package but I don't really understand why.
Is the only option here to use ESLint v8 which is deprecated for my entire monorepo by starting a project from the example "with-nestjs" for instance?
PS: If you first run the "pnpm run lint" command before adding the Nest.JS app and then run it again after adding the app, you'll hit the cache and therefore won't see the error I am talking about
Additional information
TheerrorIgetforthe"ui"packagewhilerunning"pnpm run lint"fortheentire monorepo:
┌ @repo/ui#lint >cachemiss,executing01c18162af619d77│││> @repo/ui@0.0.0lint/home/bariglio/projects/nestjs-prisma-turborepo/packages/ui│>eslint.--max-warnings0│││Oops!Somethingwentwrong! :(││ESLint: 8.57.1││TypeError: Errorwhileloadingrule'@typescript-eslint/no-unused-expressions': Cannotreadpropertiesofundefined(reading'allowShortCircuit')│Occurredwhilelinting/home/bariglio/projects/nestjs-prisma-turborepo/packages/ui/eslint.config.js│atObject.create(/home/bariglio/projects/nestjs-prisma-turborepo/node_modules/.pnpm/eslint@9.15.0/node_modules/eslint/lib/rules/no-unused-expressions.js:75:13)│atcreate(/home/bariglio/projects/nestjs-prisma-turborepo/node_modules/.pnpm/@typescript-eslint+eslint-plugin@8.15.0_@typescript-eslint+parser@8.15.0_eslint@9.15.0_typesc_6md6xkytwl6qqd35xyc2ma4mh4│/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-expressions.js:30:32)│atObject.create(/home/bariglio/projects/nestjs-prisma-turborepo/node_modules/.pnpm/@typescript-eslint+utils@8.15.0_eslint@9.15.0_typescript@5.5.4/node_modules/@typescript-eslint/utils/dist/eslint-│utils/RuleCreator.js:31:20)│atcreateRuleListeners(/home/bariglio/projects/nestjs-prisma-turborepo/node_modules/.pnpm/eslint@8.57.1/node_modules/eslint/lib/linter/linter.js:895:21)│at/home/bariglio/projects/nestjs-prisma-turborepo/node_modules/.pnpm/eslint@8.57.1/node_modules/eslint/lib/linter/linter.js:1066:110│atArray.forEach(<anonymous>)
│ at runRules (/home/bariglio/projects/nestjs-prisma-turborepo/node_modules/.pnpm/eslint@8.57.1/node_modules/eslint/lib/linter/linter.js:1003:34)
│ at Linter._verifyWithFlatConfigArrayAndWithoutProcessors (/home/bariglio/projects/nestjs-prisma-turborepo/node_modules/.pnpm/eslint@8.57.1/node_modules/eslint/lib/linter/linter.js:1730:31)
│ at Linter._verifyWithFlatConfigArray (/home/bariglio/projects/nestjs-prisma-turborepo/node_modules/.pnpm/eslint@8.57.1/node_modules/eslint/lib/linter/linter.js:1861:21)
│ at Linter.verify (/home/bariglio/projects/nestjs-prisma-turborepo/node_modules/.pnpm/eslint@8.57.1/node_modules/eslint/lib/linter/linter.js:1433:65)
│ ELIFECYCLE Command failed with exit code 2.
│ command finished with error: command (/home/bariglio/projects/nestjs-prisma-turborepo/packages/ui) /usr/bin/pnpm run lint exited (2)
└────>
@repo/ui#lint: command(/home/bariglio/projects/nestjs-prisma-turborepo/packages/ui)/usr/bin/pnpmrunlintexited(2)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Summary
I just created a new turborepo using "pnpm dlx create-turbo@latest" then I created a new Nest.JS app inside the "apps" folder.
If I use "pnpm run lint" everything works fine.
The error comes when I try to follow the example called "with-nestjs" and I create a typescript configuration "nestjs.json" inside "typescript-config" package and extends it in my newly created Nest.JS app the same way it's done in the "with-nestjs" example. I get some eslint error in my untouched "ui" package which is not even used in my Nest.JS app.
My understanding of the error is that since Nest.JS doesn't already support ESLint v9, I have two different versions of it in my monorepo and it seems that the version 8.57.1 is used to lint the "ui" package but I don't really understand why.
Is the only option here to use ESLint v8 which is deprecated for my entire monorepo by starting a project from the example "with-nestjs" for instance?
PS: If you first run the "pnpm run lint" command before adding the Nest.JS app and then run it again after adding the app, you'll hit the cache and therefore won't see the error I am talking about
Additional information
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions