question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Typescript peer dependency should not be needed

See original GitHub issue

I would like to use this plugin in a project without any typescript, why does it have a peer dependency? Going from 23.0.1 to 23.0.2 seems to have added this for me.

β”œβ”€β”¬ eslint-plugin-jest@23.0.1
β”‚ └─┬ @typescript-eslint/experimental-utils@2.5.0
β”‚   β”œβ”€β”€ @types/json-schema@7.0.3
β”‚   β”œβ”€β”¬ @typescript-eslint/typescript-estree@2.5.0
β”‚   β”‚ β”œβ”€β”¬ debug@4.1.1
β”‚   β”‚ β”‚ └── ms@2.1.2
β”‚   β”‚ β”œβ”€β”€ glob@7.1.4 deduped
β”‚   β”‚ β”œβ”€β”€ is-glob@4.0.1 deduped
β”‚   β”‚ β”œβ”€β”€ lodash.unescape@4.0.1
β”‚   β”‚ └── semver@6.3.0 deduped
β”‚   └── eslint-scope@5.0.0 deduped
β”œβ”€β”¬ eslint-plugin-jest@23.0.2
β”‚ └─┬ @typescript-eslint/experimental-utils@2.6.1
β”‚   β”œβ”€β”€ @types/json-schema@7.0.3
β”‚   β”œβ”€β”¬ @typescript-eslint/typescript-estree@2.6.1
β”‚   β”‚ β”œβ”€β”¬ debug@4.1.1
β”‚   β”‚ β”‚ └── ms@2.1.2
β”‚   β”‚ β”œβ”€β”€ glob@7.1.5 deduped
β”‚   β”‚ β”œβ”€β”€ is-glob@4.0.1 deduped
β”‚   β”‚ β”œβ”€β”€ lodash.unescape@4.0.1
β”‚   β”‚ β”œβ”€β”€ semver@6.3.0
β”‚   β”‚ β”œβ”€β”¬ tsutils@3.17.1
β”‚   β”‚ β”‚ └── tslib@1.10.0 deduped
β”‚   β”‚ └── UNMET PEER DEPENDENCY typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:5
  • Comments:15 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
vieiracommented, Jan 22, 2020

@SimenB Would moving @typescript-eslint/experimental-utils from dependencies to devDependencies as @MatteoGabriele suggested solve it?

I understand that it is safe to ignore this particular warning, however I am afraid that if we start having this kind of β€œsafe” warnings people will simply start to ignore all warnings, so I would like to avoid them if possible.

3reactions
vieiracommented, Nov 20, 2019

Hello,

This also produces a warning with yarn (1.19.1) which I would like to avoid without adding a dependency to typescript.

warning "eslint-plugin-jest > @typescript-eslint/experimental-utils > @typescript-eslint/typescript-estree > tsutils@3.17.1" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".

Read more comments on GitHub >

github_iconTop Results From Across the Web

A tip on using peer dependencies with TypeScript
To address this, the simplest solution I've found is to duplicate that dependency over to "devDependencies". Doing this makes sure that it isΒ ......
Read more >
Understanding Peer Dependencies in JavaScript
Peer dependencies are a must-know feature that many developers overlook ... such as React and React-dom are required, just not installed.
Read more >
Should I duplicate "peerDependencies" in "dependencies ...
"If more than one package require another package in common but at different versions, NPM will install multiple copies, for each one of...
Read more >
package.json - npm Docs
When a user installs your package, npm will emit warnings if packages specified in peerDependencies are not already installed. The peerDependenciesMeta fieldΒ ...
Read more >
you must install peer dependencies yourself Code Example
npm WARN codelyzer@6.0.1 requires a peer of tslint@^5.0.0 || ^6.0.0 but none is installed. You must install peer dependencies yourself. typescript by devopsΒ ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found