-
Notifications
You must be signed in to change notification settings - Fork 465
JSX4: loc missing in error for not existing prop #5957
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
Comments
@mununki Sorry for not specifying this in detail. I am using 10.1.1 with JSX4 automatic mode. It seems the problem occurs in automatic mode only. You can also check this here (upcoming 10.1.2 playground, not sure how long the link will work): https://rescript-lang-7alwuc0qv-rescript-association.vercel.app/try?version=v10.1.2&code=ALBWGcA8GEHsDsBmBLA5gCgN4AIBuBTAJ3GQQC5sAWAGmwFtYATfCgIgEMBXAF1jve7IAxq2wBfAJQAoKQ0acANvmwBBbAF5smKdmzBC+dkO4A6IXwAOCfPG47sS7vXYBrZZvQSNAPmwAlQ2MTeEUFKTEZfUDTczoreBs7R2c3DWxPH2wAHjVwPnwABUJYC3VMLMZkXGwAem8xWu8pIA |
The simple example would be: @@jsxConfig({version:4, mode: "automatic"})
let _ = <A someProp={<b />} /> I found that the loc of `someProp" is missing in three cases:
Only classic, lowercase I'll look into it. |
In certain cases, when referencing a prop that does not exist, the loc information seems to get lost.
E.g. for
the error message does not show in which line the error occurred:
and the error is shown in VS Code like this:
Compare with this case which works fine:
It gives
The text was updated successfully, but these errors were encountered: