no-script-url
eslint
No autofix
eslint.config.js
export default [
{
rules: {
"no-script-url": "error",
},
},
];location.href = "javascript:void(0)";
location.href = `javascript:void(0)`;The documentation shows no correct example for this rule.
Examples from the ESLint documentation.
no-script-url
eslint
export default [
{
rules: {
"no-script-url": "error",
},
},
];no-script-url
eslint plugin · style
{
"rules": {
"no-script-url": "error"
}
}security/noScriptUrl
security · since 2.3.9
{
"linter": {
"rules": {
"security": {
"noScriptUrl": "error"
}
}
}
}Disallow initializing variables to undefined
Disallow labels that share a name with a variable
Require constructor names to begin with a capital letter
Enforce default clauses in switch statements to be last