'How to configure WebStorm to work with nx lint instead of ESLint?

When working on nx projects with WebStorm (and probably with other JetBrains IDEs) I keep getting this error:

Error: Error while loading rule '@typescript-eslint/await-thenable': You have used a rule which requires parserServices to be generated. You must therefore provide a value for the "parserOptions.project" property for @typescript-eslint/parser.

I do have the parserOptions.project defined in the libs/mylibrary/.eslintrs.json:

{
  "extends": ["../../.eslintrc"],
  "parserOptions": {
    "project": "./tsconfig.*?.json",
    "tsconfigRootDir": "./libs/mylibrary"
  },
  ...

The error does not reproduce when I run ESLint manually, via npx eslint ./libs/mylibrary or via nx (nx lint mylibrary).

Any idea how to configure WebStorm to work well with nx lint?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source