Skip to content
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

[docs-infra] Enforce brand name rules #40525

Merged
merged 4 commits into from
Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/styles/Blog/BrandName.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Without a non-breaking space, brand names can be split in the middle, with the start and end on two different lines.
extends: substitution
oliviertassinari marked this conversation as resolved.
Show resolved Hide resolved
message: Use a non-breaking space for brand name ('%s' instead of '%s')
level: error
ignorecase: true
# swap maps tokens in form of bad: good
# for more information: https://vale.sh/docs/topics/styles/#substitution
swap:
Material UI: Material UI
MUI X: MUI X
Base UI: Base UI
MUI System: MUI System
2 changes: 1 addition & 1 deletion .github/styles/Blog/ComposedWords.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
extends: substitution
message: To be consistent with the rest of the documentation, consider using '%s' instead of '%s'.
level: warning
level: error
ignorecase: true
# swap maps tokens in form of bad: good
# for more information: https://vale.sh/docs/topics/styles/#substitution
Expand Down
2 changes: 1 addition & 1 deletion .github/styles/Blog/NamingConventions.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
extends: substitution
message: To be consistent with capitalization, consider using '%s' instead of '%s'.
level: warning
level: error
ignorecase: false
# swap maps tokens in form of bad: good
# for more information: https://vale.sh/docs/topics/styles/#substitution
Expand Down
11 changes: 11 additions & 0 deletions .github/styles/Blog/NoCompanyName.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
extends: existence
message: We avoid referencing the company name '%s'. Instead you can reference a product or the team.
level: warning
ignorecase: false
tokens:
- 'MUI \w+'
exceptions:
- 'MUI X'
- 'MUI X'
- 'MUI System'
- 'MUI System'
5 changes: 4 additions & 1 deletion .github/styles/Blog/Typos.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
extends: substitution
message: Do you mean '%s' instead of '%s'?
level: warning
level: error
ignorecase: true
# swap maps tokens in form of bad: good
# for more information: https://vale.sh/docs/topics/styles/#substitution
swap:
bellow: below
eg: e.g.
eg.: e.g.
'e.g ': 'e.g. '
4 changes: 3 additions & 1 deletion .vale.ini
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@ BlockIgnores = {{.*
Blog.ComposedWords = YES
Blog.NamingConventions = YES
Blog.Typos = YES
Blog.BrandName = YES
Blog.NoCompanyName = 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.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.

Expand Down
2 changes: 1 addition & 1 deletion docs/pages/blog/mui-x-v6.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ If you're coming from previous versions, we recommend you check our migration gu
We also provide codemods to automate some of the necessary updates in your codebase.

```bash
npx @mui/x-codemod v6.0.0/preset-safe <path>
npx @mui/x-codemod@latest v6.0.0/preset-safe <path>
```

## What's next?
Expand Down