From f537354c0b4741f9aa050ee4eb10e9105bd95e26 Mon Sep 17 00:00:00 2001 From: Yosuke Ota Date: Sun, 24 May 2020 06:27:55 +0900 Subject: [PATCH] Add `vue/comma-style` rule (#1159) * Add `vue/comma-style` rule * update --- docs/rules/README.md | 2 + docs/rules/comma-style.md | 23 ++++++ lib/configs/no-layout-rules.js | 1 + lib/index.js | 2 + lib/rules/comma-style.js | 20 ++++++ lib/utils/index.js | 58 +++++++++------ tests/lib/rules/comma-style.js | 124 +++++++++++++++++++++++++++++++++ 7 files changed, 210 insertions(+), 20 deletions(-) create mode 100644 docs/rules/comma-style.md create mode 100644 lib/rules/comma-style.js create mode 100644 tests/lib/rules/comma-style.js diff --git a/docs/rules/README.md b/docs/rules/README.md index 8916464e6..57890decd 100644 --- a/docs/rules/README.md +++ b/docs/rules/README.md @@ -278,6 +278,7 @@ For example: | [vue/camelcase](./camelcase.md) | enforce camelcase naming convention | | | [vue/comma-dangle](./comma-dangle.md) | require or disallow trailing commas | :wrench: | | [vue/comma-spacing](./comma-spacing.md) | enforce consistent spacing before and after commas | :wrench: | +| [vue/comma-style](./comma-style.md) | enforce consistent comma style | :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: | @@ -308,6 +309,7 @@ For example: | [vue/require-name-property](./require-name-property.md) | require a name property in Vue components | | | [vue/script-indent](./script-indent.md) | enforce consistent indentation in `