From 5eed9dcbbd3ef8baebd0245ab2d3ad55670ddce0 Mon Sep 17 00:00:00 2001 From: yosuke ota Date: Sat, 6 Jun 2020 21:51:50 +0900 Subject: [PATCH] Add `vue/object-curly-newline` rule --- docs/rules/README.md | 1 + docs/rules/object-curly-newline.md | 25 ++++ lib/configs/no-layout-rules.js | 1 + lib/index.js | 1 + lib/rules/object-curly-newline.js | 12 ++ tests/lib/rules/object-curly-newline.js | 148 ++++++++++++++++++++++++ 6 files changed, 188 insertions(+) create mode 100644 docs/rules/object-curly-newline.md create mode 100644 lib/rules/object-curly-newline.js create mode 100644 tests/lib/rules/object-curly-newline.js diff --git a/docs/rules/README.md b/docs/rules/README.md index e44b2855b..6e404143d 100644 --- a/docs/rules/README.md +++ b/docs/rules/README.md @@ -328,6 +328,7 @@ The following rules extend the rules provided by ESLint itself and apply them to | [vue/no-irregular-whitespace](./no-irregular-whitespace.md) | disallow irregular whitespace | | | [vue/no-restricted-syntax](./no-restricted-syntax.md) | disallow specified syntax | | | [vue/no-useless-concat](./no-useless-concat.md) | disallow unnecessary concatenation of literals or template literals | | +| [vue/object-curly-newline](./object-curly-newline.md) | enforce consistent line breaks inside braces | :wrench: | | [vue/object-curly-spacing](./object-curly-spacing.md) | enforce consistent spacing inside braces | :wrench: | | [vue/prefer-template](./prefer-template.md) | require template literals instead of string concatenation | :wrench: | | [vue/space-in-parens](./space-in-parens.md) | enforce consistent spacing inside parentheses | :wrench: | diff --git a/docs/rules/object-curly-newline.md b/docs/rules/object-curly-newline.md new file mode 100644 index 000000000..12f871bea --- /dev/null +++ b/docs/rules/object-curly-newline.md @@ -0,0 +1,25 @@ +--- +pageClass: rule-details +sidebarDepth: 0 +title: vue/object-curly-newline +description: enforce consistent line breaks inside braces +--- +# vue/object-curly-newline +> enforce consistent line breaks inside braces + +- :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 [object-curly-newline] rule but it applies to the expressions in `