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

Create .valeignore #1447

Closed
wants to merge 1 commit into from
Closed

Conversation

MarcusSorealheis
Copy link
Collaborator

@MarcusSorealheis MarcusSorealheis commented Oct 31, 2024

we need to leave the blog's voice unemcumbered.


This change is Reviewable

we need to leave the blog's voice unemcumbered.
Copy link
Member

@aaronmondal aaronmondal left a comment

Choose a reason for hiding this comment

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

You can disable vale already directly in the blogs via around the scopes that trigger vale, e.g via <!-- vale Style.Rule = NO --> and <!-- vale Style.Rule = YES -->.

See: https://vale.sh/docs/topics/config/#markdown-amp-html

Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: 0 of 1 LGTMs obtained, and all files reviewed, and pending CI: Coverage, Installation / macos-13, Installation / macos-14, Remote / large-ubuntu-22.04, macos-13

@MarcusSorealheis
Copy link
Collaborator Author

I don't think Vale is for blogs.

@aaronmondal
Copy link
Member

I don't think Vale is for blogs.

Some style issues are certainly not good for blogs, but we largely disabled those globally already. The errors that trigger are mostly to correct spelling mistakes. Almost all cases fall under one of these categories:

If we add global vale ignores we run the risk of introducing typos in these documents, which I'd argue would be worse than the slight inconvenience sometimes caused by the warnings.

Also note that the language that we "enforce" here is harder to generate via LLMs. In other words, vale-linted documents have a higher chance to look "human" to search engines.

@SchahinRohani
Copy link
Contributor

Every writer has his own writing style. I am not sure if it's good to force those writers with vale to change their style.
A global .valeignore could be a good solution to this...

@MarcusSorealheis
Copy link
Collaborator Author

MarcusSorealheis commented Nov 1, 2024 via email

@aaronmondal
Copy link
Member

After looking into this more I think I found a way that could make everyone happy here.

This file is the one that configures styles:

nativelink/.vale.ini

Lines 1 to 27 in 8a3869c

StylesPath = .github/styles
# TODO(aaronmondal): Set this to `warning`, then to `suggestion` once Vale
# stabilizes in CI.
MinAlertLevel = error
Vocab = TraceMachina
Packages = alex, Microsoft, write-good
[formats]
mdx = md
[*.{md,mdx}]
BasedOnStyles = alex, Vale, Microsoft, write-good
# Ignore code blocks in Starlight's TabItems.
BlockIgnores = (?s)(<TabItem.*?>.*?```.*?```.*?</TabItem>)
# Ignore filesnames and director names in tree visualizations.
BlockIgnores = (?s)(<FileTree>.*?</FileTree>)
# Too harsh. The `write-good.Passive` check already covers many cases.
write-good.E-Prime = NO
# Redundant. Covered by `write-good.Passive`.
Microsoft.Passive = NO

Note the [*.{md,mdx}] section. I believe if we add a section like [path/to/blogposts/*.{md,mdx}] we can disable things like contractions "globally" for blogs but keep the typo checking intact. Would that work? I totally get that we shouldn't enforce strict style in freeform text, just trying to prevent things like actual typos and to ensure that if we use "unusual" words that we add them to the accept.txt file and/or use backticks correctly where appropriate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants