feat(vue/no-negated-v-if-condition): upgrade rule suggestion to autofix#2984
Conversation
🦋 Changeset detectedLatest commit: 5d03d3f The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
FloEdelmann
left a comment
There was a problem hiding this comment.
Thanks for giving it a go 🙂
autofix option
FloEdelmann
left a comment
There was a problem hiding this comment.
Thank you for your first contribution! This looks good to me now.
There was a problem hiding this comment.
Pull request overview
This PR upgrades the vue/no-negated-v-if-condition rule from providing suggestions to providing automatic fixes. When enabled with the --fix flag, ESLint will now automatically swap negated conditions in v-if/v-else blocks with positive conditions.
- Converted the rule from
hasSuggestions: truewithsuggesttofixable: 'code'withfix - Updated all test cases to expect automatic fixes via
outputinstead of manual suggestions - Updated documentation to reflect the autofix capability
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| lib/rules/no-negated-v-if-condition.js | Converted suggestion mechanism to autofix by changing meta properties and replacing suggest with fix |
| tests/lib/rules/no-negated-v-if-condition.js | Updated all invalid test cases to use output field instead of suggestions array |
| docs/rules/no-negated-v-if-condition.md | Changed documentation badge from suggestion (:bulb:) to autofix (:wrench:) and added fix attribute to code block |
| docs/rules/index.md | Updated rule listing to show autofix icon (:wrench:) instead of suggestion icon (:bulb:) |
| .changeset/rich-zebras-type.md | Added changeset entry documenting the conversion from suggestion to autofix |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
close #2979
This is my first contribution to this amazing project. Please feel free to point out anything that’s not quite right. Thank you!