From 6df5e9b5e655ccf14ee6712be989c3d9e02f1085 Mon Sep 17 00:00:00 2001 From: Lenny Chen Date: Mon, 15 Jul 2024 15:38:58 -0700 Subject: [PATCH] docs: add rule to flag all caps --- .../spectrocloud/styles/spectrocloud/heading-all-caps.yml | 7 +++++++ packages/spectrocloud/tests/heading-title-case/.vale.init | 3 ++- packages/spectrocloud/tests/heading-title-case/fail.md | 2 ++ 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 packages/spectrocloud/styles/spectrocloud/heading-all-caps.yml diff --git a/packages/spectrocloud/styles/spectrocloud/heading-all-caps.yml b/packages/spectrocloud/styles/spectrocloud/heading-all-caps.yml new file mode 100644 index 0000000..74423dd --- /dev/null +++ b/packages/spectrocloud/styles/spectrocloud/heading-all-caps.yml @@ -0,0 +1,7 @@ +extends: existence +message: "Headings should not be entirely in uppercase." +level: error +scope: heading +ignorecase: false +raw: + - ^[A-Z\s]+$ diff --git a/packages/spectrocloud/tests/heading-title-case/.vale.init b/packages/spectrocloud/tests/heading-title-case/.vale.init index d96c77d..72dc18c 100644 --- a/packages/spectrocloud/tests/heading-title-case/.vale.init +++ b/packages/spectrocloud/tests/heading-title-case/.vale.init @@ -1,4 +1,5 @@ StylesPath = ../../styles/ MinAlertLevel = suggestion [*.md] -spectrocloud.heading-title-case = YES \ No newline at end of file +spectrocloud.heading-title-case = YES +spectrocloud.heading-all-caps = YES \ No newline at end of file diff --git a/packages/spectrocloud/tests/heading-title-case/fail.md b/packages/spectrocloud/tests/heading-title-case/fail.md index cc200ba..160b198 100644 --- a/packages/spectrocloud/tests/heading-title-case/fail.md +++ b/packages/spectrocloud/tests/heading-title-case/fail.md @@ -1,3 +1,5 @@ ## This isn't title case ## this is also not title case + +## THIS AGAIN IS NOT TITLE CASE