From 3bb7136d2888bff8792ca485550f6c3b4fd544e3 Mon Sep 17 00:00:00 2001 From: yosuke ota Date: Thu, 31 Jan 2019 23:43:18 +0900 Subject: [PATCH] =?UTF-8?q?=E2=AD=90=EF=B8=8FNew:=20Add=20`vue/dot-locatio?= =?UTF-8?q?n`=20rule?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/rules/README.md | 1 + docs/rules/dot-location.md | 23 ++++++++++ lib/configs/no-layout-rules.js | 1 + lib/index.js | 1 + lib/rules/dot-location.js | 9 ++++ tests/lib/rules/dot-location.js | 80 +++++++++++++++++++++++++++++++++ 6 files changed, 115 insertions(+) create mode 100644 docs/rules/dot-location.md create mode 100644 lib/rules/dot-location.js create mode 100644 tests/lib/rules/dot-location.js diff --git a/docs/rules/README.md b/docs/rules/README.md index f7e7d7ec0..16e48a871 100644 --- a/docs/rules/README.md +++ b/docs/rules/README.md @@ -146,6 +146,7 @@ For example: | [vue/camelcase](./camelcase.md) | enforce camelcase naming convention | | | [vue/comma-dangle](./comma-dangle.md) | require or disallow trailing commas | :wrench: | | [vue/component-name-in-template-casing](./component-name-in-template-casing.md) | enforce specific casing for the component naming style in template | :wrench: | +| [vue/dot-location](./dot-location.md) | enforce consistent newlines before and after dots | :wrench: | | [vue/eqeqeq](./eqeqeq.md) | require the use of `===` and `!==` | :wrench: | | [vue/key-spacing](./key-spacing.md) | enforce consistent spacing between keys and values in object literal properties | :wrench: | | [vue/match-component-file-name](./match-component-file-name.md) | require component name property to match its file name | | diff --git a/docs/rules/dot-location.md b/docs/rules/dot-location.md new file mode 100644 index 000000000..56a9c3342 --- /dev/null +++ b/docs/rules/dot-location.md @@ -0,0 +1,23 @@ +--- +pageClass: rule-details +sidebarDepth: 0 +title: vue/dot-location +description: enforce consistent newlines before and after dots +--- +# vue/dot-location +> enforce consistent newlines before and after dots + +- :wrench: The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#fixing-problems) can automatically fix some of the problems reported by this rule. + +This rule is the same rule as core [dot-location] rule but it applies to the expressions in `