Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7

- uses: actions/setup-node@v4
- uses: actions/setup-node@v7
with:
node-version-file: '.nvmrc'
cache: npm
Expand Down
23 changes: 19 additions & 4 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,14 +1,29 @@
import { defineConfig, globalIgnores } from 'eslint/config';
import nextVitals from 'eslint-config-next/core-web-vitals';
import nextTs from 'eslint-config-next/typescript';
import * as espree from 'espree';

// ESLint 9 flat config, matching what the rest of the fleet's Next 16 apps use.
// Without a config file `eslint` exits non-zero with a migration notice, which
// would make a brand new site's first CI run red for reasons unrelated to its
// code — and a red first run is how a team learns to ignore CI.
// ESLint 10 flat config, matching the fleet's Next 16 apps (same two
// workarounds as evig's config, until upstream ships ESLint 10 releases):
//
// 1. eslint-config-next ships `settings.react.version: 'detect'`. Detection
// calls eslint-plugin-react's resolveBasedir(context), which still calls
// the removed `context.getFilename()` — eslint-plugin-react has no
// ESLint 10 release yet (peerDependencies cap at ^9.7 as of 7.37.5), so
// 'detect' throws on every file. Pin the version from package.json instead.
// 2. Plain .js/.mjs files are parsed via Next's own vendored babel parser,
// whose scope manager predates ESLint 10's Language API and crashes the
// run. None of these files use JSX, so plain espree covers them.
const eslintConfig = defineConfig([
...nextVitals,
...nextTs,
{
settings: { react: { version: '19.2.4' } },
},
{
files: ['**/*.js', '**/*.mjs'],
languageOptions: { parser: espree },
},
globalIgnores(['.next/**', 'out/**', 'build/**', 'next-env.d.ts']),
]);

Expand Down
Loading