Skip to content
This repository has been archived by the owner on Jan 19, 2019. It is now read-only.

How should the TypeScript package be installed? #264

Closed
j-f1 opened this issue Dec 23, 2018 · 3 comments
Closed

How should the TypeScript package be installed? #264

j-f1 opened this issue Dec 23, 2018 · 3 comments
Assignees
Labels
discussion issues that exist purely for discussion purposes documentation
Milestone

Comments

@j-f1
Copy link
Collaborator

j-f1 commented Dec 23, 2018

Repro

{
  "parserOptions": {
    "parser": "eslint-plugin-typescript/parser"
  }
}
// literally any code
it can be valid or invalid, doesn't matter

Expected Result
Linting passes

Actual Result

Parsing error: Cannot find module 'typescript'

Additional Info

I’ve only installed eslint-plugin-typescript.

Versions

package version
eslint-plugin-typescript bradzacher/eslint-plugin-typescript#4d85404
typescript-eslint-parser 21.0.2 (automatically installed)
typescript (not installed)

Should typescript be a peer dependency?

@weirdpattern
Copy link
Collaborator

I thought typescript was a hard dependency of typescript-eslint-parser, turns out is marked as a peer dependency... So yes, think we need it too

@armano2
Copy link
Contributor

armano2 commented Dec 23, 2018

peerDependency is fine, but hard dependency is bad, i'm using it with typescript 3.2.2 due to inifite loop issue in typescript~3.1 (build time with type checking is going down from 90sec to 6sec)

@bradzacher
Copy link
Owner

probably peer dependency is the best way to go.
plus update docs to indicate the required install of typescript.

@bradzacher bradzacher added documentation discussion issues that exist purely for discussion purposes labels Dec 24, 2018
@bradzacher bradzacher added this to the 1.0.0 milestone Dec 24, 2018
@j-f1 j-f1 self-assigned this Dec 24, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
discussion issues that exist purely for discussion purposes documentation
Projects
None yet
Development

No branches or pull requests

4 participants