Skip to content

Conversation

@rzzf
Copy link

@rzzf rzzf commented Nov 27, 2025

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!

@changeset-bot
Copy link

changeset-bot bot commented Nov 27, 2025

🦋 Changeset detected

Latest commit: 5d03d3f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
eslint-plugin-vue Minor

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

Copy link
Member

@FloEdelmann FloEdelmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for giving it a go 🙂

@rzzf rzzf changed the title feat(vue/no-negated-v-if-condition): add autofix option feat(vue/no-negated-v-if-condition): promote suggestions to autofixes Nov 27, 2025
@rzzf rzzf changed the title feat(vue/no-negated-v-if-condition): promote suggestions to autofixes feat(vue/no-negated-v-if-condition): upgrade rule suggestion to autofix Nov 27, 2025
Copy link
Member

@FloEdelmann FloEdelmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your first contribution! This looks good to me now.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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: true with suggest to fixable: 'code' with fix
  • Updated all test cases to expect automatic fixes via output instead 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

no-negated-v-if-condition: promote suggestions to autofixes

2 participants