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

React must be in scope in tsx file #193

Closed
JasonZough opened this issue Dec 22, 2018 · 4 comments
Closed

React must be in scope in tsx file #193

JasonZough opened this issue Dec 22, 2018 · 4 comments

Comments

@JasonZough
Copy link

I think this is a basical rule for tsx file.

@luhis
Copy link

luhis commented Feb 2, 2019

I think this sounds like a good idea. If it does not import React, it should just be a regular .ts file. I will have a go a see what I can do.

@luhis
Copy link

luhis commented Feb 2, 2019

i've had a go at this here:
https://github.com/luhis/tslint-react/commits/master

I think this might not quite feel right, as the rule linter doesn't know what is a React style file and what isn't. We could add a setting for it, so a setting to say that .tsx and .jsx must import react, but that sounds a bit messy. Does anyone have a better idea?

@adidahiya
Copy link
Contributor

Can you flesh out this rule proposal a bit more? What kind of code passes for this rule? What kind of code fails? Is this just about the file extension?

@adidahiya
Copy link
Contributor

Closing due to deprecation timeline, see #210

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

No branches or pull requests

3 participants