Skip to content

Commit 0186c15

Browse files
committed
fix(evals): include root.tsx in React Router authkitLoader check
The grader pattern only checked routes/**/*.tsx but in React Router v7 Framework mode, authkitLoader belongs in app/root.tsx (the root layout). Updated pattern to match both root.tsx and routes/**/*.
1 parent dd7ba99 commit 0186c15

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/evals/graders/react-router.grader.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ export class ReactRouterGrader implements Grader {
3838
);
3939

4040
// Check authkitLoader usage in some route for auth state
41-
// Can be root route or any protected route
41+
// Can be root route (app/root.tsx in Framework mode) or any protected route
4242
checks.push(
4343
await this.fileGrader.checkFileWithPattern(
44-
'{app,src}/routes/**/*.{ts,tsx}',
44+
'{app,src}/{root,routes/**/*}.{ts,tsx}',
4545
['authkitLoader', '@workos-inc/authkit-react-router'],
4646
'authkitLoader for auth state in routes',
4747
),

0 commit comments

Comments
 (0)