Conversation
| const [columnsToMeasureOnResize, setColumnsToMeasureOnResize] = | ||
| useState<ReadonlySet<string> | null>(null); | ||
| const [prevGridWidth, setPreviousGridWidth] = useState(gridWidth); | ||
| const [prevGridWidth, setPrevGridWidth] = useState(gridWidth); |
There was a problem hiding this comment.
There was a problem hiding this comment.
naming was enforced by this rule (prev vs previous)?
There was a problem hiding this comment.
Yes, i.e. the setter must be set + state name starting with uppercase.
I could have changed prevGridWidth to previousGridWidt as an alternative.
| } | ||
|
|
||
| export const RowSelectionContext = createContext<RowSelectionContextValue | undefined>(undefined); | ||
| RowSelectionContext.displayName = 'RowSelectionContext'; |
There was a problem hiding this comment.
| export function useRowSelection() { | ||
| const rowSelectionContext = useContext(RowSelectionContext); | ||
| const rowSelectionChangeContext = useContext(RowSelectionChangeContext); | ||
| const rowSelectionContext = use(RowSelectionContext); |
There was a problem hiding this comment.
| export const SELECT_COLUMN_KEY = 'rdg-select-column'; | ||
|
|
||
| function HeaderRenderer(props: RenderHeaderCellProps<unknown>) { | ||
| function HeaderRenderer({ tabIndex }: RenderHeaderCellProps<unknown>) { |
There was a problem hiding this comment.
|
|
||
| addEventListener('mousedown', onWindowCaptureMouseDown, { capture: true }); | ||
| addEventListener('mousedown', onWindowMouseDown); | ||
| window.addEventListener('mousedown', onWindowCaptureMouseDown, { capture: true }); |
There was a problem hiding this comment.
Honestly this should be allowed
https://www.eslint-react.xyz/docs/rules/web-api-no-leaked-event-listener
| getRules('web-api-rules', 'web-api/'), | ||
| getRules('naming-convention-rules', 'naming-convention/'), | ||
| ]) | ||
| .flatMap((x) => x) |
There was a problem hiding this comment.
| getRules('naming-convention-rules', 'naming-convention/'), | ||
| ]) | ||
| .flatMap((x) => x) | ||
| .toArray() |
There was a problem hiding this comment.
| importNames: ['default'], | ||
| message: 'Use named imports instead.' | ||
| } | ||
| ], |
There was a problem hiding this comment.
The two prefer-namespace-import rules cover it
| const [columnsToMeasureOnResize, setColumnsToMeasureOnResize] = | ||
| useState<ReadonlySet<string> | null>(null); | ||
| const [prevGridWidth, setPreviousGridWidth] = useState(gridWidth); | ||
| const [prevGridWidth, setPrevGridWidth] = useState(gridWidth); |
There was a problem hiding this comment.
naming was enforced by this rule (prev vs previous)?
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3978 +/- ##
=======================================
Coverage 97.54% 97.55%
=======================================
Files 36 36
Lines 1467 1472 +5
Branches 472 472
=======================================
+ Hits 1431 1436 +5
Misses 36 36
🚀 New features to boost your workflow:
|
Really good plugin(s)!