From 4d79cebb58a2a40b295d4c0b2b95157c36a1bfc6 Mon Sep 17 00:00:00 2001 From: dev1437 <111346272+dev1437@users.noreply.github.com> Date: Tue, 11 Oct 2022 01:42:50 +0800 Subject: [PATCH] Create `vue/multiline-ternary` extension rule (#1996) * Create initial multiline ternary rule * Docs * Linting * Tests and apply Document * Fix import * Fix tests * Fix test * Run npm run update * Update tests * lint * Update doc * Add tests for script tag * Update tests/lib/rules/multiline-ternary.js Co-authored-by: Flo Edelmann * Add example * Lint Co-authored-by: Flo Edelmann --- docs/rules/README.md | 1 + docs/rules/multiline-ternary.md | 59 ++++++ lib/configs/no-layout-rules.js | 1 + lib/index.js | 1 + lib/rules/multiline-ternary.js | 17 ++ tests/lib/rules/multiline-ternary.js | 297 +++++++++++++++++++++++++++ 6 files changed, 376 insertions(+) create mode 100644 docs/rules/multiline-ternary.md create mode 100644 lib/rules/multiline-ternary.js create mode 100644 tests/lib/rules/multiline-ternary.js diff --git a/docs/rules/README.md b/docs/rules/README.md index 780b10cbe..19c2565e4 100644 --- a/docs/rules/README.md +++ b/docs/rules/README.md @@ -292,6 +292,7 @@ The following rules extend the rules provided by ESLint itself and apply them to | [vue/key-spacing](./key-spacing.md) | Enforce consistent spacing between keys and values in object literal properties in `