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.
Hi 👋
I hope this is an ok suggestion to make - I know it's several things at once. Let me attempt to explain:
I started out coming from tajo/ladle#616 , where I observed impractical behaviour regarding
instanceofin a copy of code from this project.This led me to attempt bringing the changed
Symbol.hasInstancemethod here, too.It seems that the line
MockDate.prototype = RealDate.prototype;does not work in current node and that it wasn't included in the copy of it that ladle has.A possible alternative that I'd suggest would be this method:
Next thing I noted was that for
Symbolto be present it's required to update to ES6 - so I'm suggesting that, too.I then noticed that several dependencies were rather old. So I'm suggesting to update them, too.
In particular - since node has it's own test runner and can execute typescript these days I'm suggesting to directly test with node here and ditch several dependencies alongside.
I'm also suggesting to switch to a newer version of the rollup typescript plugin because the previous one hasn't been updated in quite some time.
Afterwards I noted some variations in formatting, and so was under the impression that it could be helpful to introduce some preconfigured linting - that's what the later commits do.
Would love to hear your input on this.