mozilla / eslint-plugin-no-unsanitized

Custom ESLint rule to disallows unsafe innerHTML, outerHTML, insertAdjacentHTML and alike
Mozilla Public License 2.0
223 stars 34 forks source link

Add meta.type "problem" #120

Closed brettz9 closed 4 years ago

brettz9 commented 4 years ago

For fixable rules, this would mean it would be usable with --fix-type: https://eslint.org/docs/user-guide/command-line-interface#fix-type . But I'm personally planning to take advantage of meta.type with my badge-making project https://github.com/brettz9/eslint-formatter-badger when ready, so that linting counts can be grouped by type. Anyways, it shouldn't hurt to specify the nature of the rule.

While there is inevitably some ambiguity (e.g., is the use of the rule always a problem?), this ambiguity is I think present with pretty much any linting rule, so I think the basic idea is that this can be more serious than a "suggestion" and is not of course just "layout", the other possibility.

mozfreddyb commented 4 years ago

Yeah, whether findings are always problem is of course debatable, but this looks good overall.