From 4cb319795acbd9aec197e37e3aa8233253c83215 Mon Sep 17 00:00:00 2001 From: yosuke ota Date: Tue, 19 May 2020 13:57:45 +0900 Subject: [PATCH] Add `vue/template-curly-spacing` rule --- docs/rules/README.md | 1 + docs/rules/template-curly-spacing.md | 23 ++++++ lib/configs/no-layout-rules.js | 3 +- lib/index.js | 1 + lib/rules/template-curly-spacing.js | 12 +++ tests/lib/rules/template-curly-spacing.js | 90 +++++++++++++++++++++++ 6 files changed, 129 insertions(+), 1 deletion(-) create mode 100644 docs/rules/template-curly-spacing.md create mode 100644 lib/rules/template-curly-spacing.js create mode 100644 tests/lib/rules/template-curly-spacing.js diff --git a/docs/rules/README.md b/docs/rules/README.md index 83eda5692..fb5a5659a 100644 --- a/docs/rules/README.md +++ b/docs/rules/README.md @@ -300,6 +300,7 @@ For example: | [vue/space-infix-ops](./space-infix-ops.md) | require spacing around infix operators | :wrench: | | [vue/space-unary-ops](./space-unary-ops.md) | enforce consistent spacing before or after unary operators | :wrench: | | [vue/static-class-names-order](./static-class-names-order.md) | enforce static class names order | :wrench: | +| [vue/template-curly-spacing](./template-curly-spacing.md) | require or disallow spacing around embedded expressions of template strings | :wrench: | | [vue/v-on-function-call](./v-on-function-call.md) | enforce or forbid parentheses after method calls without arguments in `v-on` directives | :wrench: | ## Deprecated diff --git a/docs/rules/template-curly-spacing.md b/docs/rules/template-curly-spacing.md new file mode 100644 index 000000000..92daa477e --- /dev/null +++ b/docs/rules/template-curly-spacing.md @@ -0,0 +1,23 @@ +--- +pageClass: rule-details +sidebarDepth: 0 +title: vue/template-curly-spacing +description: require or disallow spacing around embedded expressions of template strings +--- +# vue/template-curly-spacing +> require or disallow spacing around embedded expressions of template strings + +- :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 [template-curly-spacing] rule but it applies to the expressions in `