-
-
Notifications
You must be signed in to change notification settings - Fork 638
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
Error: The prop value with an expression type of TSAsExpression could not be resolved. #565
Comments
Oy, yes. I think that jsx-ast-utils just needs to fail silently here. It's becoming way too disruptive. @ljharb @evcohen given the profusion of new AST node types (especially with TypsScript in the mix), think the best way forward here is for jsx-ast-util and eslint-plugin-jsx-a11y to just fail silently on unknown AST node types. We can't keep up with the rate of introduction. Rather than wait for jsx-eslint/jsx-ast-utils#77 to land, I'll just fix the projects with some defensive existence checks so that we don't disrupt the ecosystem with errors like this. |
I agree - it could still console.log the node type with a request to report an issue tho :-) |
Still working on this. Maintaining support for Node 4 and 5 is making it very difficult and burning my time. |
I ran into the same issue when trying to find ways to fix #580: <a href={"#" as any /* https://github.com/evcohen/eslint-plugin-jsx-a11y/issues/580 */}>link</a> It would be cool to at least drop the project name in messages like this. I am using this plugin through CRA3 and I had to google the message to find out what project produces it so that I know where to file that issue. For me it was just a result of running |
I also don't know how to disable this. ESLint has this to say to using {
// eslint-disable-next-line
}
<a href="#">link</a> Or this: <a
// eslint-disable-next-line
href="#">link</a> But neither works and I am not sure if this is due to the TSX AST parsing or not. The issue has since been silenced, please can you let me know if this is an issue with the AST parser here or not? If not, I will open a new issue with ESLint providing the above cases as reproes as they should work but don't. |
Since this is a parsing issue, there is no workaround but to completely disable the rule in your config. The issue likely needs to be fixed in this plugin or in jsx-ast-utils, and it’s awaiting a PR to do so. |
@JustFly1984 I'm flat out at work right now. I don't have time to address TSX parsing errors for at least another week. If you put up a PR, I'm glad to review. |
Hi! Any updates on this issue? We are facing this issue now as well.. Is there anything I can help out with to solve this issue? |
@TomasHubelbauer try an expression container around the comment
|
Fixed by updating to [email protected] |
I have my Gatsby.js project refactored to TypeScript, and while fixing my eslint config, and getting next error.
setting
'jsx-a11y/html-has-lang': 'off'
in eslint config solved issueThe text was updated successfully, but these errors were encountered: