Repository navigation
chore(dashboard): enable noNestedComponentDefinitions and noReactPropAssignments - #5445
Merged
Merged
Conversation
Contributor
Vercel Deployment Info - dashboard
|
dbarrosop
approved these changes
Nov 24, 2026
…Assignments Both Biome rules catch real React bugs: a component defined inside another is recreated on every render and loses its state, and assigning to props mutates data React treats as immutable. The dashboard had one nested definition, the Chevron component passed to DayPicker in the calendar, which is now a top-level CalendarChevron. There were no prop assignments. Checks: biome check, tsc --noEmit, and Vitest on the DatePicker, DateTimePicker and TemporalPicker tests.
robertkasza
force-pushed
the
chore/dashboard-react-lint-rules
branch
from
November 25, 2026 10:10
9801f33 to
43b5eab
Compare
robertkasza
enabled auto-merge (squash)
November 25, 2026 10:10
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Checklist
biome check,tsc --noEmit, Vitest on the DatePicker, DateTimePicker and TemporalPicker tests; full suite left to CI)Goal
The dashboard's Biome config did not flag two classes of React bugs: components declared inside another component's render (recreated on every render, so React remounts them and discards their state and DOM) and direct assignments to props (mutating data React treats as immutable). This branch turns both rules on as errors so new dashboard code cannot introduce either pattern, and fixes the one existing violation so
biome checkstays green.Type: Configuration
Changes
noNestedComponentDefinitionsandnoReactPropAssignmentsaterrorlevel underlinter.rules.correctnessindashboard/biome.json, next to the existingnoInnerDeclarations. Violations now failbiome checklocally and in CI.Calendarwrapper aroundreact-day-picker'sDayPickerpreviously passedcomponents={{ Chevron: ({ orientation }) => … }}, an inline component with a new identity on everyCalendarrender. It is now a module-levelCalendarChevrontyped with the library'sChevronProps, renderingChevronLeftfororientation === 'left'andChevronRightotherwise ath-4 w-4. Rendered output is unchanged; only the component identity becomes stable, soDayPickerno longer remounts the navigation icons on each parent render.Key files
dashboard/biome.json(+2/-0) — enables the two React correctness rulesdashboard/src/components/ui/v3/calendar.tsx(+11/-7) — hoists the inlineChevroninto top-levelCalendarChevron