Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add newvue/no-negated-condition rule#2795

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
FloEdelmann merged 3 commits intomasterfromfeature/no-negated-condition
Jul 14, 2025

Conversation

waynzh
Copy link
Member

Resolve#2769
Related PR#2794

@waynzhwaynzh requested a review fromCopilotJuly 14, 2025 04:29
@changeset-botchangeset-bot
Copy link

changeset-botbot commentedJul 14, 2025
edited
Loading

🦋 Changeset detected

Latest commit:702e432

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

This PR includes changesets to release 1 package
NameType
eslint-plugin-vueMinor

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

@CopilotCopilotAI 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

Introduce the newvue/no-negated-condition rule that wraps ESLint’s coreno-negated-condition to enforce no negated conditions in Vue templates.

  • Add rule implementation withwrapCoreRule
  • Register the rule in the plugin index
  • Provide tests, documentation, and a changelog entry

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
FileDescription
tests/lib/rules/no-negated-condition.jsNew RuleTester suite with valid and invalid cases
lib/rules/no-negated-condition.jsWraps the core ESLint rule viawrapCoreRule
lib/index.jsRegistersno-negated-condition in the plugin exports
docs/rules/no-negated-condition.mdDocs for the rule with basic details and links
docs/rules/index.mdAdds rule to the rules index table
.changeset/true-pumas-open.mdChangelog entry for the new minor release
Comments suppressed due to low confidence (2)

tests/lib/rules/no-negated-condition.js:37

  • Add tests for negated conditions in structural directives likev-if andv-show (e.g.,<div v-if="!foo">) to ensure the rule flags those cases.
  invalid: [

docs/rules/no-negated-condition.md:16

  • [nitpick] Include a dedicated## Examples section with clear code blocks showing valid vs. invalid negated conditions in templates for better developer guidance.
This rule is the same rule as core [no-negated-condition] rule but it applies to the expressions in `<template>`.

Copy link
Member

@FloEdelmannFloEdelmann 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! 🙂

@FloEdelmannFloEdelmann merged commitebbabd2 intomasterJul 14, 2025
12 checks passed
@FloEdelmannFloEdelmann deleted the feature/no-negated-condition branchJuly 14, 2025 14:28
@github-actionsgithub-actionsbot mentioned this pull requestJul 14, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@FloEdelmannFloEdelmannFloEdelmann approved these changes

Copilot code reviewCopilotCopilot left review comments

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Rule suggestion:vue/no-negated-condition forv-if/v-else in the template
2 participants
@waynzh@FloEdelmann

[8]ページ先頭

©2009-2025 Movatter.jp