Skip to content

refactor: update eslint to v9#1340

Draft
joker23 wants to merge 1 commit intomainfrom
skz/sdk-2276/eslint-9-flat-config
Draft

refactor: update eslint to v9#1340
joker23 wants to merge 1 commit intomainfrom
skz/sdk-2276/eslint-9-flat-config

Conversation

@joker23
Copy link
Copy Markdown
Contributor

@joker23 joker23 commented Apr 30, 2026

This PR will update eslint to version 9 with the following changes:

  • pull in and update v9 compatible depedencies
  • flatten eslint config to root eslint.config.mjs
  • switched eslint stuff to use mjs syntax

As a result, there are some deprecated/updated recommendations. In general, I tried to go with the recommendations as much as possible, the deviations and notible changes are:

  • no-redeclare rule is deprecated because typescript compilers should catch these cases now
  • explicit-any is disabled for now because we have too many violations
  • no-param-reassign is a bit more permissible than before - now, it will let object field modifications but not whole value replacements.
  • max-classes-per-file is not re-enabled (recommendations did not enable it)
  • class-method-use-this is off due to too many violations

I did not include any style rules as those will be introduced in a separate PR.

In general, there are still some TODOs on the config. We can have much more control on where rules apply, but introducing them here will be too noisy to an already large PR.


Note

Medium Risk
Repo-wide linting behavior changes due to ESLint v9 + new flat config, which can cause new/removed lint failures across many packages even though runtime logic changes are minimal.

Overview
Upgrades linting across the monorepo to ESLint v9 and migrates from legacy .eslintrc/.eslintignore to a single flat config in eslint.config.mjs, including consolidated ignore patterns, TypeScript project parsing, import resolution, and test/example-specific overrides.

Updates root and package lint scripts/dependencies to use the new ESLint v9 ecosystem (@eslint/js, typescript-eslint, eslint-plugin-import-x, globals, eslint-import-resolver-typescript) and removes now-unneeded package-level ESLint configs/overrides.

Applies follow-up code tweaks to satisfy new rules/recommendations (mostly removing/adjusting eslint-disable comments, adding targeted disables for no-await-in-loop/no-use-before-define, and updating a few rule-specific disables like no-empty-object-type).

Reviewed by Cursor Bugbot for commit df6cb7d. Bugbot is set up for automated code reviews on this repo. Configure here.

@joker23 joker23 force-pushed the skz/sdk-2276/eslint-9-flat-config branch from f87a58e to df6cb7d Compare April 30, 2026 15:00
@github-actions
Copy link
Copy Markdown
Contributor

@launchdarkly/js-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 25546 bytes
Compressed size limit: 29000
Uncompressed size: 125567 bytes

@github-actions
Copy link
Copy Markdown
Contributor

@launchdarkly/js-client-sdk size report
This is the brotli compressed size of the ESM build.
Compressed size: 31840 bytes
Compressed size limit: 34000
Uncompressed size: 113634 bytes

@github-actions
Copy link
Copy Markdown
Contributor

@launchdarkly/js-client-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 38403 bytes
Compressed size limit: 39000
Uncompressed size: 210781 bytes

@github-actions
Copy link
Copy Markdown
Contributor

@launchdarkly/browser size report
This is the brotli compressed size of the ESM build.
Compressed size: 179547 bytes
Compressed size limit: 200000
Uncompressed size: 830815 bytes

@joker23
Copy link
Copy Markdown
Contributor Author

joker23 commented Apr 30, 2026

@cursor review

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit df6cb7d. Configure here.

@@ -1,5 +1,5 @@
{
"extends": "./.svelte-kit/tsconfig.json",
"extends": "./tsconfig.eslint.json",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Svelte tsconfig.json extends wrong base config file

High Severity

The tsconfig.json now extends ./tsconfig.eslint.json instead of ./.svelte-kit/tsconfig.json. The .svelte-kit/tsconfig.json is generated by SvelteKit (via svelte-kit sync) and contains critical path aliases (like $lib, $app) and other settings required for proper TypeScript compilation and IDE support. The tsconfig.eslint.json is a simplified config intended only for ESLint's TypeScript parser. This change breaks the SvelteKit TypeScript integration for builds and IDE tooling.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit df6cb7d. Configure here.

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