Skip to content

Resolve all eslint errors and remove dead config files#2209

Open
tejhan wants to merge 1 commit into
Azure:mainfrom
tejhan:fix/eslint-cleanup
Open

Resolve all eslint errors and remove dead config files#2209
tejhan wants to merge 1 commit into
Azure:mainfrom
tejhan:fix/eslint-cleanup

Conversation

@tejhan
Copy link
Copy Markdown
Collaborator

@tejhan tejhan commented Jun 4, 2026

Description:

This PR fixes all 27 outstanding ESLint errors and removes dead configuration files.

Changes:

  • Add **/*.mjs to eslint ignores
  • Fix catch (e) -> catch for unused vars in fuzz tests
  • Fix prefer-template violations
  • Fix no-unused-expressions for chai assertions in fuzz tests
  • Replace {} with Record<string, never>
  • Delete .eslintrc.js and webview-ui/.eslintrc.cjs (replaed post ESLint 10 flat config migration)
  • Fix webview-ui lint script to not reference deleted .eslintrc.cjs

npm run lint and npm run lint:all now both pass cleanly.

See PR #2210 for necessary changes in our workflow files & package.json.

Signed-off-by: tejhan-diallo <tejhan.diallo@gmail.com>
@tejhan tejhan self-assigned this Jun 4, 2026
@tejhan tejhan changed the title Rresolve all eslint errors and remove dead config files Resolve all eslint errors and remove dead config files Jun 4, 2026
@tejhan tejhan requested a review from Copilot June 4, 2026 21:22
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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, and no-unused-expressions.
  • Tightens “no-parameters” webview message definitions by replacing {} with Record<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.

Comment thread eslint.config.mjs
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 root package.json still references it in lint: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:all will fail, which contradicts the PR description that both lint scripts pass cleanly.

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.

2 participants