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
Tooling-only change but touches many workspaces and eslint rules/ignores, so it may break local/CI linting behavior or start flagging new violations until configs stabilize.

Overview
Moves from legacy .eslintrc/.eslintignore to a root ESLint v9 flat config in eslint.config.mjs, consolidating ignore patterns, TypeScript project settings, import resolution, and jest/test overrides.

Updates root and workspace package.json files to ESLint v9-compatible deps (@eslint/js, typescript-eslint, eslint-plugin-import-x, eslint-import-resolver-typescript, globals, newer eslint-plugin-jest) and simplifies lint scripts to eslint . / eslint . --fix.

Applies small codebase-wide lint cleanups/overrides (removing many inline eslint-disable comments, adding a few targeted disables, and tweaking TS/ESLint-related typing suppressions) and drops package-local ESLint configs that are now covered by the root configuration.

Reviewed by Cursor Bugbot for commit f082d51. 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

github-actions Bot commented Apr 30, 2026

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 30, 2026

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 30, 2026

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 30, 2026

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

@joker23
Copy link
Copy Markdown
Contributor Author

joker23 commented Apr 30, 2026

@cursor review

@@ -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.

@joker23 joker23 force-pushed the skz/sdk-2276/eslint-9-flat-config branch from df6cb7d to f082d51 Compare May 5, 2026 15:03
@joker23
Copy link
Copy Markdown
Contributor Author

joker23 commented May 5, 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.

There are 2 total unresolved issues (including 1 from previous review).

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 f082d51. Configure here.

Comment thread eslint.config.mjs
// TODO: a lot of our examples fail this one, will need to check
'import-x/no-unresolved': 'off',
},
},
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Console override commented out contradicting section intent

Medium Severity

The config section is titled "allow console" for examples, contract-tests, and tooling packages, but 'no-console': 'off' on line 196 is commented out. Combined with the newly introduced 'no-console': 'error' base rule (line 142), this means console usage in these directories will now trigger lint errors unless individual files have their own eslint-disable comment. Files in packages/tooling/ that use console without file-level disables will now fail linting.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit f082d51. Configure here.

@joker23 joker23 force-pushed the skz/sdk-2276/eslint-9-flat-config branch from f082d51 to c0d60d5 Compare May 8, 2026 15:28
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