Files
oh-my-opencode/web/eslint.config.mjs
T
YeonGyu-Kim e02166d6b7 fix(web): downgrade Next.js 16.2.6 -> 15.5.18 to unblock Cloudflare deploy
The first auto-deploy from PR #3855 returned HTTP 500 on every page
with the runtime error `TypeError: components.ComponentMod.handler is
not a function`. Captured via `wrangler tail`.

Root cause: Next.js 16.2.6 was published 2026-05-07 19:01 UTC, *after*
@opennextjs/cloudflare 1.19.8 was published earlier the same day at
11:33 UTC. OpenNext 1.19.8's peerDependency declares
`next: '>=15.5.16 <16 || >=16.2.5'` — 16.2.6 falls inside the range
syntactically, but the route component module export shape changed in
that patch and OpenNext has not caught up yet.

Pin Next + eslint-config-next to 15.5.18 (latest 15.x LTS, the other
half of OpenNext's supported range). Revert the migration-only changes
that came with the 16 bump:

- eslint.config.mjs: `nextPlugin.configs["core-web-vitals"]` (v16
  shape) -> `nextPlugin.flatConfig.coreWebVitals` (v15 shape).
- tsconfig.json: `jsx: "react-jsx"` -> `jsx: "preserve"` (Next 15
  default).
- tsconfig.json: add `noUncheckedSideEffectImports: false` because
  TypeScript 6 enabled this option under `strict` and Next 15's
  bundled types do not declare ambient CSS modules (Next 16 does).

All other web/ deps stay at latest. lucide-react remains pinned at
0.577.0 from #3853 for the same brand-icon reason. Re-evaluate Next 16
when @opennextjs/cloudflare ships a release explicitly tested against
\>= 16.2.6.
2026-05-08 15:25:51 +09:00

46 lines
1.0 KiB
JavaScript

import globals from "globals"
import nextPlugin from "@next/eslint-plugin-next"
import prettier from "eslint-config-prettier/flat"
import tseslint from "typescript-eslint"
export default [
{
ignores: [".next/**", "out/**", "build/**", "next-env.d.ts"],
},
{
files: ["**/*.{js,mjs,cjs,ts,tsx,jsx}"],
languageOptions: {
ecmaVersion: "latest",
sourceType: "module",
globals: {
...globals.browser,
...globals.nodeBuiltin,
},
},
},
nextPlugin.flatConfig.coreWebVitals,
...tseslint.configs.recommended,
prettier,
{
rules: {
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-unused-vars": [
"error",
{
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
},
],
"@typescript-eslint/consistent-type-imports": [
"error",
{
prefer: "type-imports",
},
],
"no-console": ["warn", { allow: ["warn", "error"] }],
"prefer-const": "error",
"no-var": "error",
},
},
]