mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-25 16:55:59 +03:00
[PR #5773] [MERGED] feat: migrate ESLint to v9 across packages #5344
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#5344
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/hoppscotch/hoppscotch/pull/5773
Author: @jamesgeorge007
Created: 1/14/2026
Status: ✅ Merged
Merged: 1/20/2026
Merged by: @jamesgeorge007
Base:
next← Head:feat/eslint-v9-migration📝 Commits (3)
d9204bbfeat: migrate ESLint from v8 to v9 across packages978d8c2feat: extend eslint v9 to desktop, kernel, agent20230fbfix(agent): remaining eslint warnings and errors📊 Changes
88 files changed (+3194 additions, -3234 deletions)
View changed files
➕
packages/hoppscotch-agent/eslint.config.mjs(+67 -0)📝
packages/hoppscotch-agent/package.json(+16 -1)📝
packages/hoppscotch-agent/src/App.vue(+30 -18)📝
packages/hoppscotch-agent/src/main.ts(+4 -6)📝
packages/hoppscotch-agent/src/pages/otp.vue(+17 -11)📝
packages/hoppscotch-agent/src/pages/registrations.vue(+20 -9)➖
packages/hoppscotch-common/.eslintrc.js(+0 -83)➕
packages/hoppscotch-common/eslint.config.mjs(+96 -0)📝
packages/hoppscotch-common/package.json(+7 -4)📝
packages/hoppscotch-common/src/components/accessTokens/index.vue(+3 -3)📝
packages/hoppscotch-common/src/components/aiexperiments/MergeView.vue(+0 -1)📝
packages/hoppscotch-common/src/components/app/spotlight/entry/GQLRequest.vue(+1 -1)📝
packages/hoppscotch-common/src/components/app/spotlight/entry/RESTRequest.vue(+1 -1)📝
packages/hoppscotch-common/src/components/collections/ImportExport.vue(+2 -2)📝
packages/hoppscotch-common/src/components/collections/documentation/index.vue(+1 -1)📝
packages/hoppscotch-common/src/components/collections/documentation/sections/RequestBody.vue(+2 -2)📝
packages/hoppscotch-common/src/components/collections/documentation/sections/Response.vue(+2 -2)📝
packages/hoppscotch-common/src/components/graphql/Query.vue(+3 -3)📝
packages/hoppscotch-common/src/components/graphql/RequestOptions.vue(+2 -2)📝
packages/hoppscotch-common/src/components/http/Request.vue(+1 -1)...and 68 more files
📄 Description
This PR migrates the ESLint configuration across four packages from
v8tov9, adopting the new flat config format and updating all related tooling to ensure compatibility with the latest ESLint ecosystem.Closes FE-1108.
ESLint v9 introduces significant improvements:
Staying on v8 would eventually block us from:
What's Changed
v8.57.0→v9.39.2acrossjs-sandbox,common,desktop, andselfhost-webpackages..eslintrc.js/.cjsfiles witheslint.config.mjs(flat config format using ES modules).@vue/eslint-config-typescript v14'sdefineConfigWithVueTsAPI for Vue + TypeScript integration.v8behavioural parity:@typescript-eslint/no-unused-expressions- new rule inv14that flags valid Vue expressions.@typescript-eslint/no-unsafe-function-type- new rule flaggingFunctiontype usage.@typescript-eslint/ban-types- maintains implicitv8behavior.v14's improved TypeScript parser (variables prefixed with_when intentionally unused).--extand--ignore-pathflags (flat config handles these automatically).@ts-expect-errordirective usages.Rule Preservation:
All existing lint rules remain unchanged. The
@typescript-eslint/no-unused-varsrule is enabled with conditional severity and ignore patterns (argsIgnorePattern,varsIgnorePattern,caughtErrorsIgnorePattern), matching the v8 configuration exactly.Config Format Change:
The flat config uses the
defineConfigWithVueTshelper from@vue/eslint-config-typescript v14, which provides native ESLint 9 support without requiring compatibility layers:Testing:
Note to reviewers
Please cross-check and confirm that there are no remaining reference errors, particularly in the usage of error arguments within catch blocks.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.