From 705aa1f4a36b54939793f64a8e8efab1a1663c6e Mon Sep 17 00:00:00 2001 From: yosuke ota Date: Thu, 24 Jun 2021 16:38:08 +0900 Subject: [PATCH] Add alignAttributesVertically option to indent rule --- docs/rules/indent.md | 25 +- src/rules/indent-helpers/commons.ts | 91 +---- src/rules/indent-helpers/es.ts | 262 +++++++------- src/rules/indent-helpers/index.ts | 179 ++-------- src/rules/indent-helpers/offset-context.ts | 324 ++++++++++++++++++ src/rules/indent-helpers/svelte.ts | 195 +++++++---- src/rules/indent-helpers/ts.ts | 257 +++++++------- src/rules/indent.ts | 1 + .../align-attributes-vertically/_config.json | 3 + .../attrs01-errors.json | 102 ++++++ .../attrs01-input.svelte | 23 ++ .../attrs01-output.svelte | 23 ++ 12 files changed, 933 insertions(+), 552 deletions(-) create mode 100644 src/rules/indent-helpers/offset-context.ts create mode 100644 tests/fixtures/rules/indent/invalid/align-attributes-vertically/_config.json create mode 100644 tests/fixtures/rules/indent/invalid/align-attributes-vertically/attrs01-errors.json create mode 100644 tests/fixtures/rules/indent/invalid/align-attributes-vertically/attrs01-input.svelte create mode 100644 tests/fixtures/rules/indent/invalid/align-attributes-vertically/attrs01-output.svelte diff --git a/docs/rules/indent.md b/docs/rules/indent.md index b43540da3..40f5f981a 100644 --- a/docs/rules/indent.md +++ b/docs/rules/indent.md @@ -23,7 +23,6 @@ This rule enforces a consistent indentation style in `.svelte`. The default styl - ```html