feat: report no-with violations at the with keyword by Pixel998 · Pull Request #20971 · eslint/eslint (original) (raw)
Prerequisites checklist
- I have read the contributing guidelines.
AI acknowledgment
- I did not use AI to generate this PR.
- (If the above is not checked) I have reviewed the AI-generated content before submitting.
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.