From 0e1a05af34d054ae4c47b3a8f584b8af8a943aec Mon Sep 17 00:00:00 2001 From: nokazn <41154684+nokazn@users.noreply.github.com> Date: Sun, 18 Oct 2020 22:22:59 +0900 Subject: [PATCH] Add allowModifiers option to valid-v-slot (#1330) * add allowModifiers option to valid-v-slot * update doc * fix for missing cases & improve code * add test cases * revert option in test --- docs/rules/valid-v-slot.md | 38 ++++++++++++++- lib/rules/valid-v-slot.js | 40 +++++++++++++--- tests/lib/rules/valid-v-slot.js | 85 +++++++++++++++++++++++++++++++++ 3 files changed, 156 insertions(+), 7 deletions(-) diff --git a/docs/rules/valid-v-slot.md b/docs/rules/valid-v-slot.md index 2a9183926..f0810cc75 100644 --- a/docs/rules/valid-v-slot.md +++ b/docs/rules/valid-v-slot.md @@ -100,7 +100,43 @@ This rule does not check syntax errors in directives because it's checked by [vu ## :wrench: Options -Nothing. +```json +{ + "vue/valid-v-slot": ["error", { + "allowModifiers": false + }] +} +``` + +- `allowModifiers` (`boolean`) ... allows having modifiers in the argument of `v-slot` directives. Modifiers just after `v-slot` are still disallowed. E.g. `