From 2ded94b370aca28d79154151a29bae63d4dd93e6 Mon Sep 17 00:00:00 2001 From: Flo Edelmann Date: Wed, 5 Oct 2022 19:11:33 +0200 Subject: [PATCH] Add `consistent` option to `vue/padding-line-between-tags` docs --- docs/rules/padding-line-between-tags.md | 32 +++++++++++++------------ 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/docs/rules/padding-line-between-tags.md b/docs/rules/padding-line-between-tags.md index 18770104d..15f87753e 100644 --- a/docs/rules/padding-line-between-tags.md +++ b/docs/rules/padding-line-between-tags.md @@ -52,11 +52,12 @@ This rule requires or disallows newlines between sibling HTML tags. This rule requires blank lines between each sibling HTML tag by default. -A configuration is an object which has 3 properties; blankLine, prev and next. For example, { blankLine: "always", prev: "br", next: "div" } means “one or more blank lines are required between a br tag and a div tag.” You can supply any number of configurations. If a tag pair matches multiple configurations, the last matched configuration will be used. +A configuration is an object which has 3 properties; `blankLine`, `prev` and `next`. For example, `{ blankLine: "always", prev: "br", next: "div" }` means “one or more blank lines are required between a `br` tag and a `div` tag.” You can supply any number of configurations. If a tag pair matches multiple configurations, the last matched configuration will be used. - `blankLine` is one of the following: - `always` requires one or more blank lines. - `never` disallows blank lines. + - `consistent` requires or disallows a blank line based on the first sibling element. - `prev` any tag name without brackets. - `next` any tag name without brackets. @@ -106,12 +107,12 @@ A configuration is an object which has 3 properties; blankLine, prev and next. F -### Require newlines before `
` +### Require newlines between `
` and `` -`{ blankLine: 'always', prev: '*', next: 'br' }` +`{ blankLine: 'always', prev: 'br', next: 'img' }` ```vue @@ -120,8 +121,9 @@ A configuration is an object which has 3 properties; blankLine, prev and next. F @@ -131,26 +133,26 @@ A configuration is an object which has 3 properties; blankLine, prev and next. F -### Require newlines between `
` and `` +### Require consistent newlines -`{ blankLine: 'always', prev: 'br', next: 'img' }` +`{ blankLine: 'consistent', prev: '*', next: '*' }` ```vue ```