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

testNext broken with typescript@3.8.0-dev.20191105 #4888

Closed
JoshuaKGoldberg opened this issue Nov 6, 2019 · 4 comments
Closed

testNext broken with typescript@3.8.0-dev.20191105 #4888

JoshuaKGoldberg opened this issue Nov 6, 2019 · 4 comments

Comments

@JoshuaKGoldberg
Copy link
Contributor

Example build failure: https://circleci.com/gh/palantir/tslint/18322?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link

The 'strict-boolean-expressions' rule threw an error in '/home/circleci/project/test/rules/strict-boolean-expressions/default/test.ts':
TypeError: Cannot read property 'length' of undefined
    at checkIdentifier (/home/circleci/project/node_modules/typescript/lib/typescript.js:51626:61)
    at checkExpressionWorker (/home/circleci/project/node_modules/typescript/lib/typescript.js:58332:28)
    at checkExpression (/home/circleci/project/node_modules/typescript/lib/typescript.js:58282:38)
    at getTypeOfExpression (/home/circleci/project/node_modules/typescript/lib/typescript.js:58258:58)
    at getRegularTypeOfExpression (/home/circleci/project/node_modules/typescript/lib/typescript.js:63839:48)
    at getTypeOfNode (/home/circleci/project/node_modules/typescript/lib/typescript.js:63750:24)
    at Object.getTypeAtLocation (/home/circleci/project/node_modules/typescript/lib/typescript.js:33354:31)
    at checkExpression (/home/circleci/project/build/src/rules/strictBooleanExpressionsRule.js:167:28)
    at cb (/home/circleci/project/build/src/rules/strictBooleanExpressionsRule.js:126:25)
    at visitNode (/home/circleci/project/node_modules/typescript/lib/typescript.js:17768:24)
test/rules/strict-boolean-expressions/default/test.ts.lint: Failed!
@piotrl
Copy link

piotrl commented Feb 19, 2020

We encounter the same for TypeScript 3.6.5 after we migrated to Angular 9.0.1.

  • MacOs and Linux
  • NodeJs 10.15 and 12.16

Different rule:

The 'no-redundant-jsdoc' rule threw an error in '/src/lib/dashboard.component.ts':
Error: Unexpected tag kind: JSDocAuthorTag

at checkTag (/node_modules/tslint/lib/rules/noRedundantJsdocRule.js:106:23)
at cb (/node_modules/tslint/lib/rules/noRedundantJsdocRule.js:62:25)
at Array.forEach (<anonymous>)
at walk (/node_modules/tslint/lib/rules/noRedundantJsdocRule.js:55:34)
at Rule.AbstractRule.applyWithFunction (/node_modules/tslint/lib/language/rule/abstractRule.js:39:9)
at Rule.apply (/node_modules/tslint/lib/rules/noRedundantJsdocRule.js:35:21)
at Linter.applyRule (/node_modules/tslint/lib/linter.js:214:29)
at /node_modules/tslint/lib/linter.js:155:85
at Object.flatMap (/node_modules/tslint/lib/utils.js:160:29)
at Linter.getAllFailures (/node_modules/tslint/lib/linter.js:155:32)

Affects also codelyzer:
mgechev/codelyzer#955

Note: After migration to 6.0.0 there are no exceptions, however 6.0.0 contains breaking changes that affects us heavily for member-ordering and import-ordering and we can't migrate in one shot.

Workaround: Disable no-redundant-jsdoc as its not crucial on 5.20.1 version to easier migration to TypeScript version.

@JoshuaKGoldberg
Copy link
Contributor Author

Per #4914 and the roadmap in #4534, accepting PRs to fix this issue.

(Apologies for removing the tag early - that was misleading and incorrect. This issue was left open intentionally.)

@JoshuaKGoldberg
Copy link
Contributor Author

This should have been fixed by #4915.

@JoshuaKGoldberg
Copy link
Contributor Author

🤖 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.
Projects
None yet
Development

No branches or pull requests

2 participants