Skip to content

chore: upgrade to eslint-config-availity v16 and TypeScript 6 - #1750

Open
jordan-a-young wants to merge 3 commits into
masterfrom
feature/typescript-6-eslint-v16
Open

jordan-a-young wants to merge 3 commits into
masterfrom
feature/typescript-6-eslint-v16

Conversation

@jordan-a-young

Copy link
Copy Markdown
Member

Summary

Upgrades the monorepo to use eslint-config-availity v16 and TypeScript 6.0.3.

Changes

Dependencies

  • eslint-config-availity ^14.0.0^16.0.0
  • @vitest/eslint-plugin ^1.0.0 added (required peer dep in v16)
  • typescript 5.9.36.x (resolves to 6.0.3)

TypeScript 6 migration

  • Root tsconfig.json: Ran ts5to6 --fixBaseUrl — removed deprecated baseUrl: "." and converted all 39 paths mappings to relative (./) prefixes. moduleResolution: bundler continues to resolve correctly.
  • packages/form/tsconfig.json: ts5to6 --fixRootDir added rootDir: "../.."" (this package uses allowJs: true`, which required the fix).
  • All other 38 per-package tsconfigs: no changes needed.
  • yarn typecheck passes cleanly with TS 6.0.3.

ESLint config

  • eslint.config.js: Removed manual vi: 'readonly' global shim and stale jest/no-* rules. Added withVitest from eslint-config-availity/test-runners so Vitest globals are handled by the plugin.

Lint fixes (13 new unicorn errors introduced by v16 ruleset)

File Fix
change-password/src/ChangePasswordForm.jsx keyCodekey (3 handlers)
feedback/src/FeedbackButton.jsx keyCodekey
feedback/src/SmileField.jsx keyCodekey (2 references)
feedback/src/FeedbackForm.jsx Add eslint-disable-next-line for no-this-outside-of-class in yup.addMethod callback
feedback/src/SupportForm.jsx Same disable + keyCodekey
spaces/src/Spaces.jsx Inline requestBody.operationName assignment into object literal

Testing

  • yarn lint — ✅ all 40 projects pass (0 errors)
  • yarn test — ✅ all 39 test-bearing projects pass
  • yarn typecheck — ✅ passes under TypeScript 6.0.3

Notes

  • No packages declare typescript as a peer dependency, so step 7 (update peerDeps) was a no-op.
  • No noUncheckedSideEffectImports errors appeared for CSS imports — no tsconfig changes needed there.

- Bump eslint-config-availity ^14.0.0 → ^16.0.0
- Add @vitest/eslint-plugin ^1.0.0 (required peer dep in v16)
- Upgrade typescript 5.9.3 → 6.x (resolves to 6.0.3)
- Run ts5to6 --fixBaseUrl: remove baseUrl from root tsconfig, relativize paths
- Run ts5to6 --fixRootDir: add rootDir:../.. to packages/form (has allowJs:true)
- Update eslint.config.js: add withVitest test-runner config, remove vi global
  shim and stale jest/* rules
- Fix 13 new unicorn lint errors: keyCode→key in change-password/feedback,
  no-this-outside-of-class in feedback (yup.addMethod), no-immediate-mutation
  in spaces
TypeScript 6 DTS build via tsup raised two errors:
- TS5101: paths without baseUrl triggers deprecation warning even with
  moduleResolution:bundler — silenced with ignoreDeprecations:6.0
- TS2882: noUncheckedSideEffectImports now defaults to true in strict mode,
  breaking CSS side-effect imports across block-ui, change-password,
  form-upload, page-header, spaces, upload — disabled at root
Replace > -1 with !== -1 (unicorn/consistent-existence-index-check).
Also remove stale eslint-disable comment for a rule that no longer fires.
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.

1 participant