Skip to content

Commit

Permalink
Improve prose linting configuration (#2196)
Browse files Browse the repository at this point in the history
* Add exclusions for vintage and changes directories

* Remove glob flag

* Update 3rd party styles

* Refine rejections
  • Loading branch information
marians authored Apr 30, 2024
1 parent 244bce0 commit 6af9767
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 7 deletions.
22 changes: 20 additions & 2 deletions .vale.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,27 @@ Vocab = docs

Packages = Hugo, Microsoft

[*.md]
[src/content/*.md]
MinAlertLevel = suggestion
BasedOnStyles = Vale, Microsoft

# Microsoft.We disallows the use of "we" or "us". We are using this in many places for now.
# Microsoft.We disallows the use of "we" or "us". At Giant Swarm we are using this in many places for now.
Microsoft.We = NO

# No linting at all for the /vintage section
[src/content/vintage/*.md]
MinAlertLevel = error
BasedOnStyles = Vale
Vale.Avoid = NO
Vale.Repetition = NO
Vale.Spelling = NO
Vale.Terms = NO

# No linting at all for the /changes section
[src/content/changes/*.md]
MinAlertLevel = error
BasedOnStyles = Vale
Vale.Avoid = NO
Vale.Repetition = NO
Vale.Spelling = NO
Vale.Terms = NO
2 changes: 1 addition & 1 deletion .vale/styles/Microsoft/HeadingPunctuation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ action:
- trim_right
- ".?!"
tokens:
- '[a-z][.?!](?:\s|$)'
- "[a-z][.?!]$"
5 changes: 2 additions & 3 deletions .vale/styles/config/vocabularies/docs/reject.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
giantnetes
k8s
K8s
[gG]iantnetes
[kK]8s(?!-initiator-app)
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ lint-prose:
-w /workdir \
$(VALE_IMAGE) \
--config=/workdir/.vale.ini \
--glob '!{src/content/vintage/**,src/content/changes/**}' \
--no-wrap \
src/content

Expand Down

0 comments on commit 6af9767

Please sign in to comment.