Skip to content

Update TypeScript, ESlint and React Aria#657

Open
mkernohanbc wants to merge 7 commits intomainfrom
chore/typescript-eslint
Open

Update TypeScript, ESlint and React Aria#657
mkernohanbc wants to merge 7 commits intomainfrom
chore/typescript-eslint

Conversation

@mkernohanbc
Copy link
Copy Markdown
Contributor

@mkernohanbc mkernohanbc commented Apr 17, 2026

This PR updates:

  • typescript from 5.9.3 -> 6.0.3
  • eslint from 9.39.2 -> 10.2.0
  • react-aria-components from 1.16.0 -> 1.17.0

These changes are cherry-picked from #655 (comment).

Additional changes in this PR:

  • Updates various TypeScript and ESlint plugins/sub-packages to their latest versions
  • Adds two React Aria sub-packages as dev dependencies to resolve a couple of new import errors that appeared in DatePicker during testing
  • Removes a soon-to-be-deprecated option from tsconfig.json (see 6.0 Migration Guide microsoft/TypeScript#62508 (comment)), to resolve a console warning
  • Adds a missing ESlint dependency that was causing linting to fail
  • [Adds a rootDir property to tsconfig.types.json (see https://github.com/6.0 Migration Guide microsoft/TypeScript#62508#issuecomment-3348659946), to resolve a build error
  • Updates tsconfig.json and rollup.config.js, and adds a new declarations file to resolve new TypeScript errors (TS5096 and TS2282) that popped up on build

As far as I can tell there are now no outstanding issues:

✅ test script runs successfully
✅ lint script runs successfuly
✅ build script runs successfully
✅ Storybook builds successfully
✅ Vite app builds successfully

@mkernohanbc mkernohanbc self-assigned this Apr 17, 2026
@mkernohanbc mkernohanbc added the Dependencies Changes or issues affecting dependencies label Apr 17, 2026
@mkernohanbc mkernohanbc requested a review from ty2k April 17, 2026 22:32
@mkernohanbc mkernohanbc added this to the Components v0.8.0 milestone Apr 17, 2026
Copy link
Copy Markdown
Contributor

@ty2k ty2k left a comment

Choose a reason for hiding this comment

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

Let's split this up into even smaller PRs to de-risk this:

  • One for just the React Aria Components version bump
    • This includes the additional new dependencies for DatePicker to work in v1.17.0, but these need to go into dependencies, see notes below.
  • One for just the ESLint changes
    • ESLint v9 -> v10
    • New addition of @eslint/js
  • One for just the TypeScript major version bump without any configuration changes
  • Optionally, after everything else is working cleanly, one for any TypeScript configuration changes. IMO this is lowest priority and optional, noting that we've had the allowImportingTsExtensions warning going back at least months, like in the job logs here.

@@ -0,0 +1 @@
declare module "*.css";
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It doesn't seem like this change or the rest of the changes in 4137ee9 are required for this to go. Can we please take it out and worry about it in a separate PR of just TypeScript fiddling to de-risk this?

typescript({
tsconfig: "./tsconfig.build.json",
include: ["src/index.ts", "src/components/**/*"],
include: ["src/index.ts", "src/components/**/*", "src/**/*.d.ts"],
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Let's remove this as part of removing 4137ee9.

/* Bundler mode */
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"rewriteRelativeImportExtensions": true,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Let's remove this as part of removing 4137ee9.

"dependencies": {
"@bcgov/design-tokens": "3.2.0",
"react-aria-components": "1.16.0"
"react-aria-components": "1.17.0"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Let's move this change to another PR to de-risk.

"@react-stately/data": "3.15.0",
"@rollup/plugin-commonjs": "29.0.0",
"@react-aria/datepicker": "3.17.0",
"@react-aria/i18n": "3.13.0",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

These two new @react-aria/* dependencies need to go into dependencies instead of devDependencies because we are using useDisplayNames and useDateFormatter right in DatePicker, so this code needs to ship with the component library (they are direct dependencies) as opposed to only being used for development tasks (devDependencies). Contrast that with something like @react-stately/data, where we're only using in the Vite kitchen sink app, not in the actual component.

It looks like the need for this might be the result of a change to how dependencies work in react-aria-components v1.17.0: https://react-aria.adobe.com/releases/v1-17-0

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

Labels

Dependencies Changes or issues affecting dependencies

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants