-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change the error levels of Vale style rules to pave the way for requiring the Vale linter. If a style rule has the `raw` scope, it is not currently possible to disable the rule within a document using HTML/MDX comments. Further, a rule with the `error` level causes Vale to exit with a nonzero error code if a page violates the rule. As a result, this change makes the following adjustments to the error levels of Vale style rules: - `error`: styles where we want to ensure consistency/correctness, and where it is possible to disable the style using comments. - `warning`: style rules that an author might need to ignore. This includes style rules with the `raw` scope, which cannot be disabled using comments. For some style rules, change the scope from `raw` to another scope that allows a docs author to disable the rule within a document using HTML/MDX-style comments.
- Loading branch information
Showing
7 changed files
with
10 additions
and
17 deletions.
There are no files selected for viewing
This file contains 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 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,8 +1,8 @@ | ||
extends: substitution | ||
message: "Incorrect example of a Teleport account URL. Use %s instead of %s." | ||
level: error | ||
scope: raw # So we can catch instances in code fences | ||
level: warning | ||
scope: | ||
- raw | ||
ignorecase: true | ||
swap: | ||
- 'https://(?!status|example)\w+.teleport\.sh': 'example.teleport.sh (or status.teleport.sh for the status page)' |
This file contains 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,13 +1,7 @@ | ||
extends: existence | ||
scope: | ||
# Using the raw scope so we can catch instances in TabItem labels. | ||
- raw | ||
message: '"%s" is no longer a recognized Teleport edition. Use "Teleport Enterprise (Self-Hosted)" or "Teleport Enterprise (Cloud)" instead. If the hosting type is not important in a given sentence, there is no need to specify it, and you can use "Teleport Enterprise".' | ||
level: error | ||
ignorecase: false | ||
ignorecase: true | ||
tokens: | ||
# Adding the pattern '[ \t]*\n?[ \t]*' between each word since we are using the raw | ||
# scope. This lets use catch violations that span two lines (i.e., that occupy | ||
# the same paragraph). | ||
- 'Teleport[ \t]*\n?[ \t]*Cloud' | ||
- 'Teleport[ \t]*\n?[ \t]*Enterprise[ \t]*\n?[ \t]*Cloud' | ||
- 'Teleport Enterprise Cloud' |
This file contains 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 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 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 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