forked from palantir/tslint
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use default js-yaml schema (palantir#4350)
This will change yaml parser to use the default schema, which allows some additional Yaml types, see http://yaml.org/type/ Namely, this will allow the merge syntax, allowing users to define common rules and then merge them into the typescript and javascript rules. Note: To do this, the options passed to yaml.safeLoad have been removed since they are no longer required. The default safe schema is what we want, and the strict: true is not a valid option, since js-yaml removed it a while back, see here: nodeca/js-yaml@e6bac15
- Loading branch information
Showing
3 changed files
with
54 additions
and
7 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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
commonRules: &common | ||
rule-one: | ||
severity: error | ||
rule-two: | ||
- true | ||
- "common rule" | ||
jsRules: | ||
<<: *common | ||
rule-three: | ||
- true | ||
- "js rule" | ||
rules: | ||
<<: *common | ||
rule-one: | ||
severity: warning | ||
rule-three: | ||
- true | ||
- "ts rule" |
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