0

Tech stack: Vuejs + Nestjs IDE: WebStorm

When using WebStorm, the ESLint language service fails with the default .eslintrc.json files created by the Nx.dev repo manager. As soon as I remove the ignorePatterns from the config, WebStorm is happy.

I will admit that I do not know enough about eslint config files and I am curious about what negative side effects deleting the

"ignorePatterns": ["!**/*"],

from the nested .eslintrc.json files will cause.

Are there any other ways to fix this? It is annoying to have to go modify every config file in a subfolder.

This is the error that shows for every .ts file I view.

enter image description here

Meester Over
  • 161
  • 2
  • 13
  • what failures have you faced namely? ESLint works for me when using similar `"ignorePatterns"` entries – lena Nov 02 '20 at 14:21
  • Updating with an image. – Meester Over Nov 03 '20 at 15:14
  • please share a project the issue can be repeated with (or, at least, the full text of the error message that can be seen by clicking the *Details* link in the error balloon) – lena Nov 04 '20 at 12:00
  • @lena I did attempt to create a new nx workspace with the same problem, but I am unable to reproduce the error with creating anew. I will just run with the new one for now. – Meester Over Nov 05 '20 at 05:30
  • @lena I updloaded the project to Dropbox if you would like to grab it and take a look. Maybe it is a project config that is broken, but I am unsure. DL: https://www.dropbox.com/s/1hjs78zz46ogldg/societal.zip?dl=0 Repro Steps: Open Solution Navigate to ./societal/libs/common/util/src/lib/common-util.ts Open the file to view and notice the ESlint error at the top. – Meester Over Nov 05 '20 at 18:08
  • thanks, reproduced. Logs show that the service is successfully started, but then eslint execution fails as a result of configuration error (" workspace.json and nx.json are out of sync. "). You will face the same issue when running `yarn run lint` for your app in terrminal – lena Nov 06 '20 at 11:55

1 Answers1

0

Thanks to the help of @lena, I cleaned up the workspace.json.

I had removed several projects and reorganized, but only changed the nx.json file.

My problem is now resolved.

Meester Over
  • 161
  • 2
  • 13