diff --git a/bugbait/eslint.config.mjs b/bugbait/eslint.config.mjs new file mode 100644 index 0000000..cc63788 --- /dev/null +++ b/bugbait/eslint.config.mjs @@ -0,0 +1,21 @@ +import { dirname } from 'node:path' +import { fileURLToPath } from 'node:url' +import { FlatCompat } from '@eslint/eslintrc' + +/* + * Same shape as `traces/eslint.config.mjs`, and for the same reason: `eslint-config-next@15.5` + * still ships eslintrc-format objects, so `compat.extends()` is the only form that resolves, + * and `next lint` with no config on disk drops into an interactive prompt rather than linting. + */ +const compat = new FlatCompat({ + baseDirectory: dirname(fileURLToPath(import.meta.url)), +}) + +const eslintConfig = [ + { + ignores: ['.next/**', 'out/**', 'node_modules/**', 'public/**', 'next-env.d.ts'], + }, + ...compat.extends('next/core-web-vitals', 'next/typescript'), +] + +export default eslintConfig diff --git a/bugbait/package-lock.json b/bugbait/package-lock.json index 24bbe6d..019726d 100644 --- a/bugbait/package-lock.json +++ b/bugbait/package-lock.json @@ -16,6 +16,7 @@ "rrweb": "2.0.0-alpha.18" }, "devDependencies": { + "@eslint/eslintrc": "^3.3.6", "@types/node": "^22.0.0", "@types/react": "^19.0.0", "@types/react-dom": "^19.0.0", diff --git a/bugbait/package.json b/bugbait/package.json index ecb1bb0..0d56a96 100644 --- a/bugbait/package.json +++ b/bugbait/package.json @@ -8,7 +8,7 @@ "dev": "next dev --port 3001", "build": "next build", "start": "next start --port 3001", - "lint": "next lint", + "lint": "eslint . --max-warnings=0", "typecheck": "tsc --noEmit", "record:fixtures": "node scripts/record-fixtures.mjs" }, @@ -20,6 +20,7 @@ "rrweb": "2.0.0-alpha.18" }, "devDependencies": { + "@eslint/eslintrc": "^3.3.6", "@types/node": "^22.0.0", "@types/react": "^19.0.0", "@types/react-dom": "^19.0.0", diff --git a/traces/eslint.config.mjs b/traces/eslint.config.mjs new file mode 100644 index 0000000..4a76786 --- /dev/null +++ b/traces/eslint.config.mjs @@ -0,0 +1,25 @@ +import { dirname } from 'node:path' +import { fileURLToPath } from 'node:url' +import { FlatCompat } from '@eslint/eslintrc' + +/* + * Flat config, driven through `FlatCompat`, because `eslint-config-next@15.5` still ships + * eslintrc-format objects — `core-web-vitals.js` is a bare `module.exports = { extends: [...] }`, + * not a flat array. Next 16 adds real flat exports you can spread directly; until this project + * moves, `compat.extends()` is the only form that resolves. + * + * This file exists because `next lint` is gone in Next 16 and already deprecated here: with no + * config on disk it drops into an interactive "how would you like to configure ESLint?" prompt, + * so `npm run lint` in a clean clone never returns a lint result at all. The script now calls + * `eslint .` directly. + */ +const compat = new FlatCompat({ + baseDirectory: dirname(fileURLToPath(import.meta.url)), +}) + +export default [ + { + ignores: ['.next/**', 'out/**', 'node_modules/**', 'public/**'], + }, + ...compat.extends('next/core-web-vitals', 'next/typescript'), +] diff --git a/traces/package-lock.json b/traces/package-lock.json index 3accc5e..d7eb8c9 100644 --- a/traces/package-lock.json +++ b/traces/package-lock.json @@ -18,6 +18,7 @@ "zustand": "^5.0.0" }, "devDependencies": { + "@eslint/eslintrc": "^3.3.6", "@types/node": "^22.0.0", "@types/react": "^19.0.0", "@types/react-dom": "^19.0.0", diff --git a/traces/package.json b/traces/package.json index 6c2019e..8908f27 100644 --- a/traces/package.json +++ b/traces/package.json @@ -8,7 +8,7 @@ "dev": "next dev", "build": "next build", "start": "next start", - "lint": "next lint", + "lint": "eslint . --ignore-pattern next-env.d.ts", "typecheck": "tsc --noEmit", "test": "vitest run", "test:watch": "vitest" @@ -23,6 +23,7 @@ "zustand": "^5.0.0" }, "devDependencies": { + "@eslint/eslintrc": "^3.3.6", "@types/node": "^22.0.0", "@types/react": "^19.0.0", "@types/react-dom": "^19.0.0", diff --git a/traces/src/components/timeline/timeline.tsx b/traces/src/components/timeline/timeline.tsx index 600bb77..a75a27b 100644 --- a/traces/src/components/timeline/timeline.tsx +++ b/traces/src/components/timeline/timeline.tsx @@ -123,7 +123,7 @@ export function Timeline() { Nothing on this timeline yet — no recording is loaded. - Load a sample from the list above. Your marks and the agent's findings will then share this + Load a sample from the list above. Your marks and the agent's findings will then share this axis, labelled by who found them.