Repository navigation
chore(deps): fix #868 #872 eslint 9 upgrade and #874 #875 override pins - #1249
Merged
vjuliaife merged 1 commit intoOct 18, 2026
Conversation
|
@Owolabenjade Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Deployment failed for project tariff-shield-web with the following error: Learn More: https://vercel.com/docs/concepts/projects/project-configuration |
Owolabenjade
force-pushed
the
chore/eslint9-flat-config-and-override-fixes-868-872-874-875
branch
from
October 18, 2026 01:57
498d78d to
b120320
Compare
|
Deployment failed for project tariff-shield-web with the following error: Learn More: https://vercel.com/docs/concepts/projects/project-configuration |
This branch had an error being deployed
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.
Closes #868
Closes #872
Closes #874
Closes #875
This PR moves the monorepo's lint toolchain to ESLint 9 with flat config (#868), and moves
apps/webtoeslint-config-next16 to match the installed Next.js 16 (#872). It also correctsthe security overrides for
axios(#874) andpostcss(#875). Onmain,npm run lintcurrentlyfails in all three linted workspaces. After this PR it exits 0 in
packages/sdk,apps/apiandapps/web.#868 — ESLint 8 → 9, flat config
ESLint 8 is end-of-life, and the repo still used legacy
.eslintrcfiles. Dependency changes:eslint^8.57.0→^9.39.5, in both the root andapps/web.@typescript-eslint/parserand@typescript-eslint/eslint-pluginv7 are replaced by thesingle
typescript-eslint^8.71.1package, plus@eslint/js^9.39.5. This is required,because typescript-eslint v7 only supports
eslint ^8.56.0.How config resolution works now:
eslint.config.*from the working directory upwards, and flat config does notcascade. So the old "root
.eslintrc.js+ nested.eslintrc.json" layout becomes:eslint.config.mjsat the root: global ignores plus the shared config.apps/api,packages/sdkand scripts use it, sonpm run lint --workspace=<x>keeps working with noper-workspace file.
apps/web/eslint.config.mjs: the shared config, theneslint-config-next/core-web-vitals, in the same order as the oldextends..eslintrc*files are deleted.eslint-config-tariffshield(packages/eslint-config) is now a flat config array:@eslint/jsrecommended + typescript-eslint recommended + the same three project rule tweaks.Its peer dependencies are now
eslint >=9,@eslint/js >=9andtypescript-eslint >=8.parserOptions.projectis dropped. No enabled rule uses type information, so building aTypeScript program for three tsconfigs on every lint run was pure overhead.
eslint --fixfrom the repo root. With a working-directory-only lookup,staged
apps/webfiles would silently lose the Next rules they got from the old cascade. Thecommand now passes
--flag v10_config_lookup_from_file, an active ESLint 9 flag that becomes thedefault in ESLint 10, so each file resolves its nearest config. Verified: a web file gets 22
@next/*rules with the flag and 0 without it.Rule changes from ESLint 9 / typescript-eslint 8 were reconciled rather than silenced:
no-unused-varsnow defaults tocaughtErrors: "all". AddedcaughtErrorsIgnorePattern: "^_", which matches the repo's existing_convention(
catch (_err)). The one genuinely unusedcatch (err)becamecatch {.@typescript-eslint/no-var-requiresis deprecated, andrecommendednow enablesno-require-imports. The onerequire()was fixed (SDK, below).reportUnusedDisableDirectivesnow defaults towarn, which fails--max-warnings 0. One stalereact-hooks/exhaustive-depsdirective was removed; its dependency array is already complete.#872 — eslint-config-next 15 → 16
eslint-config-next^15.5.11→^16.3.1, the same range asnextand@next/bundle-analyzer. It resolves to 16.4.2, ships native flat configs, peerseslint >=9,and dedupes onto the root
typescript-eslint(one copy in the tree, so no plugin-redefinitionconflict).
next lintis gone(already replaced by the
eslintCLI), and there is noeslintoption innext.config.ts.eslint-plugin-react-hooks7, whoserecommendednow includes React Compiler diagnostics. Three fire:set-state-in-effect(15 sites),
immutability(1) andpreserve-manual-memoization(1). This app does not enablethe React Compiler, and both React's docs and the Next 16 guide say it should not be enabled just
to finish an upgrade. So these three rules are turned off in
apps/webonly.rules-of-hooks(error) andexhaustive-deps(warn) keep exactly the severities they had underv15. Refactoring 13 files of state logic is left as a follow-up.
mainthat blocked "lint exits 0":components/Nav.tsxhad a JSX parse error. Merge12171a3had spliced the user menu into therelease-notes drawer, so the drawer's opening markup was gone and the menu was duplicated. It
is rebuilt from both merge parents: the drawer comes from
27d7a97, and the "Account settings"link from
933cf96. Onmainthe file does not parse, so every page that renders<Nav />fails to compile.
app/surety/page.tsxrendered<BrandingEditor />without importing it. The import (added inc3120b6, lost later) is restored.#874 — axios override
The issue says
1.19.0doesn't exist. It does (published 2026-07-29), and the override was alreadywidened to
^1.19.0. The real problem is the floor. On 2026-09-30 GitHub publishedCVE-2026-101898 through CVE-2026-101909: 12 advisories, 7 high and 5 medium, covering SSRF,
ReDoS, header injection, proxy bypass and prototype pollution. Every one of them affects 1.19.0,
and all are patched in 1.20.0.
overrides.axios^1.19.0→^1.20.0.@stellar/stellar-sdk@15.1.0, pinsaxios 1.15.0exactly; the overridelifts it.
axios@1.20.0, with no override warnings. No published advisoryaffects 1.20.0.
#875 — postcss override
apps/webalready declarespostcss^8.5.25, the same as the root override, so the manifestnow reflects what is installed.
nextdepends onpostcssexactly8.5.23, while@tailwindcss/postcsswants
^8.5.16. The override collapses both onto one hoisted copy, with a floor above everyPostCSS advisory (CVE-2026-41305, CVE-2026-45623, CVE-2026-73646, CVE-2026-69153).
postcss@8.5.30across all workspaces. Tailwind/PostCSS compilesapps/web/app/globals.csscleanly.Override rationale: JSON has no comments, so both overrides are documented in a top-level
"//"array placed directly aboveoverridesinpackage.json. npm ignores the key, still appliesthe overrides, and keeps the key when it rewrites the file (verified with npm 10).
SDK fix needed for lint, and a real bug
verifyWebhookSignatureinpackages/sdkcalledrequire('crypto')insidetry { } catch {}. TheSDK is built as ESM (
"type": "module"), whererequireis undefined. The emptycatchswallowedthe
ReferenceError, so every valid webhook signature was rejected. It now uses a staticimport { createHmac, timingSafeEqual } from 'node:crypto'. The SDK already targets Node: it hastypes: ["node"]andBufferin its public signature. It also checks lengths beforetimingSafeEqual, which throws on unequal lengths.Why this matters
main, all three workspaces fail lint.Changed
package.json:eslint^9.39.5; added@eslint/js^9.39.5andtypescript-eslint^8.71.1; removed@typescript-eslint/parserand@typescript-eslint/eslint-pluginv7.eslint --fix --flag v10_config_lookup_from_file, so stagedapps/webfiles keep the Next rules.
eslint.config.mjsat the root. Deleted.eslintrc.js,apps/api/.eslintrc.json,apps/web/.eslintrc.jsonandpackages/sdk/.eslintrc.json.packages/eslint-config: flat config array; peerseslint >=9,@eslint/js >=9,typescript-eslint >=8;caughtErrorsIgnorePattern: "^_"; README rewritten for flat config.CONTRIBUTING.md: lint-config guidance updated foreslint.config.mjs.packages/sdk/src/index.ts:node:cryptoimport in place ofrequire, which also fixeswebhook verification always returning
false.apps/api: removed unused imports (ALLOWED_WEBHOOK_EVENT_TYPES,WebhookEventType,logAudit), the never-calledloadTicketFor, an unused catch binding, and\'escapes intemplate literals.
apps/web/package.json:eslint^9.39.5;eslint-config-next^16.3.1.apps/web/eslint.config.mjs: shared config +core-web-vitals; the three ReactCompiler diagnostics are off.
apps/web/components/Nav.tsx: repaired the broken merge (parse error), keeping therelease-notes drawer and the "Account settings" link.
apps/web/app/surety/page.tsx: restored theBrandingEditorimport.apps/web/app/app/page.tsx: removed a staleeslint-disabledirective.package.json:overrides.axios^1.19.0→^1.20.0(CVE-2026-101898 throughCVE-2026-101909).
package.json:"//"rationale for the axios and postcss overrides.apps/webpostcss^8.5.25matches the root override (no manifest changeneeded).
package-lock.json: regenerated for the ESLint toolchain swap only (eslint, typescript-eslint,eslint-config-next and their transitive dependencies).
Testing
Run on Node 22.20.0. The clean install used CI's npm 10.8.2, in a fresh worktree of the commit.
Ad-hoc checks (scripts not committed):
npx tsx verify-webhook.mts <file URL of packages/sdk/src/index.ts>,run against this branch and against
main's version of the file.node verify-postcss.mjs <path to apps/web>, which compilesapp/globals.cssthrough the app's ownpostcss.config.mjs.mainnpm ci(npm 10.8.2)packages/sdk/apps/api/apps/webnpm test --workspace=packages/sdknpm ls axios/npm ls postcssaxios@1.20.0/ onepostcss@8.5.30; tree valid@next/*rulesrules-of-hooks/exhaustive-depsverifyWebhookSignature, valid signature (string / Buffer)false/falsetrue/truefalsefalseglobals.cssvia PostCSS + Tailwindtsc --noEmitsdk / apitsc --noEmitwebNav.tsx)KycUploadDropzone); none in changed codecommitlintScope Notes
what lint required: dead-code removal in
apps/api, the two web fixes, and the SDK webhook fix.behaviour changes (
apps/apiedits only remove unused code), no CI workflow changes.mainit is a syntax error),with the release-notes drawer and the importer "Account settings" link from both merge parents.
verifyWebhookSignaturenow returnstruefor valid signatures; onmainit always returnedfalsein ESM.^9.xas the issue specifies, although ESLint 10 is nowlatest.eslint-config-next16.4+ supports both.main:apps/web/eslint.config.mjs;@sentry/nextjsv11 migration (withSentryConfig,enableLogs), which currently breaksnext buildandtscinapps/web;tscerrors inapps/api;format:checkinapps/web);docs/test-strategy.md:146still mentionsnext lint.--no-verify. The pre-commit hook runstsc --noEmitover all ofapps/apiandapps/web, and those already fail onmain, so any commit touching thoseworkspaces is blocked. Lint, typecheck comparison and commitlint were run manually (above).
Push Command