validate-html-nesting

Validate parent-child nesting for HTML elements (by MananTank)

Validate-html-nesting Alternatives

Similar projects and alternatives to validate-html-nesting

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a better validate-html-nesting alternative or higher similarity.

validate-html-nesting reviews and mentions

Posts with mentions or reviews of validate-html-nesting. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-07-09.
  • I created an ESLint plugin to find invalid HTML nestings in JSX
    4 projects | /r/reactjs | 9 Jul 2022
    The problem is not the Invalid HTML, but that the browser fixes it and so framework's code to update the DOM ends up updating the wrong DOM nodes and may even throw error. Example
  • Show HN: I Created ESLint Plugin That Finds Invalid HTML Nestings in JSX
    2 projects | news.ycombinator.com | 8 Jul 2022
    Invalid HTML Nestings such as a

    inside a

    is invalid and browser automatically fixes it by putting the

    outside the parent

    and so the DOM ends up rendering different structure than JSX. There are a lot of such invalid nestings. See [this](https://github.com/MananTank/validate-html-nesting/blob/main...) For Example.

    This is problematic and creates all sorts of bugs in Frameworks. Most Frameworks that use JSX (such as React, SolidJS, Preact) checks for invalid HTML Nestings at runtime and logs an error. ( Though this runtime checks are not very comprehensive - React has decent list of checks but is still missing quite a few )

    Until now there was no way to check for such invalid Nestings without running the code. So I've created this ESLint Plugin to do just that.

    This does not mean that we get rid of runtime invalid nesting checking, because This ESLint plugin can not predict what your component's top level element will be - because that would require running the code. So consider this as a tool to catch 99% of the invalid nestings without running the code.

Stats

Basic validate-html-nesting repo stats
2
29
2.4
about 1 year ago

Sponsored
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com