2

I configured my project into pnpm workspace with :

|-node_modules
|-package.json (A)
|-eslintrc
|-app1
|   |-node_modules
|   |-package.json (B)
|   |-app.ts
|-app2
|   |-node_modules
|   |-package.json (C)
|   |-app.ts
|-packages
|   |-lib1
|   |   |-node_modules
|   |   |-package.json (D)
|   |   |-index.ts

In the global package.json (A), i have all the eslint, prettier and plugins dependencies.

When i use husky+lint-stage, i've got an error because eslint is run in subfolder and package.json (B)(C)(D) don't have eslint, prettier and plugins dependencies installed.

I saw that i can create a local package with global conf and install it on each project. But if i do that, my problem is IntelliJ. IntelliJ prettier config want only one prettier node_modules binary. But i am in a monorepo with 3 projects.

How can i use a global eslint conf and force eslint to use the global package.json as reference ? OR How can i configure the prettier conf in IntelliJ to use a global prettier ?

Best regards,

0 Answers0