Skip to content

Yarn 2 Plug'n'Play recognition based on location of parser package, rather than file being linted #3293

@WesCossick

Description

@WesCossick
  • I have tried restarting my IDE and the issue persists.
  • I have updated to the latest version of the packages.
  • I have read the FAQ and my problem is not listed.

Repro

https://github.com/WesCossick/demonstrate-typescript-eslint-bug

Expected Result

For the @typescript-eslint/parser package to recognize that the project-to-lint/ directory is using Yarn 2 with Plug'n'Play.

Actual Result

The @typescript-eslint/parser package is assuming that, since it is located in a directory that's using Yarn 1, that the project-to-lint/ directory is also using Yarn 1. Therefore, it can't seem to find any imports, because presumably, it's looking for a node_modules/ directory, which doesn't exist.

Additional Info

Using Node.js API, which doesn't offer --debug flag or equivalent option.

Versions

package version
@typescript-eslint/parser 4.22.0
TypeScript 4.2.4
ESLint 7.24.0
node 14.16.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    awaiting responseIssues waiting for a reply from the OP or another partypackage: parserIssues related to @typescript-eslint/parser

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions