-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update eslint deps #3615
base: main
Are you sure you want to change the base?
Update eslint deps #3615
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3615 +/- ##
==========================================
+ Coverage 89.88% 91.02% +1.13%
==========================================
Files 48 48
Lines 3440 3442 +2
Branches 654 668 +14
==========================================
+ Hits 3092 3133 +41
+ Misses 348 309 -39
|
"@faker-js/faker": "^9.0.0", | ||
"@ianvs/prettier-plugin-sort-imports": "^4.0.2", | ||
"@linaria/core": "^6.0.0", | ||
"@microsoft/api-extractor": "^7.23.0", | ||
"@rollup/plugin-babel": "^6.0.3", | ||
"@rollup/plugin-node-resolve": "^15.1.0", | ||
"@tanstack/react-router": "^1.57.13", | ||
"@tanstack/router-plugin": "^1.57.13", | ||
"@tanstack/react-router": "^1.70.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed the eslint-plugin. Not sure why is it failing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like the plugin needs to export Plugin
, manually tweaking the declaration files fixes it.
Composite projects require declaration files to be emitted, and TS can't emit a declaration file without access to the Plugin
type from the @tanstack/eslint-plugin-router
.
Should open an issue.
@@ -1245,7 +1248,7 @@ function DataGrid<R, SR, K extends Key>( | |||
<ScrollToCell | |||
scrollToPosition={scrollToPosition} | |||
setScrollToCellPosition={setScrollToPosition} | |||
gridElement={gridRef.current!} | |||
gridRef={gridRef} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
eslint-plugin
did not catch this. Maybe because it is conditional 🤔
@@ -36,6 +36,7 @@ export function useViewportColumns<R, SR>({ | |||
|
|||
const updateStartIdx = (colIdx: number, colSpan: number | undefined) => { | |||
if (colSpan !== undefined && colIdx + colSpan > colOverscanStartIdx) { | |||
// eslint-disable-next-line react-compiler/react-compiler |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should open an issue
@@ -1061,7 +1065,6 @@ function DataGrid<R, SR, K extends Key>( | |||
// Reset the positions if the current values are no longer valid. This can happen if a column or row is removed | |||
if (selectedPosition.idx > maxColIdx || selectedPosition.rowIdx > maxRowIdx) { | |||
setSelectedPosition({ idx: -1, rowIdx: minRowIdx - 1, mode: 'SELECT' }); | |||
setDraggedOverRowIdx(undefined); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this needed? We do set it to undefined after the drag operation
https://github.com/adazzle/react-data-grid/blob/main/src/DragHandle.tsx#L103
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible that the rows update while we're dragging?
} | ||
|
||
function closeEditor(shouldFocusCell: boolean) { | ||
shouldFocusCellRef.current = shouldFocusCell; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we just use a state instead of dancing around the limitations?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can completely remove the ref and use flushSync
. It works but it seems like the checkbox checked state is incorrect when cell is clicked. Maybe a bug in React
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -1061,7 +1065,6 @@ function DataGrid<R, SR, K extends Key>( | |||
// Reset the positions if the current values are no longer valid. This can happen if a column or row is removed | |||
if (selectedPosition.idx > maxColIdx || selectedPosition.rowIdx > maxRowIdx) { | |||
setSelectedPosition({ idx: -1, rowIdx: minRowIdx - 1, mode: 'SELECT' }); | |||
setDraggedOverRowIdx(undefined); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible that the rows update while we're dragging?
@@ -36,6 +36,7 @@ export function useViewportColumns<R, SR>({ | |||
|
|||
const updateStartIdx = (colIdx: number, colSpan: number | undefined) => { | |||
if (colSpan !== undefined && colIdx + colSpan > colOverscanStartIdx) { | |||
// eslint-disable-next-line react-compiler/react-compiler |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should open an issue
"@faker-js/faker": "^9.0.0", | ||
"@ianvs/prettier-plugin-sort-imports": "^4.0.2", | ||
"@linaria/core": "^6.0.0", | ||
"@microsoft/api-extractor": "^7.23.0", | ||
"@rollup/plugin-babel": "^6.0.3", | ||
"@rollup/plugin-node-resolve": "^15.1.0", | ||
"@tanstack/react-router": "^1.57.13", | ||
"@tanstack/router-plugin": "^1.57.13", | ||
"@tanstack/react-router": "^1.70.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like the plugin needs to export Plugin
, manually tweaking the declaration files fixes it.
Composite projects require declaration files to be emitted, and TS can't emit a declaration file without access to the Plugin
type from the @tanstack/eslint-plugin-router
.
Should open an issue.
New plugin
eslint-plugin-react-hooks-extra
. https://eslint-react.xyz/react-compiler/react-compiler
. https://react.dev/learn/react-compiler#installing-eslint-plugin-react-compiler