Temporal: don't allow comparison operators when comparing two Temporal values. #9607
rafael-cx
started this conversation in
Rule suggestion
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Temporal does not support
.valueOf(). Therefore, when accidentally using comparison operators it will throw during runtime. See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Instant/valueOfA linting rule checking this would prevent runtime issues.
Beta Was this translation helpful? Give feedback.
All reactions