Skip to content

enforce triple-equals#15013

Merged
aozgaa merged 4 commits into
microsoft:masterfrom
aozgaa:tripleEquals
Apr 18, 2017
Merged

enforce triple-equals#15013
aozgaa merged 4 commits into
microsoft:masterfrom
aozgaa:tripleEquals

Conversation

@aozgaa
Copy link
Copy Markdown
Contributor

@aozgaa aozgaa commented Apr 4, 2017

Added the triple-equals rule to tslint and replaced == with === and != with !==.

Comment thread src/services/shims.ts
const encoded = this.scriptSnapshotShim.getChangeRange(oldSnapshotShim.scriptSnapshotShim);
// TODO: should this be '==='?
if (encoded == null) {
if (encoded === null) {
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.

Has this been verified to not be an intentional null + undefined check?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Looking at the blame and PR where the TODO was introduced, it's clear that it should be ===.

Link: #3529 (diff)

@zhengbli
Copy link
Copy Markdown

zhengbli commented Apr 5, 2017

👍

@aozgaa aozgaa merged commit b038d28 into microsoft:master Apr 18, 2017
@microsoft microsoft locked and limited conversation to collaborators Jun 21, 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