@godxjp/ui 16.9.3 → 16.9.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@godxjp/ui",
3
- "version": "16.9.3",
3
+ "version": "16.9.4",
4
4
  "type": "module",
5
5
  "packageManager": "pnpm@10.29.1",
6
6
  "sideEffects": false,
@@ -259,7 +259,12 @@ const RULES = [
259
259
  {
260
260
  id: "raw-intl-date",
261
261
  severity: "warn",
262
- test: /\.toLocale(?:Date|Time)?String\(\s*\)|new Date\([^)]*\)\.(?:getMonth|getDate|getFullYear)\(\)\s*\+/,
262
+ // Only the unambiguously-Date methods: `.toLocaleDateString()` / `.toLocaleTimeString()`.
263
+ // Bare `.toLocaleString()` is excluded on purpose — it is overwhelmingly
264
+ // `Number.prototype.toLocaleString()` (legit locale number formatting), and matching it
265
+ // false-flagged every formatted count/amount. A date+time `Date.toLocaleString()` is rare and
266
+ // still partly covered by the hand-built `new Date(...).getMonth()+` alternative below.
267
+ test: /\.toLocale(?:Date|Time)String\(\s*\)|new Date\([^)]*\)\.(?:getMonth|getDate|getFullYear)\(\)\s*\+/,
263
268
  standard: "ISO 8601 · IANA tz database · ECMA-402 Intl.DateTimeFormat",
264
269
  message:
265
270
  "Don't hand-build or locale-default dates. Use formatDate from @godxjp/ui/datetime (Intl.DateTimeFormat + IANA timezone + ISO-8601), which respects the AppProvider locale/timezone.",