Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add info about @typescript-eslint/eslint-plugin #311

Merged
merged 2 commits into from Jul 30, 2019
Merged

Conversation

larixer
Copy link
Member

@larixer larixer commented Jul 30, 2019

No description provided.

@arcanis arcanis merged commit 1d793a4 into master Jul 30, 2019
@arcanis arcanis deleted the vlasenko-patch-1 branch July 30, 2019 11:18
@dstaley
Copy link
Contributor

dstaley commented Sep 18, 2019

I'm sorry, but the instructions added here are a bit confusing.

I've adjusted my yarn.lock file to declare typescript as a peer dependency for @typescript-eslint/eslint-plugin.

This is the relevant section from my yarn.lock.

"@typescript-eslint/eslint-plugin@npm:1.13.0":
  version: 1.13.0
  resolution: "@typescript-eslint/eslint-plugin@npm:1.13.0"
  dependencies:
    "@typescript-eslint/experimental-utils": "npm:1.13.0"
    eslint-utils: "npm:^1.3.1"
    functional-red-black-tree: "npm:^1.0.1"
    regexpp: "npm:^2.0.1"
    tsutils: "npm:^3.7.0"
  peerDependencies:
    "@typescript-eslint/parser": ^1.9.0
    eslint: ^5.0.0
    typescript: "*"
  checksum: 0a8951d85b66f697818020b3e816b53afda8e59da7a2159c0ec71f03b3ea9fdb5776ed34016750c49f02480715cd6f573e9b896fc37732$
  languageName: node
  linkType: hard

And this is the error I'm getting:

Error: Failed to load plugin '@typescript-eslint' declared in 'BaseConfig » /veetwotest/.yarn/virtual/eslint-config-react-app-virtual-1187844f75/0/cache/eslint-config-react-app-npm-5.0.1-e1c792f6bb.zip/node_modules/eslint-config-react-app/index.js#overrides[0]': A package is trying to access a peer dependency that should be provided by its direct ancestor but isn't

Required package: typescript (via "typescript")
Required by: tsutils@virtual:e036674f4594d3e24477dfb679ef8a699fb5f1b7d8d7b042a72c4151863be50dcf3a4a21bb1f038da9e93ad7aabe5fa4660ad99186a89cbafa046b19bb23ad0a#npm:3.17.1 (via /veetwotest/.yarn/virtual/tsutils-virtual-7942243fde/0/cache/tsutils-npm-3.17.1-252d0d45ff.zip/node_modules/tsutils/typeguard/2.8/node.js)

Am I modifying my lockfile incorrectly?

@arcanis
Copy link
Member

arcanis commented Sep 19, 2019

This is the error:

A package is trying to access a peer dependency that should be provided by its direct ancestor but isn't

Required package: typescript (via "typescript")
Required by: tsutils@virtual:e036674f4594d3e24477dfb679ef8a699fb5f1b7d8d7b042a72c4151863be50dcf3a4a21bb1f038da9e93ad7aabe5fa4660ad99186a89cbafa046b19bb23ad0a#npm:3.17.1 (via /veetwotest/.yarn/virtual/tsutils-virtual-7942243fde/0/cache/tsutils-npm-3.17.1-252d0d45ff.zip/node_modules/tsutils/typeguard/2.8/node.js)

That means that tsutils has a peer dependency on typescript, but whoever is depending on it doesn't provide it. To figure out which dependency it is you can look in the lockfile for everyone that depends on tsutils, and see which one doesn't depend on typescript as well (would be nice to improve the error message to directly report this information).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants