Rule: prefer N/format when formatting dates and other supported values

Open
#47 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
48/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
typescript
Domain
tooling

Research direction

Start by reading the existing rule implementations and docs/rule-priority.md to see how rules are structured and assigned to presets. Then define which native formatting patterns N/format should replace and how to avoid flagging intentional formats such as ISO strings for external APIs. Done means the rule detects supported cases with those false positives addressed, and its severity and preset placement are documented.

Written by the indexing model from the issue text.

Description

enhancement needs-triage

TODO: add a rule that prefers N/format (format.format / format.parse) when formatting or parsing dates and other values N/format supports, instead of native approaches such as Date.prototype.toLocaleDateString, toISOString string slicing, Intl.*, or manual string building.

Open questions for triage:

  • Which native patterns reliably indicate a value that N/format should handle (dates, datetimes, currency, numbers, percents, etc. per format.Type).
  • How to avoid false positives where native formatting is intended (e.g. ISO strings for external APIs).
  • Default severity and preset placement per docs/rule-priority.md.
Dominant language
TypeScript
Stars
1
Forks
0
Avg merge
2h 8m
Merged PRs (30d)
64

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from nemchik/biome-plugin-suitescript

All issues in nemchik/biome-plugin-suitescript

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.