no-restricted-syntax
eslint
No autofix
eslint.config.js
export default [
{
rules: {
"no-restricted-syntax": "error",
},
},
];with (me) {
dontMess();
}
const doSomething = function () {};
foo in bar;me.dontMess();
function doSomething() {};
foo instanceof bar;Examples from the ESLint documentation.
no-restricted-syntax
eslint
export default [
{
rules: {
"no-restricted-syntax": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.
Disallow the use of alert, confirm, and prompt
Enforce the use of variables within the scope they are defined
Disallow certain properties on certain objects