From 4e0b13a50b0c892c429d283ae36a54b18e09139f Mon Sep 17 00:00:00 2001 From: waynzh Date: Mon, 14 Jul 2025 12:28:54 +0800 Subject: [PATCH 1/3] Add new `vue/no-negated-condition` rule --- .changeset/true-pumas-open.md | 5 + docs/rules/index.md | 2 + docs/rules/no-negated-condition.md | 29 +++++ lib/index.js | 1 + lib/rules/no-negated-condition.js | 12 ++ tests/lib/rules/no-negated-condition.js | 166 ++++++++++++++++++++++++ 6 files changed, 215 insertions(+) create mode 100644 .changeset/true-pumas-open.md create mode 100644 docs/rules/no-negated-condition.md create mode 100644 lib/rules/no-negated-condition.js create mode 100644 tests/lib/rules/no-negated-condition.js diff --git a/.changeset/true-pumas-open.md b/.changeset/true-pumas-open.md new file mode 100644 index 000000000..15364a8a5 --- /dev/null +++ b/.changeset/true-pumas-open.md @@ -0,0 +1,5 @@ +--- +'eslint-plugin-vue': minor +--- + +Add new `vue/no-negated-condition` rule diff --git a/docs/rules/index.md b/docs/rules/index.md index 6423ef365..34462fba0 100644 --- a/docs/rules/index.md +++ b/docs/rules/index.md @@ -327,6 +327,7 @@ The following rules extend the rules provided by ESLint itself and apply them to | [vue/no-implicit-coercion] | Disallow shorthand type conversions in `