Skip to content

Fully configure @eslint-react/eslint-plugin#3978

Merged
nstepien merged 1 commit intomainfrom
eslintrules
Feb 23, 2026
Merged

Fully configure @eslint-react/eslint-plugin#3978
nstepien merged 1 commit intomainfrom
eslintrules

Conversation

@nstepien
Copy link
Copy Markdown
Collaborator

@nstepien nstepien commented Feb 23, 2026

Really good plugin(s)!

@nstepien nstepien self-assigned this Feb 23, 2026
const [columnsToMeasureOnResize, setColumnsToMeasureOnResize] =
useState<ReadonlySet<string> | null>(null);
const [prevGridWidth, setPreviousGridWidth] = useState(gridWidth);
const [prevGridWidth, setPrevGridWidth] = useState(gridWidth);
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

naming was enforced by this rule (prev vs previous)?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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';
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

export function useRowSelection() {
const rowSelectionContext = useContext(RowSelectionContext);
const rowSelectionChangeContext = useContext(RowSelectionChangeContext);
const rowSelectionContext = use(RowSelectionContext);
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread src/Columns.tsx
export const SELECT_COLUMN_KEY = 'rdg-select-column';

function HeaderRenderer(props: RenderHeaderCellProps<unknown>) {
function HeaderRenderer({ tabIndex }: RenderHeaderCellProps<unknown>) {
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread src/EditCell.tsx

addEventListener('mousedown', onWindowCaptureMouseDown, { capture: true });
addEventListener('mousedown', onWindowMouseDown);
window.addEventListener('mousedown', onWindowCaptureMouseDown, { capture: true });
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread eslint.config.js
getRules('web-api-rules', 'web-api/'),
getRules('naming-convention-rules', 'naming-convention/'),
])
.flatMap((x) => x)
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread eslint.config.js
getRules('naming-convention-rules', 'naming-convention/'),
])
.flatMap((x) => x)
.toArray()
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread eslint.config.js
importNames: ['default'],
message: 'Use named imports instead.'
}
],
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The two prefer-namespace-import rules cover it

@nstepien nstepien marked this pull request as ready for review February 23, 2026 20:48
const [columnsToMeasureOnResize, setColumnsToMeasureOnResize] =
useState<ReadonlySet<string> | null>(null);
const [prevGridWidth, setPreviousGridWidth] = useState(gridWidth);
const [prevGridWidth, setPrevGridWidth] = useState(gridWidth);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

naming was enforced by this rule (prev vs previous)?

@nstepien nstepien merged commit 6bd962f into main Feb 23, 2026
2 checks passed
@nstepien nstepien deleted the eslintrules branch February 23, 2026 21:05
@codecov-commenter
Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.55%. Comparing base (793929e) to head (66a638e).
⚠️ Report is 1 commits behind head on main.

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           
Files with missing lines Coverage Δ
src/Columns.tsx 100.00% <100.00%> (ø)
src/DataGrid.tsx 98.98% <100.00%> (ø)
src/DataGridDefaultRenderersContext.ts 100.00% <100.00%> (ø)
src/EditCell.tsx 88.09% <100.00%> (ø)
src/hooks/useColumnWidths.ts 98.61% <100.00%> (ø)
src/hooks/useRowSelection.ts 90.00% <100.00%> (+2.50%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants