Improve extension in a Multi repository setup with Lerna.
See original GitHub issueI’ve tried everything to make this work with mono repositories but nothing helps. My eslint config works when run from command line but it fails to work in vsc.
Here is my directories structure:
web - root directory
web/package.json - all the eslint packages are added here
web/.eslintrc - main eslint config
web/packages/a/.eslintrc - eslint config that extends .eslintrc from the root
web/packages/a/tsconfig.json - TS config
When I run eslinter from command line everything works perfectly but in the vsc I constantly see error that tsconfig.json
file can’t be found in the web
directory. It’s pretty annoying as it should look for the file in each sub package. It works in eslint cli, so don’t know why it doesn’t work in vsc.
I’ve also tried changing settings:
{
"eslint.enable": true,
"eslint.packageManager": "yarn",
"eslint.workingDirectories": [
{
"directory": "./packages/a",
"changeProcessCWD": true
},
{
"directory": "./packages/b",
"changeProcessCWD": true
}
]
}
and then it works but it’s far from perfect as I would like to use something like glob pattern and I can’t in the directory
property. I guess that it would also take the first tsconfig.json
file that it finds in this directories which doesn’t necessary mean the one that is dedicated for a given sub package
Issue Analytics
- State:
- Created 4 years ago
- Reactions:8
- Comments:12 (6 by maintainers)
Top GitHub Comments
There is a new version (Insider testing) that addresses this is two ways:
The version can be found here: https://github.com/microsoft/vscode-eslint/issues/815
Now available in 2.0.4. See new auto mode a glob pattern support for working directories.