import { defineConfig } from 'eslint/config' import baseConfig from './eslint.config.mjs' export default defineConfig([ { extends: [baseConfig], }, { files: ['**/*.ts', '**/*.tsx'], // This override adds type-checked rules. // Linting with type-checked rules is very slow and needs a lot of memory, // so we exclude non-essential files. // NOTE: eslint.config.mjs has a config block that mirrors these // `files`/`ignores` to override non-type-checked rules for the same set of // files. Keep both in sync if you change the globs. ignores: [ 'bench/**/*', // Eval fixtures are sandbox workspaces with their own package.json and // tsconfig, not repo code — EVAL.ts files may import modules that only // resolve inside the sandbox (e.g. @vercel/agent-eval/eval). 'evals/evals/**/*', 'evals/next-upgrade/cases/**/*', 'evals/next-upgrade/results/**/*', 'evals/next-upgrade/shared/**/*', 'evals/next-upgrade/verifier/upgrade.ts', 'evals/next-upgrade/verifier/nudge.ts', 'evals/next-upgrade/verifier/judge/**/*', 'evals/next-upgrade/apps/member-dashboard/behavior.spec.ts', 'examples/**/*', 'test/**/*', '**/*.d.ts', 'turbopack/**/*', ], languageOptions: { parserOptions: { project: true, }, }, // These rules are added on top of the rules that are declared in // the base config for the matching files. rules: { // TODO: enable in follow-up PR '@typescript-eslint/no-floating-promises': 'off', '@typescript-eslint/switch-exhaustiveness-check': [ 'error', { requireDefaultForNonUnion: true }, ], }, }, ])