Warn when functions intended as constructors are called without new - #2021
Merged
Merged
Conversation
This comment has been minimized.
This comment has been minimized.
charmander
force-pushed
the
class-warning
branch
from
December 6, 2019 03:36
aaf3372 to
9029042
Compare
in preparation for brianc#1541. `eval` is a bit awkward, but it’s more accurate than an `instanceof` check and will work on platforms new enough to support pg 8 (i.e. only not Node 4).
charmander
force-pushed
the
class-warning
branch
2 times, most recently
from
December 6, 2019 16:46
dbe46c7 to
deebe7d
Compare
Collaborator
Author
|
Confirmed that |
Owner
|
great! You want me to merge this before 8.0 right? |
Collaborator
Author
|
@brianc Yep! Thanks for looking at it. |
Owner
|
totes! Okay gonna merge this & then work on the monorepo over the christmas break. I really want to ship 8.0 in January and start cranking on this again - the end of the year has been non-stop travel and crunch mode at work so looking forward to some FOSS gardening time. |
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.
in preparation for #1541.
evalis a bit awkward, but it’s more accurate than aninstanceofcheck and will work on platforms new enough to support pg 8 (i.e. only not Node 4).