Skip to content

Conversation

@Veetaha
Copy link
Contributor

@Veetaha Veetaha commented Feb 24, 2020

https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unnecessary-type-assertion.md

I fact this rule doesn't work when you put an unnecessary non-null assertion in an expression (as we had (awat f())!, but it is useful in other cases...

Closes #3295, i guess...

@Veetaha Veetaha changed the title Feature/refactoring vscode ext Refactoring fetchArtifactReleaseInfo() Feb 24, 2020
@Veetaha Veetaha requested review from lnicola and matklad February 24, 2020 19:26
const artifact = release.assets.find(artifact => artifact.name === artifactFileName);

if (!artifact) return null;
if (!artifact) throw new Error(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add {} here: I find that a good rule of thumb is to omit {} iff the body fits on the same line as the condtion

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought we merge optimistically, but yes, you are right 😅 )

@Veetaha Veetaha requested a review from matklad February 24, 2020 23:58
@matklad
Copy link
Contributor

matklad commented Feb 25, 2020

bors r+

@bors
Copy link
Contributor

bors bot commented Feb 25, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants