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

no-angle-bracket-type-assertion: fixed replacement order and add parens #3301

Merged
merged 1 commit into from Oct 20, 2017
Merged

no-angle-bracket-type-assertion: fixed replacement order and add parens #3301

merged 1 commit into from Oct 20, 2017

Conversation

ajafff
Copy link
Contributor

@ajafff ajafff commented Oct 8, 2017

PR checklist

Overview of change:

Only add one failure for nested assertions and fix them all together.
[bugfix] no-angle-bracket-type-assertion fixed order when autofixing consecutive assertions
Fixes: #2957
[bugfix] no-angle-bracket-type-assertion fixer adds parentheses when necessary
Fixes: #2955

Is there anything you'd like reviewers to focus on?

It's very weird that the tests didn't fail all the time.

var b = <number><any>5;
// before it was fixed to
var b = 5 as number as any;
// now it is fixed to
var b = 5 as any as number; // this line was always in the `.fix` file

Only some specific changes to test.ts.lint caused the test to fail at this line. The offending line stayed unchanged all the time ...
#2957 (comment)

CHANGELOG.md entry:

... and add parens when necessary

Fixes: #2957
Fixes: #2955
@adidahiya adidahiya merged commit e599184 into palantir:master Oct 20, 2017
HyphnKnight pushed a commit to HyphnKnight/tslint that referenced this pull request Apr 9, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants