feat: report no-with violations at the with keyword by Pixel998 · Pull Request #20971 · eslint/eslint (original) (raw)

Prerequisites checklist

AI acknowledgment

What is the purpose of this pull request? (put an "X" next to an item)

[ ] Documentation update
[ ] Bug fix (template)
[ ] New rule (template)
[x] Changes an existing rule (template)
[ ] Add autofix to a rule
[ ] Add a CLI option
[ ] Add something to the core
[ ] Other, please explain:

no-with disallows with statements. When the rule reports a violation, highlighting the entire with statement can be noisy, especially if the body spans multiple lines.

What changes did you make? (Give an overview)

Updated no-with so violations are reported on the with keyword instead of the full with statement.

Is there anything you'd like reviewers to focus on?