Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

TSLint 6.1 requires TS 3.8 to compile #4929

Closed
adidahiya opened this issue Apr 22, 2020 · 4 comments · Fixed by #4933
Closed

TSLint 6.1 requires TS 3.8 to compile #4929

adidahiya opened this issue Apr 22, 2020 · 4 comments · Fixed by #4933

Comments

@adidahiya
Copy link
Contributor

adidahiya commented Apr 22, 2020

unintentional breaking change caused by #4915

ts.PrivateIdentifier should not be referenced as a type because it leads to build failures like this in TS 3.7:

$ tsc -p ./src

../../node_modules/tslint/lib/language/utils.d.ts:159:72 - error TS2694: Namespace 'ts' has no exported member 'PrivateIdentifier'.

159 export declare function isPrivateIdentifier(node: ts.Node): node is ts.PrivateIdentifier;

                                                                           ~~~~~~~~~~~~~~~~~

https://app.circleci.com/pipelines/github/palantir/blueprint/30/workflows/8eef41b7-2728-43c5-9121-70a3105bace4/jobs/31261/parallel-runs/0/steps/0-104

@JoshuaKGoldberg
Copy link
Contributor

Interesting. Maybe we should add a CI build task that type-checks the lib .d.ts files to avoid this in the future?

@rrdelaney
Copy link
Contributor

Should it be possible to build TSLint with older TypeScript versions? My assumptions with #4915 was that TSLint should run against older versions, but being built with the latest was OK.

@JoshuaKGoldberg
Copy link
Contributor

JoshuaKGoldberg commented Apr 26, 2020

Ah, the issue here is that if someone is running tsc in an earlier version than 3.8 on a repository that includes tslint in its node-modules/, the ts.PrivateIdentifier will break type checking.

I didn't consider this when reviewing the PR and can send a quick fix to move the isPrivateIdentifier function into the file it's used.

For folks reading this issue, you could also enable TypeScript's --skipLibCheck to disable these errors. But we'll release a new version so you don't have to. 👍

@JoshuaKGoldberg JoshuaKGoldberg changed the title TSLint 6.1 requires TS 3.8 TSLint 6.1 requires TS 3.8 to compile Apr 26, 2020
@JoshuaKGoldberg
Copy link
Contributor

🤖 Beep boop! 👉 TSLint is deprecated 👈 and you should switch to typescript-eslint! 🤖

🔒 This issue is being locked to prevent further unnecessary discussions. Thank you! 👋

@palantir palantir locked and limited conversation to collaborators Sep 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants