From 7a9730b7d5c5bd85257f23da1f3bd5451817020c Mon Sep 17 00:00:00 2001 From: ota Date: Fri, 1 Feb 2019 21:36:40 +0900 Subject: [PATCH] =?UTF-8?q?=E2=AD=90=EF=B8=8FNew:=20Add=20`vue/keyword-spa?= =?UTF-8?q?cing`=20rule?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/rules/README.md | 1 + docs/rules/keyword-spacing.md | 23 +++++ lib/configs/no-layout-rules.js | 1 + lib/index.js | 1 + lib/rules/keyword-spacing.js | 9 ++ tests/lib/rules/keyword-spacing.js | 142 +++++++++++++++++++++++++++++ 6 files changed, 177 insertions(+) create mode 100644 docs/rules/keyword-spacing.md create mode 100644 lib/rules/keyword-spacing.js create mode 100644 tests/lib/rules/keyword-spacing.js diff --git a/docs/rules/README.md b/docs/rules/README.md index f7e7d7ec0..0abbc5b69 100644 --- a/docs/rules/README.md +++ b/docs/rules/README.md @@ -148,6 +148,7 @@ For example: | [vue/component-name-in-template-casing](./component-name-in-template-casing.md) | enforce specific casing for the component naming style in template | :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/keyword-spacing](./keyword-spacing.md) | enforce consistent spacing before and after keywords | :wrench: | | [vue/match-component-file-name](./match-component-file-name.md) | require component name property to match its file name | | | [vue/no-restricted-syntax](./no-restricted-syntax.md) | disallow specified syntax | | | [vue/object-curly-spacing](./object-curly-spacing.md) | enforce consistent spacing inside braces | :wrench: | diff --git a/docs/rules/keyword-spacing.md b/docs/rules/keyword-spacing.md new file mode 100644 index 000000000..f053a90b3 --- /dev/null +++ b/docs/rules/keyword-spacing.md @@ -0,0 +1,23 @@ +--- +pageClass: rule-details +sidebarDepth: 0 +title: vue/keyword-spacing +description: enforce consistent spacing before and after keywords +--- +# vue/keyword-spacing +> enforce consistent spacing before and after keywords + +- :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 [keyword-spacing] rule but it applies to the expressions in `