Skip to content
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

[🐛 Bug]: ESLint rule no-app-not-found-runtime is exported as no-app-not-found #530

Closed
1 task done
mattiasw opened this issue Nov 10, 2023 · 2 comments · Fixed by #539
Closed
1 task done

[🐛 Bug]: ESLint rule no-app-not-found-runtime is exported as no-app-not-found #530

mattiasw opened this issue Nov 10, 2023 · 2 comments · Fixed by #539
Assignees
Labels
bug Something isn't working

Comments

@mattiasw
Copy link
Contributor

mattiasw commented Nov 10, 2023

next-on-pages environment related information

System:
	Platform: darwin
	Arch: arm64
	Version: Darwin Kernel Version 23.0.0: Fri Sep 15 14:41:43 PDT 2023; root:xnu-10002.1.13~1/RELEASE_ARM64_T6000
	CPU: (10) arm64 Apple M1 Pro
	Memory: 16 GB
	Shell: /bin/zsh
Package Manager Used: npm (10.1.0)

Relevant Packages:
	@cloudflare/next-on-pages: 1.7.2
	vercel: N/A
	next: N/A

Description

The ESLint rule that is called no-app-not-found-runtime in the documentation is exported as no-app-not-found.

Reproduction

  1. Install the ESLint plugin and make sure the rule next-on-pages/no-app-not-found-runtime is set.
  2. Add export const runtime = 'edge'; to the not-found.tsx page.
  3. Run linting.

No error. But if changing the name to next-on-pages/no-app-not-found it works.

Pages Deployment Method

None

Pages Deployment ID

No response

Additional Information

I can make a PR if you tell me whether it's best to change the documentation or to change the export.

Would you like to help?

  • Would you like to help fixing this bug?
@dario-piotrowicz
Copy link
Member

dario-piotrowicz commented Nov 10, 2023

Thanks a lot for raising this @mattiasw 😄

ah... yeah you're totally right! 😓

'no-app-not-found': noAppNotFound,

'next-on-pages/no-app-not-found': 'error',

That's my bad, I think that the two lines above are the only places that need this changed, since you ticket that you'd like to help fixing this bug, please let me know if you want to apply the changes or if I should 🙂

(PS: updating this is technically a breaking change... but I think it could be added as a patch since the rule name is actually wrong (and the docs do indicate it with the correct name) 🤔)

@mattiasw
Copy link
Contributor Author

I can do it. I was also wondering if this would be considered a breaking change or not. But I'm with you, the documented API will not change, it will just start working. :-)

mattiasw added a commit to mattiasw/next-on-pages that referenced this issue Nov 11, 2023
mattiasw added a commit to mattiasw/next-on-pages that referenced this issue Nov 11, 2023
mattiasw added a commit to mattiasw/next-on-pages that referenced this issue Nov 12, 2023
mattiasw added a commit to mattiasw/next-on-pages that referenced this issue Nov 12, 2023
dario-piotrowicz pushed a commit that referenced this issue Nov 13, 2023
* Use correct name for export of no-app-not-found-runtime lint rule

Fixes #530

* Add support for src folder to no-app-not-found-runtime lint rule

Fixes #531
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants