Neil
ce687221d3
lint(unicorn): enable prefer-number-properties, prefer-array-find, prefer-array-index-of ( #7516 )
...
Enable three unicorn rules — one correctness, two performance — and fix every
existing violation repo-wide so the rules pass as errors.
prefer-number-properties (76 sites)
- parseInt/parseFloat/NaN -> Number.* : safe aliases (autofixed).
- isNaN -> Number.isNaN (12 sites, hand-converted): global isNaN coerces its
argument, Number.isNaN does not. Verified every call site already passes a
number (Number.parseInt results, number-typed fields, Date.getTime()), so the
conversion is behavior-preserving today and guards against a future non-numeric
argument silently coercing.
prefer-array-find (26 sites)
- .filter(pred)[0] -> .find(pred); .filter(pred).at(-1) / .pop() -> .findLast(pred).
Drops the intermediate array and short-circuits.
prefer-array-index-of (5 sites)
- .findIndex(x => x === v) -> .indexOf(v).
Verified: typecheck (node/cli/web) clean, 53 affected suites pass (1679 tests),
oxlint clean repo-wide. mobile/ uses findLast safely (already ships ES2023
.toReversed()); config scripts and e2e helpers run on Node 24.
2026-07-05 23:56:37 -07:00
..
2026-05-31 01:41:23 -07:00
2026-07-02 18:41:23 -04:00
2026-06-09 10:43:04 -07:00
2026-06-22 19:13:32 -07:00
2026-06-10 01:22:11 -07:00
2026-06-09 15:59:17 -07:00
2026-06-29 23:37:30 -07:00
2026-05-30 16:33:09 -07:00
2026-06-29 23:37:30 -07:00
2026-06-29 23:37:30 -07:00
2026-07-03 22:32:11 -07:00
2026-07-03 19:58:07 -07:00
2026-05-20 10:38:23 -07:00
2026-06-03 16:59:02 -04:00
2026-06-22 19:13:32 -07:00
2026-06-07 11:27:07 -07:00
2026-06-09 15:59:17 -07:00
2026-06-22 19:13:32 -07:00
2026-06-29 23:37:30 -07:00
2026-06-29 23:37:30 -07:00
2026-06-07 17:49:01 -07:00
2026-06-07 17:49:01 -07:00
2026-07-03 20:53:16 -07:00
2026-07-03 20:53:16 -07:00
2026-06-02 11:49:00 -07:00
2026-07-05 22:50:48 -07:00
2026-05-30 19:32:24 -07:00
2026-05-30 19:32:24 -07:00
2026-06-29 23:37:30 -07:00
2026-05-31 17:35:15 -07:00
2026-06-05 01:15:54 -07:00
2026-06-28 21:16:02 -07:00
2026-06-15 12:56:22 -07:00
2026-06-29 23:37:30 -07:00
2026-06-29 23:37:30 -07:00
2026-05-30 13:26:48 -07:00
2026-06-03 23:42:33 -07:00
2026-06-04 16:11:51 -04:00
2026-06-03 12:48:00 -07:00
2026-06-28 19:43:18 -07:00
2026-06-28 19:43:18 -07:00
2026-06-28 19:43:18 -07:00
2026-06-18 21:26:12 -07:00
2026-06-19 15:52:05 -07:00
2026-06-17 15:14:35 -07:00
2026-06-17 19:21:42 -07:00
2026-06-19 15:52:05 -07:00
2026-06-21 21:23:36 -07:00
2026-07-04 14:43:57 -07:00
2026-06-29 23:37:30 -07:00
2026-06-19 15:52:05 -07:00
2026-06-09 15:59:17 -07:00
2026-06-09 15:59:17 -07:00
2026-06-19 17:14:55 -07:00
2026-06-29 11:56:26 -07:00
2026-06-17 15:14:35 -07:00
2026-06-17 15:14:35 -07:00
2026-06-19 15:52:05 -07:00
2026-06-29 11:56:26 -07:00
2026-06-10 19:24:16 -07:00
2026-06-17 15:14:35 -07:00
2026-06-29 11:56:26 -07:00
2026-06-19 15:52:05 -07:00
2026-06-16 10:41:50 -07:00
2026-06-17 15:14:35 -07:00
2026-06-09 15:59:17 -07:00
2026-06-16 10:41:50 -07:00
2026-06-10 13:38:51 -07:00
2026-06-02 21:15:00 -07:00
2026-05-28 20:41:10 -04:00
2026-06-28 21:19:10 -07:00
2026-06-28 23:40:55 -07:00
2026-06-22 01:07:16 -07:00
2026-06-22 01:07:16 -07:00
2026-06-29 23:37:30 -07:00
2026-05-15 05:44:25 -04:00
2026-06-17 16:08:14 -07:00
2026-06-29 23:37:30 -07:00
2026-06-29 23:37:30 -07:00
2026-07-05 23:10:20 -07:00
2026-07-05 22:50:48 -07:00
2026-05-30 13:09:17 -07:00
2026-05-30 21:46:13 -07:00
2026-05-30 21:46:13 -07:00
2026-05-31 17:35:15 -07:00
2026-06-17 16:08:14 -07:00
2026-06-30 16:36:59 -07:00
2026-05-30 21:46:13 -07:00
2026-05-30 21:46:13 -07:00
2026-06-10 01:22:11 -07:00
2026-07-02 18:41:23 -04:00
2026-06-22 01:07:16 -07:00
2026-07-05 23:56:37 -07:00
2026-06-29 23:37:30 -07:00
2026-06-29 23:37:30 -07:00
2026-05-16 17:44:42 -04:00
2026-06-30 16:36:59 -07:00
2026-06-22 16:42:20 -07:00
2026-06-07 04:15:26 -07:00
2026-06-07 11:01:02 -07:00
2026-06-29 23:37:30 -07:00
2026-06-07 12:05:41 -07:00
2026-06-22 01:07:16 -07:00
2026-06-28 23:41:14 -07:00
2026-05-30 20:18:49 -07:00
2026-06-22 19:13:32 -07:00
2026-06-22 19:13:32 -07:00
2026-06-29 22:38:29 -07:00
2026-06-22 19:13:32 -07:00
2026-06-22 19:13:32 -07:00
2026-06-29 23:37:30 -07:00
2026-06-29 23:37:30 -07:00
2026-06-29 23:37:30 -07:00
2026-06-28 22:58:27 -07:00
2026-06-28 22:58:27 -07:00
2026-06-07 17:49:01 -07:00
2026-06-28 19:43:18 -07:00
2026-06-10 11:13:01 -07:00
2026-06-10 11:13:01 -07:00
2026-06-29 23:37:30 -07:00
2026-04-09 12:28:52 -07:00
2026-07-05 23:56:37 -07:00
2026-06-22 01:07:16 -07:00
2026-06-29 23:37:30 -07:00
2026-06-29 22:38:29 -07:00
2026-07-02 12:11:58 -07:00
2026-07-02 12:11:58 -07:00
2026-06-09 10:43:04 -07:00