Skip to content

Improve extension in a Multi repository setup with Lerna. #745

@lukejagodzinski

Description

@lukejagodzinski

I'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

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature-requestRequest for new features or functionalityhelp wantedIssues identified as good community contribution opportunities

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions