Skip to content

target baseline, lightningcss tweaks, eslint updates, eslint.config.ts, remove 3 @ts-expect-error - #4032

Merged
nstepien merged 1 commit into
mainfrom
maintenance
Apr 21, 2026
Merged

nstepien merged 1 commit into
mainfrom
maintenance

Conversation

@nstepien

@nstepien nstepien commented Apr 21, 2026 •

Copy link
Copy Markdown
Collaborator

@nstepien nstepien self-assigned this Apr 21, 2026
Comment thread .vscode/settings.json
"eslint.options": {
"flags": ["unstable_native_nodejs_ts_config"]
},
"eslint.problems.shortenToSingleLine": 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.

function rowGrouper(rows: readonly Row[], columnKey: string) {
// @ts-expect-error
return Object.groupBy(rows, (r) => r[columnKey]) as Record<string, readonly R[]>;
return Object.groupBy(rows, (r) => r[columnKey as keyof Row]) as Record<string, readonly Row[]>;

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.

We used an incorrect R type, which these 3 @ts-expect-errors hid from us

Comment thread eslint.config.ts
// https://react.dev/reference/eslint-plugin-react-hooks
'react-hooks/rules-of-hooks': 1,
'react-hooks/exhaustive-deps': 1,
'react-hooks/component-hook-factories': 1,

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.

This rule is deprecated and a no-op
react/react@bc24980

Comment thread eslint.config.ts
'@eslint-react/jsx-no-useless-fragment': [1, { allowExpressions: false }],
'@eslint-react/jsx-no-key-after-spread': 1,
'@eslint-react/jsx-no-leaked-dollar': 1,
'@eslint-react/jsx-no-leaked-semicolon': 1,

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/Cell.tsx
const isEditable = isCellEditableUtil(column, row);

function setActivePositionWrapper(enableEditor?: boolean) {
function setActivePositionWrapper(enableEditor = false) {

@nstepien nstepien Apr 21, 2026 •

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.

Caught by sonarjs/bool-param-default, decided to keep this rule enabled.

Comment thread tsdown.config.ts

export default defineConfig({
outDir: 'lib',
target: ['baseline-widely-available', 'node24.0.0'],

@nstepien nstepien Apr 21, 2026 •

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.

They've added support for baseline-widely-available so I've added it.
Also added node 24 as it's the current LTS version.
There's 0 difference in the output of index.js/index.js.map/index.d.ts.
https://github.com/rolldown/tsdown/releases

ℹ targets: chrome111, edge111, firefox114, safari16.4, ios16.4, node24.0.0

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.

Comment thread tsdown.config.ts
lightningcss: {
// https://github.com/parcel-bundler/lightningcss/issues/873
exclude: Features.Nesting | Features.LightDark
}

@nstepien nstepien Apr 21, 2026 •

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 vite.config.ts
build: {
modulePreload: { polyfill: false },
sourcemap: true,
reportCompressedSize: false,

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.

Vite is fast now, so I removed reportCompressedSize: false

Comment thread vite.config.ts
groups: [
{
name: 'faker',
test: '@faker-js/faker'

@nstepien nstepien Apr 21, 2026 •

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.

Faker is the biggest dependency we have, and it doesn't get updates too often, might be worth splitting it into its own chunk.

dist/assets/faker-DefjNDsx.js                   410.66 kB │ gzip: 153.89 kB │ map:   696.97 kB

https://rolldown.rs/in-depth/manual-code-splitting#improve-loading-performance

Wonder if we should split react/react-dom together too 🤔

Comment thread vite.config.ts
lightningcss: {
// https://github.com/parcel-bundler/lightningcss/issues/873
exclude: Features.Nesting | Features.LightDark
}

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.

Applied the same lightningcss strategy here to fix the missing -webkit-user-select property.

@nstepien
nstepien marked this pull request as ready for review April 21, 2026 18:28
@nstepien
nstepien requested a review from amanmahajan7 as a code owner April 21, 2026 18:28

@amanmahajan7 amanmahajan7 left a comment

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.

Nice 👍

Comment thread test/browser/TreeDataGrid.test.tsx Resolved
Comment thread tsdown.config.ts

export default defineConfig({
outDir: 'lib',
target: ['baseline-widely-available', 'node24.0.0'],

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.

@nstepien
nstepien merged commit da5ab4f into main Apr 21, 2026
1 check passed
@nstepien
nstepien deleted the maintenance branch April 21, 2026 18:40
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.

2 participants