Skip to content

Prefer const lint rule & fixes#5531

Merged
weswigham merged 4 commits into
microsoft:masterfrom
weswigham:prefer-const
Nov 5, 2015
Merged

Prefer const lint rule & fixes#5531
weswigham merged 4 commits into
microsoft:masterfrom
weswigham:prefer-const

Conversation

@weswigham
Copy link
Copy Markdown
Member

Prefers const over let when the declared variable never appears on the left hand side of an assignment.

Comment thread scripts/tslint/preferConstRule.ts Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

let

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

curious why you call the super.visitBinaryExpression after ? or it doesn't matter?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I want my logic to occur before we decend into the expression.

@DanielRosenwasser
Copy link
Copy Markdown
Member

Other than @yuit's comment about the for..of, 👍

weswigham added a commit that referenced this pull request Nov 5, 2015
Prefer const lint rule & fixes
@weswigham weswigham merged commit 12c6a74 into microsoft:master Nov 5, 2015
@weswigham weswigham deleted the prefer-const branch August 17, 2017 23:04
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
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 this pull request may close these issues.

4 participants