sonarjs/disabled-resource-integrity
eslint-plugin-sonarjs
No autofixRecommended
eslint.config.js
export default [
{
rules: {
"sonarjs/disabled-resource-integrity": "error",
},
},
];Remote artifacts should not be used without integrity checks
The documentation shows no incorrect example for this rule.
let script = document.createElement("script");
script.src = "https://cdn.example.com/v5.3.6/script.js";
script.integrity = "sha384-oqVuAfXRKap7fdgcCY5uykM6+R9GqQ8K/uxy9rx7HNQlGYl1kPzQho1wx4JwY8wC";
script.crossOrigin = "anonymous";
document.head.appendChild(script);Examples from the ESLint documentation.
sonarjs/disabled-resource-integrity
eslint-plugin-sonarjs
export default [
{
rules: {
"sonarjs/disabled-resource-integrity": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.
Auto-escaping in HTML template engines should not be disabled
Strict equality operators should not be used with dissimilar types
DOMPurify configuration should not be bypassable
Character classes in regular expressions should not contain the same character twice