Skip to content

Commit

Permalink
[docs-infra] Share vale-config (#41176)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfauquette authored Feb 21, 2024
1 parent b923a63 commit fdb8cdf
Show file tree
Hide file tree
Showing 13 changed files with 46 additions and 13 deletions.
Empty file removed .github/styles/Vocab/accept.txt
Empty file.
Empty file removed .github/styles/Vocab/reject.txt
Empty file.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,5 @@ package-lock.json
size-snapshot.json
docs/public/static/blog/feed/*
# vale downloaded config
.github/styles/Google
.github/styles/write-good
.github/styles/
.nx/cache
12 changes: 3 additions & 9 deletions .vale.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,14 @@
StylesPath = .github/styles
MinAlertLevel = suggestion

Packages = Google
# The docs/writing-rules.zip is generated by `pnpm docs:zipRules`
Packages = Google, docs/writing-rules.zip

[*.md]
# Ignore code injection which start with {{...
BlockIgnores = {{.*

# Custom syle
# BasedOnStyles = Blog

Blog.ComposedWords = YES
Blog.NamingConventions = YES
Blog.Typos = YES
Blog.BrandName = YES
Blog.NoCompanyName = YES
BasedOnStyles = writing-rules

# Google:
Google.FirstPerson = YES # Avoid first-person pronouns such as I, me, ...'.
Expand Down
Binary file added docs/writing-rules.zip
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,7 @@ swap:
MUI Core: MUI Core
MUI Toolpad: MUI Toolpad
MUI Connect: MUI Connect
# Don't forget to run the following command to generate the package writing-rules.zip file
# Vale uses that ZIP file and not the YAML files.
#
# pnpm docs:zipRules
16 changes: 16 additions & 0 deletions docs/writing-rules/ComponentNameConventions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
extends: substitution
message: To be consistent with component name, consider using '%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:
'Heat map': Heatmap
'Tree map': Treemap
'Sparkline Chart': Sparkline
'Gauge Chart': Gauge
'Treemap Chart': Treemap
# Don't forget to run the following command to generate the package writing-rules.zip file
# Vale uses that ZIP file and not the YAML files.
#
# pnpm docs:zipRules
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,9 @@ swap:
'sub components': subcomponents
'use-case': 'use case'
'usecase': 'use case'
'client side': 'client-side'
'server side': 'server-side'
# Don't forget to run the following command to generate the package writing-rules.zip file
# Vale uses that ZIP file and not the YAML files.
#
# pnpm docs:zipRules
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,7 @@ swap:
Css: CSS
NPM: npm # https://css-tricks.com/start-sentence-npm/
Github: GitHub
# Don't forget to run the following command to generate the package writing-rules.zip file
# Vale uses that ZIP file and not the YAML files.
#
# pnpm docs:zipRules
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,8 @@ exceptions:
- 'MUI Toolpad'
- 'MUI Connect'
- 'MUI organization' # valid use of a regular space

# Don't forget to run the following command to generate the package writing-rules.zip file
# Vale uses that ZIP file and not the YAML files.
#
# pnpm docs:zipRules
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ swap:
eg: e.g.
eg.: e.g.
'e.g ': 'e.g. '
# Don't forget to run the following command to generate the package writing-rules.zip file
# Vale uses that ZIP file and not the YAML files.
#
# pnpm docs:zipRules
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"docs:typescript:check": "pnpm --filter docs typescript",
"docs:typescript:formatted": "tsx ./docs/scripts/formattedTSDemos",
"docs:mdicons:synonyms": "cross-env BABEL_ENV=development babel-node --extensions \".tsx,.ts,.js,.mjs\" ./docs/scripts/updateIconSynonyms && pnpm prettier",
"docs:zipRules": "cd docs && rm writing-rules.zip && zip -r writing-rules.zip writing-rules",
"extract-error-codes": "cross-env MUI_EXTRACT_ERROR_CODES=true lerna run --concurrency 8 build:modern",
"rsc:build": "tsx ./packages/rsc-builder/buildRsc.ts",
"template:screenshot": "cross-env BABEL_ENV=development babel-node --extensions \".tsx,.ts,.js\" ./docs/scripts/generateTemplateScreenshots",
Expand Down
4 changes: 2 additions & 2 deletions packages/mui-material/src/Select/Select.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,8 @@ export type SelectProps<
(Variant extends 'filled'
? FilledSelectProps
: Variant extends 'standard'
? StandardSelectProps
: OutlinedSelectProps);
? StandardSelectProps
: OutlinedSelectProps);

/**
*
Expand Down

0 comments on commit fdb8cdf

Please sign in to comment.