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

Error range for JSX components spans the whole compoenent #23116

Closed
mhegazy opened this issue Apr 3, 2018 · 0 comments
Closed

Error range for JSX components spans the whole compoenent #23116

mhegazy opened this issue Apr 3, 2018 · 0 comments
Assignees
Labels
Bug A bug in TypeScript Domain: JSX/TSX Relates to the JSX parser and emitter Fixed A PR has been merged for this issue

Comments

@mhegazy
Copy link
Contributor

mhegazy commented Apr 3, 2018

Missing attribute error highlights the whole component, which can be distracting, and does not help in pointing out the source of the problem. We should instead highlight the component name in these cases.

import React from "react";

export class MyComponent extends React.Component<{ abc: number }> {
}
 
<MyComponent
    key="hi"
    AnotherProperty="ss"
    YetAnotherProperty={
        {
            a: 0,
            b: "ss"
        }
    }
/>

image

Originally reported in https://twitter.com/keeskluskens/status/981168047204458501

@mhegazy mhegazy added Bug A bug in TypeScript Domain: JSX/TSX Relates to the JSX parser and emitter labels Apr 3, 2018
@mhegazy mhegazy added this to the TypeScript 2.9 milestone Apr 3, 2018
@mhegazy mhegazy added the Fixed A PR has been merged for this issue label Apr 4, 2018
@microsoft microsoft locked and limited conversation to collaborators Jul 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A bug in TypeScript Domain: JSX/TSX Relates to the JSX parser and emitter Fixed A PR has been merged for this issue
Projects
None yet
Development

No branches or pull requests

2 participants