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
2 changes: 1 addition & 1 deletion eslint-rules/require-aal2-gate.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ const rule = {
},
},
create(context) {
const filename = context.filename ?? context.getFilename();
const filename = context.filename;
// Scope: only `app/api/**/route.ts` (skip tests + non-route
// files). The test suffix check is belt-and-braces; tests
// shouldn't even contain route bodies.
Expand Down
11 changes: 8 additions & 3 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
import next from "eslint-config-next";
import nextCoreWebVitals from "eslint-config-next/core-web-vitals";
import nextTypescript from "eslint-config-next/typescript";
import { fixupConfigRules } from "@eslint/compat";
import { maqroPlugin } from "./eslint-rules/index.js";

const eslintConfig = [
...next,
...nextCoreWebVitals,
...nextTypescript,
// eslint-config-next's bundled plugins (react, jsx-a11y, import) don't yet
// support ESLint 10 (removed context.getFilename & co.) — fixup re-adds the
// removed APIs. Drop once eslint-config-next ships ESLint-10-ready plugins:
// https://github.com/vercel/next.js/issues/89764
...fixupConfigRules(next),
...fixupConfigRules(nextCoreWebVitals),
...fixupConfigRules(nextTypescript),
{
rules: {
"@typescript-eslint/no-unused-vars": "warn",
Expand Down
Loading