fix: eslint not ignoring "/app" (#50261)
## Why? ``` src/app/layout.tsx ```  **eslint[@next/next/no-before-interactive-script-outside-document](https://nextjs.org/docs/messages/no-before-interactive-script-outside-document)** > `next/script`'s `beforeInteractive` strategy should not be used outside of `pages/_document.js`. ## How? - Possibility of pathname starts with "/" on OS X and Linux, so added condition to check file path starting with "/" - e.g. "/src/app" or "/app" - Added test code Passed - `pnpm build && pnpm lint` - `pnpm jest test/unit/eslint-plugin-next/no-before-interactive-script-outside-document.test.ts` Extends #46609 Fixes #50096 Fixes NEXT-1230
Showing
Please
register
or
sign in
to comment