eslint-plugin-no-unsanitized

Custom ESLint rule to disallows unsafe innerHTML, outerHTML, insertAdjacentHTML and alike (by mozilla)

Eslint-plugin-no-unsanitized Alternatives

Similar projects and alternatives to eslint-plugin-no-unsanitized

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a better eslint-plugin-no-unsanitized alternative or higher similarity.

eslint-plugin-no-unsanitized reviews and mentions

Posts with mentions or reviews of eslint-plugin-no-unsanitized. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-10-17.
  • Escaping user input is ridonkulously hard
    2 projects | /r/programming | 17 Oct 2022
    Prevent any uses of setting innerHTML or similar functions e.g. via an eslint plugin.
  • HTML Sanitizer API
    5 projects | news.ycombinator.com | 6 May 2021
    Great point!

    It wanted to edit the comment to change (1) to (server/client) but I passed my edit timeout.

    I would include your (5) within (1). `textContent` and other DOM methods like `setAttribute` are effectively secure output-escaping on the client.

    Your (5a) is an excellent extra measure. In this area, I'd also add security-focused linting for (1) and (5)–e.g. for (5), to ensure secure DOM methods are used, I use Mozilla's `eslint-plugin-no-unsanitized`[0] plugin for all my personal & work projects.

    [0] https://github.com/mozilla/eslint-plugin-no-unsanitized/

Stats

Basic eslint-plugin-no-unsanitized repo stats
2
215
4.6
9 days ago

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