forked from Shopify/theme-tools
-
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.
Improve YAML parsing error message for unresolve alias (Shopify#297)
Fixes Shopify#276
- Loading branch information
1 parent
2a3bca1
commit 402f151
Showing
8 changed files
with
561 additions
and
376 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
'@shopify/theme-check-node': patch | ||
--- | ||
|
||
Improve YAML parsing error messages caused by YAML aliases | ||
|
||
```yaml | ||
ignore: | ||
# this causes an error because * at the start of a statement in YAML | ||
# is used for aliases to anchors such as `&.code-workspaces` | ||
- *.code-workspaces | ||
|
||
# what you want is this | ||
- '*.code-worksapces' | ||
``` | ||
It’s a pretty obscure error for the non-initiated, so now we’ll | ||
instead throw an error like this: | ||
``` | ||
YAML parsing error: Unresolved alias *.code-workspaces | ||
Did you forget to wrap it in quotes? '*.code-workspaces' | ||
``` |
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
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
Oops, something went wrong.