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]: react/prop-types error detected on linux but won't on windows #3702

Open
2 tasks done
fauzanashari opened this issue Mar 6, 2024 · 6 comments
Open
2 tasks done
Labels

Comments

@fauzanashari
Copy link

Is there an existing issue for this?

  • I have searched the existing issues and my issue is unique
  • My issue appears in the command-line and not only in the text editor

Description Overview

windows detect react/prop-types error for only client component, and linux detect error from server and client component

windows:
image

linux:
image

I am develop nextjs 13 app with server component & client component without defining propTypes for both, but npm run lint only the detect error for client component. I cloned same code base on Fedora 38 and unlike window npm run lint detect error for both client and server component

npm run lint
npx next build

Expected Behavior

It should be output same error both windows or linux, since many developers use windows as dev env and linux as production.

windows:
image

linux:
image

eslint-plugin-react version

v7.33.2

eslint version

v8

node version

v18.19.1

@ljharb
Copy link
Member

ljharb commented Mar 6, 2024

Can you confirm on the command line that this behavior occurs (vscode isn’t the source of truth), and that both envs have the same deps at the same versions installed on disk?

@fauzanashari
Copy link
Author

Can you confirm on the command line that this behavior occurs (vscode isn’t the source of truth), and that both envs have the same deps at the same versions installed on disk?

linux
image

windows
image

both files location on ./src/app/role-permission/ubah/[id]/page.jsx and you can see in windows it doesn't even throw an error from these file

@erlanggaht
Copy link

The bug is in all Linux versions, mas ?

@ljharb
Copy link
Member

ljharb commented Mar 7, 2024

@fauzanashari what is [id]? is it literal square brackets (which might break many file system tools), or is it a placeholder for something else?

@fauzanashari
Copy link
Author

@fauzanashari what is [id]? is it literal square brackets (which might break many file system tools), or is it a placeholder for something else?

yes nextjs this is nextjs convention to create dynamic slug url https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes

@ljharb
Copy link
Member

ljharb commented Mar 12, 2024

interesting - i wonder if that's the issue. I'll try to create a test case to rule that out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants