Gelio / tslint-react-hooks

TSLint rule for detecting invalid uses of React Hooks
MIT License
218 stars 10 forks source link

Provide support for .tsx files #15

Closed enoh-barbu closed 5 years ago

enoh-barbu commented 5 years ago

I'm using create-react-app with typescript, I have installed the tsling plugin and made all related stuff but it doesn't work with .tsx files. If I change the file name to .ts it will identify the errors though.

Gelio commented 5 years ago

Do other rules work in *.tsx files 🙂?

This rule does not have any hardcoded limitation to handle only .ts files. It may be a configuration problem in your case, that .tsx files are not linted at all.

enoh-barbu commented 5 years ago

I did zero configuration for my demo project as I just used the command line to generate the project by using create-react-app with typescript flag, and after just installing the linting. I will try again with a fresh new project using the same approach.

Gelio commented 5 years ago

Were you able to reproduce the issue 🙂 ?

enoh-barbu commented 5 years ago

Hey, 10x for the reminder, I forgot about it, so I just did a fresh installation but same result. I think it might be also related to my editor. Let's just close this for now and if there will be more people complaining about the same issue, we might discuss further.