sonarjs/no-labels
eslint-plugin-sonarjs
No autofixRecommended
eslint.config.js
export default [
{
rules: {
"sonarjs/no-labels": "error",
},
},
];myLabel: {
let x = doSomething();
if (x > 0) {
break myLabel;
}
doSomethingElse();
}let x = doSomething();
if (x <= 0) {
doSomethingElse();
}Examples from the ESLint documentation.
sonarjs/no-labels
eslint-plugin-sonarjs
export default [
{
rules: {
"sonarjs/no-labels": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.
Browsers should not be allowed to perform MIME type sniffing
Regular expressions should be syntactically valid