Skip to content

Upgrade to ESLint 9 and typescript-eslint 8 - #540

Merged
OrkunTokdemir merged 3 commits into
qt-labs:devfrom
OrkunTokdemir:orkun_eslint_upgrade_30_07_2026
Aug 5, 2026
Merged

Upgrade to ESLint 9 and typescript-eslint 8#540
OrkunTokdemir merged 3 commits into
qt-labs:devfrom
OrkunTokdemir:orkun_eslint_upgrade_30_07_2026

Conversation

@OrkunTokdemir

Copy link
Copy Markdown
Collaborator
  • eslint: Upgrade to ESLint 9 and typescript-eslint 8
  • qt-core: Use fast-xml-builder instead of the deprecated XMLBuilder

ESLint 8 reached end of life in October 2024 and typescript-eslint 7
does not support the TypeScript version used in the repository. The
per-package eslint.config.mjs files also only worked by loading the
legacy common/.eslintrc.cjs through the FlatCompat shim.

Replace both with a shared flat config factory in
common/eslint-config.mjs; the package configs now only differ in
their tsconfig root directory. Linted files stay the same: TypeScript
sources outside out, test and webview-ui.

Where typescript-eslint 8 changed rule defaults, keep the previous
behavior via options (no-unused-vars caught errors, no-misused-promises
inherited methods, prefer-nullish-coalescing ternary tests,
switch-exhaustiveness-check default cases) and disable the new
no-unnecessary-type-parameters rule, since getValue<T>()-style cast
APIs are used intentionally.

Fix what the upgraded presets report: convert String#match calls to
RegExp#exec, drop a for await over a synchronous generator in
kit-manager.ts, log the path field instead of the object in
project.ts, parse JSON-RPC fields through a typed helper in
traceviewer/runner.mts, await the activation promise in
qt-lib/src/util.ts, remove a stray expression statement in packet.mts
and suppress no-deprecated for XMLBuilder until fast-xml-builder is
adopted.
@OrkunTokdemir OrkunTokdemir changed the title orkun eslint upgrade 30 07 2026 Upgrade to ESLint 9 and typescript-eslint 8 Aug 5, 2026
fast-xml-parser 5 deprecated its XMLBuilder export in favor of the
standalone fast-xml-builder package and only re-exports it for
backward compatibility. Import the builder from its own package and
add it as a direct dependency, on the same version the parser already
ships, so the tree keeps a single copy. The class is the same
upstream code and the generated .qrc output is unchanged.

fast-xml-builder ships a syntactically invalid lib/fxb.d.cts (still
broken in 1.3.0) that node16 resolution selects for CommonJS
consumers, so tsc fails to parse it. Enable skipLibCheck in qt-core
until this is fixed upstream.

path-expression-matcher, a dependency of fast-xml-builder, moved to
the top level of node_modules and now appears in
ThirdPartyNotices.txt.
@OrkunTokdemir
OrkunTokdemir force-pushed the orkun_eslint_upgrade_30_07_2026 branch from 773911e to 7449e68 Compare August 5, 2026 11:28
@OrkunTokdemir
OrkunTokdemir merged commit e25cdc5 into qt-labs:dev Aug 5, 2026
6 checks passed
@OrkunTokdemir
OrkunTokdemir deleted the orkun_eslint_upgrade_30_07_2026 branch August 5, 2026 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants