tools: improve valid-typeof lint rule#37924
Merged
Trott merged 0 commit intonodejs:masterfrom Mar 28, 2021
Merged
Conversation
Collaborator
aduh95
approved these changes
Mar 26, 2021
Contributor
aduh95
left a comment
There was a problem hiding this comment.
+1, although it seems to have broken the assert.CallTracker test.
BridgeAR
approved these changes
Mar 26, 2021
Member
Author
Ha! The test was written wrong, but it "worked" because it made two errors that canceled each other out. It should be exiting if it's not undefined. Will rewrite using |
Collaborator
aduh95
approved these changes
Mar 26, 2021
targos
approved these changes
Mar 26, 2021
Collaborator
cjihrig
approved these changes
Mar 27, 2021
jasnell
approved these changes
Mar 27, 2021
Trott
added a commit
to Trott/io.js
that referenced
this pull request
Mar 28, 2021
The typeof operator returns a string. Compare to the string 'undefined' and not the value undefined. PR-URL: nodejs#37924 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Member
Author
|
Landed in db7df59...adcd60e |
ruyadorno
pushed a commit
that referenced
this pull request
Mar 29, 2021
The typeof operator returns a string. Compare to the string 'undefined' and not the value undefined. PR-URL: #37924 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
ruyadorno
pushed a commit
that referenced
this pull request
Mar 29, 2021
Require that `typeof` comparisons be to string literals. PR-URL: #37924 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
ruyadorno
pushed a commit
that referenced
this pull request
Mar 30, 2021
The typeof operator returns a string. Compare to the string 'undefined' and not the value undefined. PR-URL: #37924 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
ruyadorno
pushed a commit
that referenced
this pull request
Mar 30, 2021
Require that `typeof` comparisons be to string literals. PR-URL: #37924 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Merged
targos
pushed a commit
that referenced
this pull request
May 1, 2021
The typeof operator returns a string. Compare to the string 'undefined' and not the value undefined. PR-URL: #37924 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
targos
pushed a commit
that referenced
this pull request
May 1, 2021
Require that `typeof` comparisons be to string literals. PR-URL: #37924 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Require that
typeofcomparisons be to string literals.Fix an instance in a test where it was mistakenly being compared to
undefinedrather than'undefined'.