In a monorepo setup (for example one that uses lerna or yarn workspaces) commands are run with the CWD of the command being that of the package they are running in. For examle,
yarn workspace my-lib run eslint # equivalent to `cd my-lib; yarn run eslint`
yarn run lerna run eslint # equivalent to `cd my-lib; yarn run eslint`, for each workspace
When running ESLint, the dir it's being run from can impact how the configuration is interpreted (for example, rules related to TS which might require specifying the location of `tsconfig.json` or rules related to imports, such as `import/no-extraneous-dependencies` which requries specifying the location of `package.json`)
How can I tell WebStorm to run ESLint from within the packages, like lerna or yarn does, instead of the project root dir?
The VS Code extension for ESLint has a setting for specifying the CWD of ESLint called `eslint.workingDirectories` (it even has an auto feature). Is there a similar setting for WebStorm?