From 44d54be96a7fb56c91f5c5eca8c7f6fe5783cec0 Mon Sep 17 00:00:00 2001 From: Olivier Tassinari Date: Thu, 11 Jan 2024 00:27:11 +0100 Subject: [PATCH 1/4] [docs-infra] Enforce brand name rules --- .github/styles/Blog/BrandName.yml | 11 +++++++++++ .github/styles/Blog/ComposedWords.yml | 2 +- .github/styles/Blog/NamingConventions.yml | 2 +- .github/styles/Blog/NoCompanyName.yml | 11 +++++++++++ .github/styles/Blog/Typos.yml | 5 ++++- .vale.ini | 4 +++- docs/pages/blog/mui-x-v6.md | 2 +- 7 files changed, 32 insertions(+), 5 deletions(-) create mode 100644 .github/styles/Blog/BrandName.yml create mode 100644 .github/styles/Blog/NoCompanyName.yml diff --git a/.github/styles/Blog/BrandName.yml b/.github/styles/Blog/BrandName.yml new file mode 100644 index 00000000000000..0e5e28c1106c4d --- /dev/null +++ b/.github/styles/Blog/BrandName.yml @@ -0,0 +1,11 @@ +extends: substitution +message: Do you mean '%s' instead of '%s'? Notice the non-breaking space +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 diff --git a/.github/styles/Blog/ComposedWords.yml b/.github/styles/Blog/ComposedWords.yml index a18f017ed64a7e..149dc0bd6ab30f 100644 --- a/.github/styles/Blog/ComposedWords.yml +++ b/.github/styles/Blog/ComposedWords.yml @@ -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 diff --git a/.github/styles/Blog/NamingConventions.yml b/.github/styles/Blog/NamingConventions.yml index 116d28a576a593..c843c9ca2aa6cd 100644 --- a/.github/styles/Blog/NamingConventions.yml +++ b/.github/styles/Blog/NamingConventions.yml @@ -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 diff --git a/.github/styles/Blog/NoCompanyName.yml b/.github/styles/Blog/NoCompanyName.yml new file mode 100644 index 00000000000000..e6f31ceb6d334b --- /dev/null +++ b/.github/styles/Blog/NoCompanyName.yml @@ -0,0 +1,11 @@ +extends: existence +message: We avoid referencing the company name '%s'. Instead you can reference a product or the team or use we. +level: warning +ignorecase: false +tokens: + - 'MUI \w+' +exceptions: + - 'MUI X' + - 'MUI X' + - 'MUI System' + - 'MUI System' diff --git a/.github/styles/Blog/Typos.yml b/.github/styles/Blog/Typos.yml index 1a6e5407f69c9a..9397f615325054 100644 --- a/.github/styles/Blog/Typos.yml +++ b/.github/styles/Blog/Typos.yml @@ -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. ' diff --git a/.vale.ini b/.vale.ini index fbace57ed3bdc5..d4d101e0960108 100644 --- a/.vale.ini +++ b/.vale.ini @@ -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. diff --git a/docs/pages/blog/mui-x-v6.md b/docs/pages/blog/mui-x-v6.md index 9348275f3d9f74..062aecabb5f9ee 100644 --- a/docs/pages/blog/mui-x-v6.md +++ b/docs/pages/blog/mui-x-v6.md @@ -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 +npx @mui/x-codemod@latest v6.0.0/preset-safe ``` ## What's next? From 9409e1f446630112f0129a0070078155e439dc00 Mon Sep 17 00:00:00 2001 From: Olivier Tassinari Date: Thu, 11 Jan 2024 22:41:50 +0100 Subject: [PATCH 2/4] Update .github/styles/Blog/BrandName.yml Co-authored-by: Alexandre Fauquette <45398769+alexfauquette@users.noreply.github.com> Signed-off-by: Olivier Tassinari --- .github/styles/Blog/BrandName.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/styles/Blog/BrandName.yml b/.github/styles/Blog/BrandName.yml index 0e5e28c1106c4d..2b636994fea88a 100644 --- a/.github/styles/Blog/BrandName.yml +++ b/.github/styles/Blog/BrandName.yml @@ -1,5 +1,5 @@ extends: substitution -message: Do you mean '%s' instead of '%s'? Notice the non-breaking space +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 From 24819feadafe2772fc4dc5dce84688304b140a71 Mon Sep 17 00:00:00 2001 From: Olivier Tassinari Date: Thu, 11 Jan 2024 22:42:14 +0100 Subject: [PATCH 3/4] Update .github/styles/Blog/NoCompanyName.yml Co-authored-by: Alexandre Fauquette <45398769+alexfauquette@users.noreply.github.com> Signed-off-by: Olivier Tassinari --- .github/styles/Blog/NoCompanyName.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/styles/Blog/NoCompanyName.yml b/.github/styles/Blog/NoCompanyName.yml index e6f31ceb6d334b..43da752bf02c52 100644 --- a/.github/styles/Blog/NoCompanyName.yml +++ b/.github/styles/Blog/NoCompanyName.yml @@ -1,5 +1,5 @@ extends: existence -message: We avoid referencing the company name '%s'. Instead you can reference a product or the team or use we. +message: We avoid referencing the company name '%s'. Instead you can reference a product or the team. level: warning ignorecase: false tokens: From 7b7a56a0d770c94d33029c7cb5fd233079864e88 Mon Sep 17 00:00:00 2001 From: Olivier Tassinari Date: Thu, 11 Jan 2024 22:46:43 +0100 Subject: [PATCH 4/4] Update .github/styles/Blog/BrandName.yml Signed-off-by: Olivier Tassinari --- .github/styles/Blog/BrandName.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/styles/Blog/BrandName.yml b/.github/styles/Blog/BrandName.yml index 2b636994fea88a..f0e0dd6b3e0933 100644 --- a/.github/styles/Blog/BrandName.yml +++ b/.github/styles/Blog/BrandName.yml @@ -1,3 +1,4 @@ +# Without a non-breaking space, brand names can be split in the middle, with the start and end on two different lines. extends: substitution message: Use a non-breaking space for brand name ('%s' instead of '%s') level: error