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

[core] Setup vale for enforcing style guides #39633

Merged
merged 7 commits into from
Oct 30, 2023

Conversation

alexfauquette
Copy link
Member

Fix #32486

@samuelsycamore That's a copy past from X (I only removed files about date pickers and data grid)

@alexfauquette alexfauquette added the scope: docs-infra Specific to the docs-infra product label Oct 27, 2023
Copy link
Member

@samuelsycamore samuelsycamore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for moving forward with this @alexfauquette !

Comment on lines 9 to 11
eg: e.g.
eg.: e.g.
'e.g ': 'e.g. '
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this reminds me: can we add a rule to avoid Latinisms altogether? (etc., e.g., i.e.) - they're often confusing to non-native English speakers, and the latter two in particular are frequently misused. "etc." can always be cut or replaced with "and more", and "e.g" and "i.e." can be replaced with "for example."

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, Google has a Latin packge to detect eg and ie: https://github.com/errata-ai/Google/tree/master/Google

.vale.ini Outdated Show resolved Hide resolved
@samuelsycamore
Copy link
Member

samuelsycamore commented Oct 28, 2023

Other rules I'd love to see:

  • replace & with and
  • replace allows with lets
  • cut unnecessary words and phrases:
  • however
  • thus
  • to do so
  • as a result
  • in order to
  • really
  • just
  • simply
  • if you would like to
  • if you need to

Signed-off-by: Alexandre Fauquette <45398769+alexfauquette@users.noreply.github.com>
Comment on lines 9 to 11
eg: e.g.
eg.: e.g.
'e.g ': 'e.g. '
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, Google has a Latin packge to detect eg and ie: https://github.com/errata-ai/Google/tree/master/Google

.vale.ini Show resolved Hide resolved
.vale.ini Outdated Show resolved Hide resolved
.vale.ini Outdated Show resolved Hide resolved
.github/styles/Blog/Typos.yml Outdated Show resolved Hide resolved
alexfauquette and others added 2 commits October 30, 2023 12:28
Signed-off-by: Alexandre Fauquette <45398769+alexfauquette@users.noreply.github.com>
@alexfauquette
Copy link
Member Author

Other rules I'd love to see:

  • replace & with and
    ...

Can I let you add them in a follow-up PR? Most of the information about config is here.

Copy link
Member

@samuelsycamore samuelsycamore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ship it! 🚀 Thank you @alexfauquette !! I'll continue to refine the rules after this gets merged, and I'll try to remember to open a PR on the X side as well if I come up with any that make sense to add there too! (Which reminds me: does the Toolpad repo have Vale? If not, we might as well add it there too 😁)

Signed-off-by: Alexandre Fauquette <45398769+alexfauquette@users.noreply.github.com>
@alexfauquette alexfauquette enabled auto-merge (squash) October 30, 2023 14:01
@alexfauquette alexfauquette merged commit df00f50 into mui:master Oct 30, 2023
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: docs-infra Specific to the docs-infra product
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[docs-infra] Add Vale integration for automatic style and grammar linting
3 participants