Skip to content

Commit 98a08c9

Browse files
[docs] Fix some Vale errors (#41516)
1 parent 4ca8a0e commit 98a08c9

216 files changed

Lines changed: 669 additions & 577 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ commands:
6262
browsers:
6363
type: boolean
6464
default: false
65-
description: 'Set to true if you intend to any browser (e.g. with playwright).'
65+
description: 'Set to true if you intend to any browser (for example with playwright).'
6666

6767
steps:
6868
- run:

.vale.ini

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,23 @@
1-
# Config vale. More information at https://docs.errata.ai/vale/config
1+
# Vale config. More information at https://vale.sh/docs/topics/config/
22
StylesPath = .github/styles
3-
MinAlertLevel = suggestion
3+
MinAlertLevel = warning
44

5-
# The docs/writing-rules.zip is generated by `pnpm docs:zipRules`
6-
Packages = Google, docs/writing-rules.zip
5+
# The docs/mui-vale.zip is generated by `pnpm docs:zipRules`
6+
Packages = Google,docs/mui-vale.zip
77

88
[*.md]
9-
# Ignore code injection which start with {{...
9+
# Ignore code injections that start with {{...
1010
BlockIgnores = {{.*
1111

12-
BasedOnStyles = writing-rules
12+
BasedOnStyles = MUI
1313

14-
# Google:
15-
Google.FirstPerson = YES # Avoid first-person pronouns such as I, me, ...'.
16-
Google.GenderBias = YES # Avoid gendered profession
17-
Google.OxfordComma = YES
18-
Google.Quotes = YES # Commas and periods go inside quotation marks.
19-
Google.Spelling = YES # In general, use American spelling (word ending with 'nised' or 'logue')
20-
Google.We = YES # Try to avoid using first-person plural
21-
Google.Latin = YES # Try to avoid latin expressions e.g. and i.e.
14+
# Google errors:
15+
Google.GenderBias = YES # No Gender bias
16+
# Google warings:
17+
Google.FirstPerson = YES # Avoid first-person
18+
Google.We = YES # Avoid first-person plural
19+
Google.Will = YES # Avoid future tense
20+
Google.OxfordComma = YES # Prefer Oxford comma
2221

23-
# Those rules are not repected a lot
24-
# Google.Passive = YES # In general, use active voice instead of passive voice.
25-
Google.Will = YES # Avoid using will
26-
27-
# False positives with "1st" nearly no use in our doc
28-
# Google.Units = YES # Put a nonbreaking space between the number and the unit
22+
[CHANGELOG*.md]
23+
MUI.CorrectReferenceAllCases = NO

CHANGELOG.md

Lines changed: 56 additions & 56 deletions
Large diffs are not rendered by default.

CHANGELOG.old.md

Lines changed: 60 additions & 60 deletions
Large diffs are not rendered by default.

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ Click on **Details** to find out more about them.
253253
### Updating the component API documentation
254254

255255
The component API in the component `propTypes` and under `docs/pages/api-docs` is auto-generated from the [JSDoc](https://jsdoc.app/about-getting-started.html) in the TypeScript declarations.
256-
Be sure to update the documentation in the corresponding `.d.ts` files (e.g. `packages/mui-material/src/Button/Button.d.ts` for `<Button>`) and then run:
256+
Be sure to update the documentation in the corresponding `.d.ts` files (for example `packages/mui-material/src/Button/Button.d.ts` for `<Button>`) and then run:
257257

258258
```bash
259259
$ pnpm proptypes
@@ -300,11 +300,11 @@ docs/src/pages/components/buttons/
300300
#### 2. Write the demo code
301301

302302
We uses TypeScript to document our components.
303-
We prefer demos written in TS (using the `.tsx` file format).
303+
We prefer demos written in TypeScript (using the `.tsx` file format).
304304

305305
After creating a TypeScript demo, run `pnpm docs:typescript:formatted` to automatically create the JavaScript version, which is also required.
306306

307-
If you're not familiar with TypeScript, you can write the demo in JavaScript, and a core contributor may help you migrate it to TS.
307+
If you're not familiar with TypeScript, you can write the demo in JavaScript, and a core contributor may help you migrate it to TypeScript.
308308

309309
#### 3. Edit the page's Markdown file
310310

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,15 +117,15 @@ You can find complete templates and themes in the [MUI Store](https://mui.com/s
117117
Read the [contributing guide](/CONTRIBUTING.md) to learn about our development process, how to propose bug fixes and improvements, and how to build and test your changes.
118118

119119
Contributing is about more than just issues and pull requests!
120-
There are many other ways to [support MUI](https://mui.com/material-ui/getting-started/faq/#mui-is-awesome-how-can-i-support-the-project) beyond contributing to the code base.
120+
There are many other ways to [support Material UI](https://mui.com/material-ui/getting-started/faq/#mui-is-awesome-how-can-i-support-the-project) beyond contributing to the code base.
121121

122122
## Changelog
123123

124124
The [changelog](https://github.com/mui/material-ui/releases) is regularly updated to reflect what's changed in each new release.
125125

126126
## Roadmap
127127

128-
Future plans and high-priority features and enhancements can be found in our [roadmap](https://mui.com/material-ui/discover-more/roadmap/).
128+
Future plans and high-priority features and enhancements can be found in the [roadmap](https://mui.com/material-ui/discover-more/roadmap/).
129129

130130
## License
131131

TYPESCRIPT_CONVENTION.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
99
### `Props Interface`
1010

11-
- export interface `{ComponentName}classes` from `{component}Classes.ts` and add comment for generating api docs (for internal components, may or may not expose classes but don't need comment)
11+
- export interface `{ComponentName}classes` from `{component}Classes.ts` and add comment for generating API docs (for internal components, may or may not expose classes but don't need comment)
1212
- export interface `{ComponentName}Props`
1313
- always export props interface (use `interface` over `type`) from the component file
1414

dangerfile.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ function addDeployPreviewUrls() {
194194
const fragments = url.split('/').reverse();
195195
if (fragments[0] === fragments[1]) {
196196
// check if the end of pathname is the same as the one before
197-
// e.g. `/data/material/getting-started/overview/overview.md
197+
// for example `/data/material/getting-started/overview/overview.md
198198
url = fragments.slice(1).reverse().join('/');
199199
}
200200

docs/data/base/components/focus-trap/focus-trap.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ The following demo uses the [Portal](/base-ui/react-portal/) component to render
7878

7979
### Using a toggle inside the trap
8080

81-
The most common use-case for the Focus Trap component is to maintain focus within a [Modal](/base-ui/react-modal/) component that is entirely separate from the element that opens the modal.
81+
The most common use case for the Focus Trap component is to maintain focus within a [Modal](/base-ui/react-modal/) component that is entirely separate from the element that opens the modal.
8282
But you can also create a toggle button for the `open` prop of the Focus Trap component that is stored inside of the component itself, as shown in the following demo:
8383

8484
{{"demo": "ContainedToggleTrappedFocus.js"}}

docs/data/base/components/form-control/form-control.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ The demo below shows how to integrate this hook with its component counterpart:
8282

8383
{{"demo": "UseFormControl.js", "defaultCodeOpen": false}}
8484

85-
Note that even though Form Control supports both controlled and uncontrolled-style APIs (i.e. it accepts `value` and `defaultValue` props), `useFormControlContext` returns only the controlled `value`.
85+
Note that even though Form Control supports both controlled and uncontrolled-style APIs (that is it accepts `value` and `defaultValue` props), `useFormControlContext` returns only the controlled `value`.
8686
This way, you don't have to implement both in your custom input—Form Control does this for you.
8787

8888
:::info

0 commit comments

Comments
 (0)