W3C HTML validation for React JSX files

◇◆丶佛笑我妖孽 提交于 2019-12-03 12:12:59

Does it exist W3C HTML validators for React JSX files?

No.

In case it does not, any reason for it?

Because they aren't HTML.


The closest you could come would be to execute the JavaScript to generate a DOM, then serialize that DOM to HTML (e.g. with .innerHTML), and then add a DOCTYPE declaration and validate the result.

There are no W3C HTML validators for JSX. JSX is JS, not HTML. So you can use eslint plugins for linting jsx to avoid common problems:

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!