Clean up deprecated ESLint rules - #288198
Open
TamerlanG wants to merge 4 commits into
Open
Conversation
TamerlanG
marked this pull request as ready for review
August 31, 2026 20:35
|
Pinging @elastic/kibana-operations (Team:Operations) |
Contributor
💛 Build succeeded, but was flaky
Failed CI Steps
Metrics [docs]Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
Test Failures
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
no-new-symbolwith its ESLint successor,no-new-native-nonconstructor@typescript-eslint/prefer-ts-expect-errorpolicy with an equivalentban-ts-commentconfigurationno-return-await, obsoletejsx-a11y/no-onchange, and stale@typescript-eslint/no-undefconfigurationone-var-declaration-per-line,padded-blocks, andquotesassignments already neutralized by the final Prettier overridejsx-a11y/no-onchangesuppressionsWhy
These rules are deprecated, obsolete, invalid, or ineffective. Cleaning them up now avoids carrying known ESLint policy debt into the ongoing Oxlint migration. The successor rules preserve the intended constraints while tracking maintained implementations.
Deprecation and removal evidence
no-new-symboldeprecated since v9 and directs users tono-new-native-nonconstructor.prefer-ts-expect-errordeprecated and directs users toban-ts-comment.no-return-awaitbecause modern ECMAScript no longer adds an extra microtask and returning an awaited promise improves stack traces.no-onchangeas deprecated because the browser behavior it targeted was corrected.no-undefextension rule and recommends disabling coreno-undeffor TypeScript.one-var-declaration-per-line,padded-blocks, andquotesdeprecated formatting rules; Kibana already disables them through its finaleslint-config-prettieroverride.This PR deliberately leaves
@typescript-eslint/no-empty-interfaceand@typescript-eslint/no-var-requiresunchanged. Their successors broaden enforcement:no-empty-object-typeaffects existing empty contracts and suppressions, whileno-require-importsalso rejects standalone side-effectrequire()calls. Those require dedicated migrations rather than a configuration-only cleanup.Verification
no-new-native-nonconstructordirectly with Kibana's pinned ESLint 8.57.0: it reports bothnew Symbol()andnew BigInt()and ignores shadowed constructorsno-new-native-nonconstructorin the intended scopesban-ts-commentpolicy rejects@ts-ignorewhile allowing@ts-expect-erroryarn kbn bootstrapnode scripts/eslint_all_files --no-cache(102,948 files)