forked from mui/material-ui
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[core] Setup vale for enforcing style guides (mui#39633)
- Loading branch information
1 parent
4971e84
commit df00f50
Showing
14 changed files
with
103 additions
and
7 deletions.
There are no files selected for viewing
This file contains 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,13 @@ | ||
extends: substitution | ||
message: To be consistent with the rest of the documentation, consider using '%s' instead of '%s'. | ||
level: warning | ||
ignorecase: true | ||
# swap maps tokens in form of bad: good | ||
# for more information: https://vale.sh/docs/topics/styles/#substitution | ||
swap: | ||
sub-component: subcomponent | ||
sub-components: subcomponents | ||
'sub component': subcomponent | ||
'sub components': subcomponents | ||
'use-case': 'use case' | ||
'usecase': 'use case' |
This file contains 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 @@ | ||
extends: substitution | ||
message: To be consistent with capitalization, consider using '%s' instead of '%s'. | ||
level: warning | ||
ignorecase: false | ||
# swap maps tokens in form of bad: good | ||
# for more information: https://vale.sh/docs/topics/styles/#substitution | ||
swap: | ||
api: API | ||
Api: API | ||
typescript: TypeScript | ||
Typescript: TypeScript | ||
ts: TypeScript | ||
TS: TypeScript | ||
javascript: JavaScript | ||
Javascript: JavaScript | ||
css: CSS | ||
Css: CSS |
This file contains 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,8 @@ | ||
extends: substitution | ||
message: Do you mean '%s' instead of '%s'? | ||
level: warning | ||
ignorecase: true | ||
# swap maps tokens in form of bad: good | ||
# for more information: https://vale.sh/docs/topics/styles/#substitution | ||
swap: | ||
bellow: below |
Empty file.
Empty file.
This file contains 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,23 @@ | ||
name: Vale action | ||
|
||
on: [pull_request] | ||
|
||
permissions: {} | ||
|
||
jobs: | ||
vale: | ||
name: runner / vale | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
pull-requests: write | ||
steps: | ||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
- uses: errata-ai/vale-action@c4213d4de3d5f718b8497bd86161531c78992084 # v2.0.1 | ||
with: | ||
reporter: github-pr-review | ||
files: docs/data | ||
env: | ||
# Required, set by GitHub actions automatically: | ||
# https://docs.github.com/en/actions/security-guides/automatic-token-authentication#about-the-github_token-secret | ||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} |
This file contains 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
This file contains 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,32 @@ | ||
# Config vale. More information at https://docs.errata.ai/vale/config | ||
StylesPath = .github/styles | ||
MinAlertLevel = suggestion | ||
|
||
Packages = Google | ||
|
||
[*.md] | ||
# Ignore code injection which start with {{... | ||
BlockIgnores = {{.* | ||
|
||
# Custom syle | ||
# BasedOnStyles = Blog | ||
|
||
Blog.ComposedWords = YES | ||
Blog.NamingConventions = YES | ||
Blog.Typos = YES | ||
|
||
# Google: | ||
Google.FirstPerson = YES # Avoid first-person pronouns such as I, me, ...'. | ||
Google.GenderBias = YES # Avoid gendered profession | ||
Google.OxfordComma = YES | ||
Google.Quotes = YES # Commas and periods go inside quotation marks. | ||
Google.Spelling = YES #In general, use American spelling (word ending with 'nised' or 'logue') | ||
Google.We = YES # Try to avoid using first-person plural | ||
Google.Latin = YES # Try to avoid latin expressions e.g. and i.e. | ||
|
||
# Those rules are not repected a lot | ||
# Google.Passive = YES # In general, use active voice instead of passive voice. | ||
Google.Will = YES # Avoid using will | ||
|
||
# False positives with "1st" nearly no use in our doc | ||
# Google.Units = YES # Put a nonbreaking space between the number and the unit |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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