-
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 1 commit
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
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 |
---|---|---|
@@ -1,30 +1,8 @@ | ||
--- | ||
"@fluidframework/core-utils": minor | ||
--- | ||
--- | ||
"section": feature | ||
"__section": feature | ||
--- | ||
|
||
New alpha `onAssertionFailure` API | ||
|
||
A new `@alpha` API is added called `onAssertionFailure` which can be used to get a callback when an assertion fails indicating a bug in the Fluid Framework. | ||
This callback is invoked before the exception is thrown, reducing the chances of the exception being lost or replaced with a different exception before making it to a catch block which reports it. | ||
It can also be used to break into the debugger when the assertion occurs to aid in debugging the cause. | ||
|
||
```ts | ||
import { onAssertionFailure } from "fluid-framework/alpha"; | ||
|
||
let firstAssertion: Error | undefined; | ||
|
||
onAssertionFailure((error: Error) => { | ||
const priorErrorNote = | ||
firstAssertion === undefined | ||
? "Please report this bug." | ||
: `Might be caused due to prior error ${JSON.stringify(firstAssertion.message)} which should be investigated first.`; | ||
const message = `Encountered Bug in Fluid Framework: ${error.message}\n${priorErrorNote}\n${error.stack}`; | ||
console.error(message); | ||
|
||
debugger; | ||
firstAssertion ??= error; | ||
}); | ||
``` | ||
A new `@alpha` |
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
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
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
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
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 | ||
|
||
Vale.Spelling = NO | ||
|
||
Microsoft.Contractions = NO | ||
Microsoft.Passive = NO | ||
Microsoft.Semicolon = warning | ||
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 @@ | ||
shared tree | ||
tylerbutler marked this conversation as resolved.
Show resolved
Hide resolved
|
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.
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.