fix(eslint): `next/script` `beforeInteractive` gives warning on appDir (#51148)
## 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` inside `appDir`.
Fixes #46609 #50261