Skip to content

JSX elements are not being linted fully #555

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

Closed
martinfrances107 opened this issue Nov 22, 2018 · 4 comments
Closed

JSX elements are not being linted fully #555

martinfrances107 opened this issue Nov 22, 2018 · 4 comments

Comments

@martinfrances107
Copy link
Contributor

This maybe a deliberate design choice that I am ignorant of

BUT

we are getting compile errors in relation to storybook when we have JSX elements inside js files
[ that is being fixed here #554 as part of #546 ]

This issue is separate I just want clearance to lock this down so that all files using JSX elements have the extension jsx or tsx.

@dawehner
Copy link
Contributor

It looks like there is a disagreement between airbnb and people working on react itself, see facebook/create-react-app#87 (comment)

Personally I think I agree with @Gaeron's perspective.

@martinfrances107
Copy link
Contributor Author

I am happy to follow the no jsx files convention

BUT I am seeing some horrible interaction with our current linting configuration files

case in point if you rename AddContent.test.js to AddContent.test.jsx

then you get new linting errors

Warning: validateDOMNesting(...):

cannot appear as a descendant of <p>.

I am going to look into this more so that we get the same error warning from js files with JSX elements.

@martinfrances107 martinfrances107 changed the title restrict JSX elements to jsx and tsx files. JSX elements are not being linted fully Nov 23, 2018
@dawehner
Copy link
Contributor

I am going to look into this more so that we get the same error warning from js files with JSX elements.

Nice, thank you!

@martinfrances107
Copy link
Contributor Author

Great - the loose ends are complete and merged..

thank you.

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

No branches or pull requests

2 participants