Skip to content

fix(lint/complexity/useDateNow): improve error message#6413

Merged
minht11 merged 3 commits intobiomejs:mainfrom
wojtekmaj:use-date-now
Jul 5, 2025
Merged

fix(lint/complexity/useDateNow): improve error message#6413
minht11 merged 3 commits intobiomejs:mainfrom
wojtekmaj:use-date-now

Conversation

@wojtekmaj
Copy link
Copy Markdown
Contributor

Summary

Previously, you would get an error like

Use Date.now() instead of new Date().getTime.

which wasn't technically correct. If you followed the error message literally, you'd end up with Date.now()() in your code.

Test Plan

Updated snapshot tests

Previously, you would get an error like

```
Use Date.now() instead of new Date().getTime.
```

which wasn't technically correct. If you followed the error message literally, you'd end up with `Date.now()()` in your code.
@github-actions github-actions Bot added A-Linter Area: linter L-JavaScript Language: JavaScript and super languages labels Jun 19, 2025
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Jun 19, 2025

CodSpeed Performance Report

Merging #6413 will not alter performance

Comparing wojtekmaj:use-date-now (45b2848) with main (50b7fe6)

Summary

✅ 115 untouched benchmarks

Copy link
Copy Markdown
Member

@siketyan siketyan left a comment

Choose a reason for hiding this comment

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

Good catch!

Comment thread .changeset/bumpy-pots-share.md Outdated
Co-authored-by: Naoki Ikeguchi <me@s6n.jp>
@minht11 minht11 merged commit 4aa0e50 into biomejs:main Jul 5, 2025
28 checks passed
@github-actions github-actions Bot mentioned this pull request Jul 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Linter Area: linter L-JavaScript Language: JavaScript and super languages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants