Resolve all eslint errors and remove dead config files#2209
Open
tejhan wants to merge 1 commit into
Open
Conversation
Signed-off-by: tejhan-diallo <tejhan.diallo@gmail.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR aims to complete the ESLint flat-config migration cleanup by eliminating remaining lint errors (notably in fuzz tests) and removing legacy .eslintrc* configuration files, while keeping lint scripts working across the root and webview-ui packages.
Changes:
- Updates ESLint invocation/ignores for the repo and
webview-ui, and removes legacy.eslintrc*configs. - Refactors fuzz tests to satisfy rules like
no-unused-vars,prefer-template, andno-unused-expressions. - Tightens “no-parameters” webview message definitions by replacing
{}withRecord<string, never>.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| webview-ui/package.json | Updates lint scripts to no longer reference removed legacy config. |
| webview-ui/.eslintrc.cjs | Removes legacy ESLint config (post flat-config migration). |
| src/webview-contract/webviewDefinitions/kaitoModels.ts | Uses Record<string, never> for “empty” message payload types. |
| src/webview-contract/webviewDefinitions/kaitoManage.ts | Uses Record<string, never> for “empty” message payload types. |
| src/tests/fuzz/tcpdump-parsing.fuzz.test.ts | Adjusts catch clauses and assertions to satisfy ESLint rules. |
| src/tests/fuzz/kaito-gpu-parsing.fuzz.test.ts | Adjusts catch clauses and assertions to satisfy ESLint rules. |
| src/tests/fuzz/azure-api-utils.fuzz.test.ts | Fixes prefer-template and unused catch binding. |
| eslint.config.mjs | Adds **/*.mjs to ignores. |
| .eslintrc.js | Removes legacy ESLint config (post flat-config migration). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
.eslintrc.js:1
- This PR deletes
.eslintrc.js, but the rootpackage.jsonstill references it inlint:all/lint-fix:all(e.g.eslint -c .eslintrc.js ...). Unless PR #2210 is merged first (and this branch includes those script updates),npm run lint:allwill fail, which contradicts the PR description that both lint scripts pass cleanly.
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.
Description:
This PR fixes all 27 outstanding ESLint errors and removes dead configuration files.
Changes:
**/*.mjsto eslint ignorescatch (e)->catchfor unused vars in fuzz testsprefer-templateviolationsno-unused-expressionsfor chai assertions in fuzz tests{}withRecord<string, never>.eslintrc.jsandwebview-ui/.eslintrc.cjs(replaed post ESLint 10 flat config migration).eslintrc.cjsnpm run lintandnpm run lint:allnow both pass cleanly.See PR #2210 for necessary changes in our workflow files & package.json.