From 95fd13f4a811c97e143fcf23c930cc2ddf6612f6 Mon Sep 17 00:00:00 2001 From: IWANABETHATGUY <974153916@qq.com> Date: Wed, 16 Dec 2020 11:19:32 +0800 Subject: [PATCH] New Add `vue/new-line-between-multiline-property` rule (#1080) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: init commit * feat: add test, make rule configurable * docs: update doc📖 * chore: update version * lint fix * test: 💍 add test case * test: 💍 fix report when multi-line-property in callExpression * test: 💍 fix test in change request * test: 💍 js doc * test: 💍 Vue.component() * docs: ✏️ docs * fix: 🐛 using sourceCode api * fix: 🐛 using getTokenBewteen instead of getAlltoken * fix: 🐛 lint error --- docs/.vuepress/public/favicon.png | Bin 3451 -> 3450 bytes docs/rules/README.md | 1 + .../new-line-between-multi-line-property.md | 93 +++ lib/configs/no-layout-rules.js | 1 + lib/index.js | 1 + .../new-line-between-multi-line-property.js | 117 ++++ .../new-line-between-multi-line-property.js | 624 ++++++++++++++++++ 7 files changed, 837 insertions(+) create mode 100644 docs/rules/new-line-between-multi-line-property.md create mode 100644 lib/rules/new-line-between-multi-line-property.js create mode 100644 tests/lib/rules/new-line-between-multi-line-property.js diff --git a/docs/.vuepress/public/favicon.png b/docs/.vuepress/public/favicon.png index 60e17006ad07cd313788585e2f5e528fbb7cf821..6378563a04ef6375c2de7b7b02c15e724bf47e60 100644 GIT binary patch delta 13 Ucmew@^-GGSGr-S%BWoEi04HSx)c^nh delta 14 Vcmew*^;?RyGr-TCcOy#~F90h?1mXYy diff --git a/docs/rules/README.md b/docs/rules/README.md index fe113336e..4450e76b8 100644 --- a/docs/rules/README.md +++ b/docs/rules/README.md @@ -293,6 +293,7 @@ For example: | [vue/html-comment-content-spacing](./html-comment-content-spacing.md) | enforce unified spacing in HTML comments | :wrench: | | [vue/html-comment-indent](./html-comment-indent.md) | enforce consistent indentation in HTML comments | :wrench: | | [vue/match-component-file-name](./match-component-file-name.md) | require component name property to match its file name | | +| [vue/new-line-between-multi-line-property](./new-line-between-multi-line-property.md) | enforce new lines between multi-line properties in Vue components | :wrench: | | [vue/no-bare-strings-in-template](./no-bare-strings-in-template.md) | disallow the use of bare strings in `