-
Notifications
You must be signed in to change notification settings - Fork 26.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(eslint): next/script
beforeInteractive
gives warning on appDir
#51148
fix(eslint): next/script
beforeInteractive
gives warning on appDir
#51148
Conversation
Allow CI Workflow Run
Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer |
Allow CI Workflow Run
Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer |
packages/eslint-plugin-next/src/rules/no-before-interactive-script-outside-document.ts
Outdated
Show resolved
Hide resolved
Co-authored-by: JJ Kasper <jj@jjsweb.site>
Stats from current PRDefault BuildGeneral
Client Bundles (main, webpack)
Legacy Client Bundles (polyfills)
Client Pages
Client Build Manifests
Rendered Page Sizes
Edge SSR bundle Size
Middleware size
Next Runtimes
|
- Moved removing root dir path from pathname as `removeProjectRootPath` - Added `any` type to node - Use consistent variable name `pathname` - Added `/` after `src` and `app` to inform it is checking for a path Co-authored-by: JJ Kasper <jj@jjsweb.site>
packages/eslint-plugin-next/src/rules/no-before-interactive-script-outside-document.ts
Outdated
Show resolved
Hide resolved
Co-authored-by: Tim Neutkens <timneutkens@me.com>
next/script
beforeInteractive
gives warning on appDir
@ijjk @timneutkens @shuding It's been a while, can we merge this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me 👍
@timneutkens Thank you!! Also, I've initiated |
Issue
The
context.getFilename()
gets the absolute path of the files, and the if statement to filter/src
and/app
was not working since #46609.Expected
Do not show a lint warning if use
beforeInteractive
insideappDir
.Fixes #46609 #50261