Files
oh-my-opencode/packages/web/eslint.config.mjs
T

57 lines
1.3 KiB
JavaScript
Raw Normal View History

import globals from "globals"
import nextPlugin from "@next/eslint-plugin-next"
import prettier from "eslint-config-prettier/flat"
import tseslint from "typescript-eslint"
2026-05-18 20:55:59 +09:00
const nextCoreWebVitalsConfig = {
name: "next/core-web-vitals",
plugins: {
"@next/next": nextPlugin,
},
rules: {
...nextPlugin.configs.recommended.rules,
...nextPlugin.configs["core-web-vitals"].rules,
},
}
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,
},
},
},
2026-05-18 20:55:59 +09:00
nextCoreWebVitalsConfig,
...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",
},
},
]