-
Notifications
You must be signed in to change notification settings - Fork 266
Add vale prose linter #1646
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Add vale prose linter #1646
Changes from all commits
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
b78b8be
add .vale.ini+basic rules
maryamsulemani97 914b38d
remove wordiness rule
maryamsulemani97 000e03e
add comments explaining each rule+add links to further explanation
maryamsulemani97 e7ede4c
update headings rule(not working)
maryamsulemani97 68b97a7
remove heading rules
maryamsulemani97 6949513
ignore first person rule for telemetry.md
maryamsulemani97 63422d1
add rule for repeated words
maryamsulemani97 bb11701
update list of accepted words
maryamsulemani97 04c8b4c
updated list of accepted words_2
maryamsulemani97 2575a3c
update list of files to ignore `FirstPerson.yml`
maryamsulemani97 796daf3
update `accept.txt` to ignore any text in []
maryamsulemani97 52199c1
more accepted words
maryamsulemani97 2d7e0d8
update `Condescending.yml`
maryamsulemani97 5f13e36
sound condescending for now
maryamsulemani97 c7da541
Update styles/Vocab/word_list/accept.txt
maryamsulemani97 17a4ab0
Update styles/Vocab/word_list/accept.txt
maryamsulemani97 d04a80d
Update styles/Vocab/word_list/accept.txt
maryamsulemani97 63a2ea0
Update styles/Vocab/word_list/accept.txt
maryamsulemani97 0f065d8
Update styles/style_guide/Periods.yml
maryamsulemani97 a1e4d23
Update styles/style_guide/URLFormat.yml
maryamsulemani97 555b2ce
Update accept.txt
maryamsulemani97 bb354f7
update based on review
maryamsulemani97 0e8bd28
update heading rules
maryamsulemani97 d14cfd1
move rules to `.vale` folder
maryamsulemani97 a817ff1
Update accept.txt
maryamsulemani97 587779f
Update vale.ini to add MinAlertLevel
maryamsulemani97 8ddceb8
Update accept.txt
maryamsulemani97 6c7b776
Update .vale/styles/style_guide/HeadingPunctuation.yml
maryamsulemani97 26821b3
Update .vale/styles/style_guide/Headings.yml
maryamsulemani97 2b59645
Update FirstPerson.yml
maryamsulemani97 0ae23f2
Update HeadingPunctuation.yml
maryamsulemani97 b41877b
Update Headings.yml
maryamsulemani97 4dd95da
Update accept.txt
maryamsulemani97 183cb7f
update vale.ini
maryamsulemani97 8cbf38f
Update Spacing.yml
maryamsulemani97 b100792
Update and rename spellcheck.yml to Spelling.yml
maryamsulemani97 ec628f9
add warning/error name + added internal link & merge conflict rules
maryamsulemani97 6dd5d28
update based on review
maryamsulemani97 d8334ab
Update accept.txt
maryamsulemani97 05312a1
Update .vale/styles/Vocab/word_list/accept.txt
maryamsulemani97 89db44b
update based on review
maryamsulemani97 6ff5495
Update accept.txt
maryamsulemani97 810b7fa
Update .vale/styles/style_guide/Repetition.yml
maryamsulemani97 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
StylesPath = .vale/styles | ||
MinAlertLevel = suggestion | ||
|
||
Vocab = word_list | ||
|
||
[*.md] | ||
BasedOnStyles = style_guide | ||
|
||
#style_guide.Headings = NO | ||
#style_guide.HeadingPunctuation = NO |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
Meilisearch | ||
[Ss]ubroute | ||
[Ss]ubstring | ||
uid | ||
jq | ||
Qovery | ||
Koyeb | ||
Vue | ||
[Gg]eosearch | ||
Nginx | ||
Docxtemplater | ||
[Cc]onfig | ||
Algolia | ||
Typesense | ||
Symfony | ||
Laravel | ||
Strapi | ||
[Ss]chemaless | ||
[Rr]eindexed | ||
chatbox | ||
Lucene | ||
Levenshtein | ||
Swiftype | ||
[Tt]okenizer | ||
[Tt]okenization | ||
[Aa]sync | ||
[Ee]nqueued | ||
[Ff]ilepath | ||
[Ww]ebshop | ||
boolean | ||
Taj | ||
Mahal | ||
[Cc]ertbot | ||
[Tt]oolchain | ||
Jieba | ||
Lindera | ||
Netlify | ||
[Oo]verconsumption | ||
[Gg]eopositioning | ||
hanzi | ||
[Aa]utobatching | ||
[Ii]mpactful | ||
[Ll]owercased | ||
[Mm]ultitenancy | ||
[Rr]ulesets | ||
[Pp]repended | ||
[Aa]nonymized | ||
[Ss]erverless | ||
[Aa]utoscaling | ||
[Hh]ostname | ||
Scaleway | ||
cron | ||
mkcert | ||
[Uu]pvote | ||
Docsearch | ||
[Oo]rderable | ||
[Pp]erformant | ||
Nutch | ||
[Ss]ubproject | ||
Doofinder | ||
'/\(\B(.*?)\)' | ||
[Ss]harding | ||
[Mm]eili | ||
jsonlines | ||
Biutiful | ||
Gb | ||
docs-searchbar.js |
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
# Suggestion: style_guide.FirstPerson | ||
|
||
# We want to avoid using singular first person pronouns | ||
extends: existence | ||
message: "Avoid first-person pronouns such as '%s'." | ||
link: 'https://developers.google.com/style/pronouns#personal-pronouns' | ||
ignorecase: true | ||
level: suggestion | ||
nonword: true | ||
tokens: | ||
- (?:^|\s)I\s | ||
- (?:^|\s)I,\s | ||
- \bI'm\b | ||
- \bme\b | ||
- \bmy\b | ||
- \bmine\b |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
# Suggestion: style_guide.HeadingPunctuation.yml | ||
|
||
# Need to update this for "1. Click this" "1.1. Click that" | ||
# Our headings should not use end punctuation | ||
extends: existence | ||
message: "Don't use end punctuation in headings." | ||
link: https://developers.google.com/style/periods | ||
level: suggestion | ||
scope: heading | ||
tokens: | ||
- '[a-z0-9][.?!](?:\s|$)' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
--- | ||
# Suggestion: style_guide.Headings.yml | ||
|
||
# Our headings should use sentence-style capitalization. The exceptions include any headings that maybe a list, start with "Step 1: Do this", and the list of words below | ||
extends: capitalization | ||
message: "'%s' should use sentence-style capitalization." | ||
link: 'https://developers.google.com/style/capitalization#capitalization-in-titles-and-headings' | ||
level: suggestion | ||
scope: heading | ||
match: $sentence | ||
indicators: | ||
- ':' | ||
exceptions: | ||
- Azure | ||
- CLI | ||
- Code | ||
- Docker | ||
- SDK | ||
- SDKs | ||
- Kubernetes | ||
- Linux | ||
- macOS | ||
- Marketplace | ||
- MongoDB | ||
- TypeScript | ||
- URLs | ||
- Visual | ||
- VS | ||
- Windows | ||
- Meilisearch | ||
- AWS | ||
- Amazon Web Services | ||
- DigitalOcean | ||
- GCP | ||
- Qovery | ||
- GCP | ||
- Google Cloud Platform | ||
- Compute Engine | ||
- GitHub | ||
- JSON | ||
- API | ||
- VuePress | ||
- OpenAPI | ||
- Elasticsearch | ||
- Algolia | ||
- DevOps | ||
- Lucene-Solr | ||
- App Service Auto-Scale | ||
- Certbot | ||
- Bleve & Tantivy | ||
- '([0-9a-z]:\s[A-Z])' #How do get this to throw an error for `Step 1: do this`? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
# Error: style_guide.Meilisearch.yml | ||
|
||
# Lists any possible typos for Meilisearch | ||
dichotommy marked this conversation as resolved.
Show resolved
Hide resolved
|
||
extends: substitution | ||
message: "Use '%s' instead of '%s'." | ||
level: error | ||
swap: | ||
MeiliSearch: Meilisearch | ||
MieliSearch: Meilisearch | ||
meiliSearch: Meilisearch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
# Error: style_guide.MergeConflictMarkers.yml | ||
|
||
# Checks for the presence of merge conflict markers. | ||
extends: existence | ||
message: 'Merge conflict marker "%s" found.' | ||
link: https://docs.gitlab.com/ee/development/code_review.html#merging-a-merge-request | ||
level: error | ||
scope: raw | ||
raw: | ||
- '\n<<<<<<< .+\n|\n=======\n|\n>>>>>>> .+\n' | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
# Suggestion: style_guide.OxfordComma.yml | ||
|
||
# Use the Oxford comma, this may not work as intended for complex sentences with many commas | ||
maryamsulemani97 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
extends: existence | ||
message: "Use the Oxford comma in '%s'." | ||
link: 'https://developers.google.com/style/commas' | ||
scope: sentence | ||
level: suggestion | ||
tokens: | ||
- '(?:[^,]+,){1,}\s\w+\s(?:and|or)' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
# Suggestion: style_guide.Period.yml | ||
|
||
maryamsulemani97 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
# Don't use periods with acronyms. "H.T.M.L" is incorrect, HTML isn't | ||
|
||
extends: existence | ||
message: "Don't use periods with acronyms or initialisms such as '%s'." | ||
link: 'https://developers.google.com/style/abbreviations' | ||
level: suggestion | ||
nonword: true | ||
tokens: | ||
- '\b(?:[A-Z]\.){3,}' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
# Error: style_guide.Repetition.yml | ||
|
||
# catch any instances of repeated words. E.g., "This is is a sentence" | ||
extends: repetition | ||
message: "'%s' is repeated." | ||
level: error | ||
alpha: true | ||
tokens: | ||
- '[^\s]+' | ||
maryamsulemani97 marked this conversation as resolved.
Show resolved
Hide resolved
maryamsulemani97 marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
# Suggestion: style_guide.Semicolons.yml | ||
|
||
# If your sentence uses a semicolon, you should break it into two sentences or rewrite it to avoid super long sentences. | ||
extends: existence | ||
message: "Use semicolons judiciously." | ||
link: 'https://developers.google.com/style/semicolons' | ||
nonword: true | ||
scope: sentence | ||
level: suggestion | ||
tokens: | ||
- ';' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
# Error: style_guide.Spacing.yml | ||
|
||
# Use a space between words, sentences, and punctuation marks | ||
extends: existence | ||
message: "'%s' should have one space." | ||
link: https://docs.microsoft.com/en-us/style-guide/punctuation/periods | ||
level: error | ||
nonword: true | ||
tokens: | ||
- '[a-z]\s{2,}[a-z]' # ensure only one space between words | ||
- '[a-z][.?!:;",] {2,}[A-Z]' # one space between sentences (end. new) | ||
- '[a-z][.?!:;",][A-Z]' #(end.new) | ||
- '[\w.?!,\(\)\-":] {2,}[\w.?!,\(\)\-":]' #only one space after ,.? | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
# Warning: style_guide.Spelling.yml | ||
|
||
# Checks if your words exist in the dictionary. Any exceptions (including Meilisearch) should be defined in `styles/Vocab/word_list/accept.txt` | ||
extends: spelling | ||
message: "Did you really mean '%s'?" | ||
level: warning | ||
filters: | ||
- 'Vale.*\b' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
# Warning: style_guide.URLFormat.yml | ||
|
||
# Use "a URL"/"an HTML" instead of "an URL"/"a HTML" | ||
extends: substitution | ||
message: "Use '%s' instead of '%s'." | ||
ignorecase: true | ||
level: warning | ||
action: | ||
name: replace | ||
swap: | ||
URL for: URL of | ||
an URL: a URL | ||
a HTML: an HTML |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.