[pull] main from Comcast:main - #232
Merged
Merged
Conversation
* oxlint: add unicorn rules
* oxlint: curate unicorn rules
Go through every unicorn rule, disable the ones that do not fit this
codebase, tune the options of the ones that do, and fix the code they flag.
Disabled:
- `no-null`, `no-useless-undefined`: `null`/`undefined` literals are required
by the public `Maybe<T>` API, by React (`useRef<T>(undefined)`,
`renderCell: () => null`) and by `noImplicitReturns`
- `prefer-number-coercion`: rewrites `parseFloat('10px')` to `Number('10px')`
- `prefer-at`: `at(-1)` returns `T | undefined` and is suggested for DOM
collections, which have no `at()`
- `no-nested-ternary`, `empty-brace-spaces`, `number-literal-case`: oxfmt
already owns this
- `prefer-includes`, `no-instanceof-array`: duplicate reports
- `no-negated-condition`, `prefer-query-selector`: style
Tuned:
- `filename-case`: camelCase + PascalCase
- `switch-case-braces`: `avoid`
- `prefer-ternary`: `only-single-line`
- `no-array-sort`: `allowAfterSpread`
- `max-nested-calls`: `max: 4`
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01BHDtvyEwsiM6EQJsgdiHt9
* website: use `Array.from(value, mapFn)` instead of `[...value].map(mapFn)`
Avoids building an intermediate array.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01BHDtvyEwsiM6EQJsgdiHt9
* Extract `getRowTracks` in `useViewportRows`
Both call sites built the same `repeat(n, Xpx)`/`Xpx` string. Extracting it
removes the duplication and keeps each `gridTemplateRows` append on one line.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01BHDtvyEwsiM6EQJsgdiHt9
* Avoid `Array#entries` allocation in `useCalculatedColumns`
`entries()` allocates a `[index, value]` tuple per column. Use an indexed
loop instead, matching the other loops in this file.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01BHDtvyEwsiM6EQJsgdiHt9
* Avoid allocating a key list per group in `TreeDataGrid`
`expandGroup` re-runs on every expand/collapse and only needed `Object.keys`
for `setSize`. Store `setSize` on each group entry instead — it is already
known while grouping, in a memo that recomputes far less often — so
`expandGroup` can walk the dictionary with `for…in` and no keys array.
`groupRows` now uses `Object.keys` + lookup instead of `Object.entries`,
which drops one tuple per group.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01BHDtvyEwsiM6EQJsgdiHt9
* website exports: use iterators
* review
* review
* review
* dict -> map
---------
Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )