no-with
eslint
No autofixRecommended
eslint.config.js
export default [
{
rules: {
"no-with": "error",
},
},
];with (point) {
r = Math.sqrt(x * x + y * y); // is r a member of point?
}const r = ({x, y}) => Math.sqrt(x * x + y * y);Examples from the ESLint documentation.
no-with
eslint
export default [
{
rules: {
"no-with": "error",
},
},
];no-with
eslint plugin · correctness
{
"rules": {
"no-with": "error"
}
}suspicious/noWith
suspicious · since 1.0.0
{
"linter": {
"rules": {
"suspicious": {
"noWith": "error"
}
}
}
}Enforce comparing typeof expressions against valid strings
Disallow reassigning const, using, and await using variables
Disallow assignments where both sides are exactly the same
Disallow duplicate keys in object literals
Disallow empty destructuring patterns
Disallow reassigning function declarations