Skip to content
This repository has been archived by the owner on Jan 19, 2019. It is now read-only.

Known issues with JSX and eslint-plugin-react #213

Closed
soda0289 opened this issue Apr 5, 2017 · 12 comments
Closed

Known issues with JSX and eslint-plugin-react #213

soda0289 opened this issue Apr 5, 2017 · 12 comments
Assignees

Comments

@soda0289
Copy link
Member

soda0289 commented Apr 5, 2017

Since typescript v2.2 and typescript-eslint-parser v2.1 JSX parsing has significantly improved. All of the eslint rules should work as expected with JSX. We have also tested the eslint-plugin-jsx-a11y and have found no issues.

Most of the rules in eslint-plugin-react work except for the following:

react/no-unescaped-entities
react/self-closing-comp
react/void-dom-elements-no-children
react/jsx-indent
react/jsx-indent-props
react/jsx-max-props-per-line

Work still needs to be done to investigate the issue with each rule to determine exactly where the problem comes from.

@corbinu
Copy link

corbinu commented Apr 5, 2017

@soda0289 I will make sure to add the react plugin to my smoke tests. I know I still need to release a new version. Just been busy with work work :)

@soda0289
Copy link
Member Author

soda0289 commented Apr 5, 2017

Thanks @corbinu. We will need to find some projects that use typescript and react.
The only one I can think of is Apollo React Client and it is tiny. We should start working on integration tests between all these rules and typescript parser as well.

I don't think the rules cause any crashes just false positives or incorrect line/column numbers. I noticed that the jsx-indent rules will cause eslint to run forever but have not tried to reproduce on a code snippet.

We should also make a list of known issues for eslint core rules and popular plugins too as I think it will help reduce the amount of issues for this project.

@corbinu
Copy link

corbinu commented Apr 5, 2017

I just added the plugin and https://github.com/alm-tools/alm
I am happy to take suggestions though as I don't use React or TSX at all

Will try to push the update tomorrow and then shouldn't be hard for us to make a list.

@soda0289 soda0289 self-assigned this Apr 10, 2017
@sompylasar
Copy link

Refs #266 (comment) re: react/no-unescaped-entities.

@soda0289
Copy link
Member Author

@sompylasar #277 fixes no-unescaped-entites

@soda0289
Copy link
Member Author

These rules are now fixed in the master branch and will be part of the next release

@sompylasar
Copy link

Thanks @soda0289 !

@OliverJAsh
Copy link

Would it be possible to push a release out now?

@JamesHenry
Copy link
Member

@OliverJAsh we have just cut a release for the latest work https://github.com/eslint/typescript-eslint-parser/releases/tag/v4.0.0

@sarod
Copy link

sarod commented Aug 3, 2017

README.MD still references this issue in the known issues list. Is it on purpose?

@soda0289
Copy link
Member Author

soda0289 commented Aug 3, 2017

@sarod The README can be updated. Haven't since any other issues reported from the react plugin

@OliverJAsh
Copy link

These rules now work, however I think there are issues with the auto fixes—they seem to be corrupting the code. See #343.

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

No branches or pull requests

6 participants