From f9e79a69d08882a29a8d8caf46e5204e3ce39708 Mon Sep 17 00:00:00 2001 From: yosuke ota Date: Sun, 13 Jan 2019 17:33:37 +0900 Subject: [PATCH] =?UTF-8?q?=E2=AD=90=EF=B8=8FNew:=20Add=20`vue/brace-style?= =?UTF-8?q?`=20rule?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/rules/README.md | 1 + docs/rules/brace-style.md | 23 ++++++++++++ lib/configs/no-layout-rules.js | 1 + lib/index.js | 1 + lib/rules/brace-style.js | 9 +++++ tests/lib/rules/brace-style.js | 69 ++++++++++++++++++++++++++++++++++ 6 files changed, 104 insertions(+) create mode 100644 docs/rules/brace-style.md create mode 100644 lib/rules/brace-style.js create mode 100644 tests/lib/rules/brace-style.js diff --git a/docs/rules/README.md b/docs/rules/README.md index b37c250a0..02e605df3 100644 --- a/docs/rules/README.md +++ b/docs/rules/README.md @@ -140,6 +140,7 @@ For example: | Rule ID | Description | | |:--------|:------------|:---| | [vue/array-bracket-spacing](./array-bracket-spacing.md) | enforce consistent spacing inside array brackets | :wrench: | +| [vue/brace-style](./brace-style.md) | enforce consistent brace style for blocks | :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/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: | diff --git a/docs/rules/brace-style.md b/docs/rules/brace-style.md new file mode 100644 index 000000000..4e11a9f26 --- /dev/null +++ b/docs/rules/brace-style.md @@ -0,0 +1,23 @@ +--- +pageClass: rule-details +sidebarDepth: 0 +title: vue/brace-style +description: enforce consistent brace style for blocks +--- +# vue/brace-style +> enforce consistent brace style for blocks + +- :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 [brace-style] rule but it applies to the expressions in `