Skip to content

Commit

Permalink
Refactor Vale
Browse files Browse the repository at this point in the history
* Treat yaml files as markdown files so we can check landing_pages
* Add IgnoreBlocks for specific landing_pages blocks
* Delete landing_pages Dictionary and Spelling, they'll use the same as
  docs
  • Loading branch information
fabianrbz committed Nov 25, 2024
1 parent da0a85e commit 1687735
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 20 deletions.
3 changes: 2 additions & 1 deletion .github/styles/docs/Spelling.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ level: error
filters:
- '\W'
ignore:
- .github/styles/base/Dictionary.txt
- .github/styles/base/Dictionary.txt
- .github/styles/landing_pages/Components.txt
2 changes: 2 additions & 0 deletions .github/styles/landing_pages/Components.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
allow_empty
alt_text
concept_list
content_type
cta
entity_card
faqs
feature_table
how_to_list
include_content
landing_page
reference_list
related_resources
structured_text
Expand Down
6 changes: 0 additions & 6 deletions .github/styles/landing_pages/Dictionary.txt

This file was deleted.

10 changes: 0 additions & 10 deletions .github/styles/landing_pages/Spelling.yml

This file was deleted.

9 changes: 6 additions & 3 deletions .vale.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,21 @@ MinAlertLevel = suggestion

[formats]
mdx = md
yaml = md

# Specifies what Vale considers to be a boundary between words.
WordTemplate = \s(?:%s)\s

[*.yaml]
BasedOnStyles = base,landing_pages

[*.md]
BasedOnStyles = base,docs
BlockIgnores = (\((http.*://|\.\/|\/).*?\)), \
{\:.*?}, \
(?s){% kgo_.*?%}.*?{% endkgo_.*?%}, \
(?s) *{%\s*entity_examples?\s*%}.*?{%\s*endentity_examples?\s*%}
(?s) *{%\s*entity_examples?\s*%}.*?{%\s*endentity_examples?\s*%}, \
(?:)(\s*type\: github\n), \
(?:)(\s*key\: oss\n), \
(?:)(\s*include_content\: .*\n)

TokenIgnores = {%.*?%}, \
{{.*?}}, \
Expand Down

0 comments on commit 1687735

Please sign in to comment.