Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(typescript-estree): check for illegal decorators on function dec…
…larations (#6590)
- Loading branch information
Showing
6 changed files
with
13 additions
and
27 deletions.
There are no files selected for viewing
10 changes: 9 additions & 1 deletion
10
...ures/errorRecovery/fixtures/_error_/decorator-on-function/snapshots/1-TSESTree-Error.shot
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,3 +1,11 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`AST Fixtures legacy-fixtures errorRecovery _error_ decorator-on-function TSESTree - Error 1`] = `"NO ERROR"`; | ||
exports[`AST Fixtures legacy-fixtures errorRecovery _error_ decorator-on-function TSESTree - Error 1`] = ` | ||
"TSError | ||
1 | // TODO: This fixture might be too large, and if so should be split up. | ||
2 | | ||
> 3 | @dec | ||
| ^^^^ Decorators are not valid here. | ||
4 | function b(){} | ||
5 |" | ||
`; |
2 changes: 1 addition & 1 deletion
2
...res/errorRecovery/fixtures/_error_/decorator-on-function/snapshots/3-Alignment-Error.shot
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,3 +1,3 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`AST Fixtures legacy-fixtures errorRecovery _error_ decorator-on-function Error Alignment 1`] = `"Babel errored but TSESTree didn't"`; | ||
exports[`AST Fixtures legacy-fixtures errorRecovery _error_ decorator-on-function Error Alignment 1`] = `"Both errored"`; |
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