-
Notifications
You must be signed in to change notification settings - Fork 549
build: Add vale configuration and demonstrate usage #24252
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
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
800cad5
Add vale configuration
tylerbutler 7e08e3e
add workflow
tylerbutler 41f77fa
Merge branch 'main' into vale
tylerbutler 829d7de
new changeset format
tylerbutler b457d62
config
tylerbutler efb81c5
config
tylerbutler ecd4427
config
tylerbutler 5019611
config
tylerbutler 8239827
policy
tylerbutler 149e438
workflow
tylerbutler 0585811
Merge remote-tracking branch 'upstream/main' into vale
tylerbutler b55188c
Apply suggestions from code review
tylerbutler 6f1ba47
Merge branch 'main' into vale
tylerbutler a8ea0a1
Merge branch 'main' into vale
tylerbutler 3894624
lockfile
tylerbutler 26d00b0
pin workflow
tylerbutler File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: "pr-changeset-review" | ||
|
||
# This workflow runs lint-like checks against changesets in PRs. The linting tool used is called Vale. The worflow will | ||
# add comments for any warnings or errors that Vale finds in the changeset. | ||
|
||
# To run vale locally against changesets, you can use `pnpm run check:changesets`. | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened # PR is created | ||
- synchronize # commits added to PR | ||
- reopened # closed PR re-opened | ||
branches: | ||
- main | ||
paths: | ||
- ".changeset/**" # Trigger only when changes are found under .changeset | ||
|
||
permissions: | ||
pull-requests: write | ||
|
||
jobs: | ||
vale: | ||
name: vale | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # ratchet:actions/checkout@v3 | ||
with: | ||
persist-credentials: false | ||
- uses: errata-ai/vale-action@d89dee975228ae261d22c15adcd03578634d429c # ratchet:errata-ai/vale-action@v2.1.1 | ||
with: | ||
files: .changeset | ||
vale_flags: "--glob=*-*-*.md" | ||
reporter: github-pr-review | ||
filter_mode: nofilter |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
StylesPath = .vale | ||
|
||
MinAlertLevel = suggestion | ||
|
||
Packages = Microsoft, MDX, proselint | ||
|
||
Vocab = fluid | ||
|
||
[*README.md] | ||
Microsoft.We = NO | ||
|
||
[*.{md}] | ||
BasedOnStyles = Vale, Microsoft, proselint | ||
|
||
; Note that only errors will be reported in GitHub PR comments. | ||
; This seems to be a limitation of the GitHub Action. | ||
; When running locally, all levels will be reported. | ||
Microsoft.Contractions = NO | ||
Microsoft.Passive = NO | ||
Microsoft.Terms = suggestion | ||
Microsoft.Vocab = NO |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Fluid Framework | ||
FluidFramework | ||
JavaScript | ||
SharedTree | ||
TypeScript |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
shared tree | ||
tylerbutler marked this conversation as resolved.
Show resolved
Hide resolved
|
||
fluid | ||
fluid framework |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't it enough to have
.vale/**
and this last line?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For reasons I don't understand, no. If you do that, and add a new file under .vale/config/vocabularies/fluid/, it will
still be ignored. My hunch is that it has something to do with precedence of negation and how it works with folder
paths, but I didn't dig into it. FWIW the vale docs follow this pattern and I thought it was unnecssary too.