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): added allowInvalidAST option to not throw on…
… invalid tokens (#6247)
- Loading branch information
1 parent
f98afd2
commit a3b177d
Showing
56 changed files
with
307 additions
and
1,287 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
1 change: 1 addition & 0 deletions
1
...ast-spec/src/declaration/ClassDeclaration/fixtures/_error_/export-missing-name/fixture.ts
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 @@ | ||
export class { } |
8 changes: 8 additions & 0 deletions
8
...ion/ClassDeclaration/fixtures/_error_/export-missing-name/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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`AST Fixtures declaration ClassDeclaration _error_ export-missing-name TSESTree - Error 1`] = ` | ||
"TSError | ||
> 1 | export class { } | ||
| ^ A class declaration without the 'default' modifier must have a name. | ||
2 |" | ||
`; |
3 changes: 3 additions & 0 deletions
3
...ration/ClassDeclaration/fixtures/_error_/export-missing-name/snapshots/2-Babel-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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`AST Fixtures declaration ClassDeclaration _error_ export-missing-name Babel - Error 1`] = `[SyntaxError: A class name is required. (1:13)]`; |
3 changes: 3 additions & 0 deletions
3
...on/ClassDeclaration/fixtures/_error_/export-missing-name/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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`AST Fixtures declaration ClassDeclaration _error_ export-missing-name Error Alignment 1`] = `"Both errored"`; |
7 changes: 6 additions & 1 deletion
7
...n/ExportNamedDeclaration/fixtures/_error_/anonymous-class/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,8 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`AST Fixtures declaration ExportNamedDeclaration _error_ anonymous-class TSESTree - Error 1`] = `"NO ERROR"`; | ||
exports[`AST Fixtures declaration ExportNamedDeclaration _error_ anonymous-class TSESTree - Error 1`] = ` | ||
"TSError | ||
> 1 | export class {} | ||
| ^ A class declaration without the 'default' modifier must have a name. | ||
2 |" | ||
`; |
2 changes: 1 addition & 1 deletion
2
.../ExportNamedDeclaration/fixtures/_error_/anonymous-class/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 declaration ExportNamedDeclaration _error_ anonymous-class Error Alignment 1`] = `"Babel errored but TSESTree didn't"`; | ||
exports[`AST Fixtures declaration ExportNamedDeclaration _error_ anonymous-class Error Alignment 1`] = `"Both errored"`; |
1 change: 1 addition & 0 deletions
1
packages/ast-spec/src/declaration/TSEnumDeclaration/fixtures/_error_/decorator/fixture.ts
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 @@ | ||
@decl enum Test {} |
8 changes: 8 additions & 0 deletions
8
.../declaration/TSEnumDeclaration/fixtures/_error_/decorator/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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`AST Fixtures declaration TSEnumDeclaration _error_ decorator TSESTree - Error 1`] = ` | ||
"TSError | ||
> 1 | @decl enum Test {} | ||
| ^ Decorators are not valid here. | ||
2 |" | ||
`; |
3 changes: 3 additions & 0 deletions
3
...src/declaration/TSEnumDeclaration/fixtures/_error_/decorator/snapshots/2-Babel-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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`AST Fixtures declaration TSEnumDeclaration _error_ decorator Babel - Error 1`] = `[SyntaxError: Leading decorators must be attached to a class declaration. (1:6)]`; |
3 changes: 3 additions & 0 deletions
3
...declaration/TSEnumDeclaration/fixtures/_error_/decorator/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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`AST Fixtures declaration TSEnumDeclaration _error_ decorator Error Alignment 1`] = `"Both errored"`; |
1 change: 1 addition & 0 deletions
1
...ges/ast-spec/src/declaration/TSInterfaceDeclaration/fixtures/_error_/decorator/fixture.ts
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 @@ | ||
@decl interface Test {} |
8 changes: 8 additions & 0 deletions
8
...aration/TSInterfaceDeclaration/fixtures/_error_/decorator/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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`AST Fixtures declaration TSInterfaceDeclaration _error_ decorator TSESTree - Error 1`] = ` | ||
"TSError | ||
> 1 | @decl interface Test {} | ||
| ^ Decorators are not valid here. | ||
2 |" | ||
`; |
3 changes: 3 additions & 0 deletions
3
...eclaration/TSInterfaceDeclaration/fixtures/_error_/decorator/snapshots/2-Babel-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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`AST Fixtures declaration TSInterfaceDeclaration _error_ decorator Babel - Error 1`] = `[SyntaxError: Leading decorators must be attached to a class declaration. (1:6)]`; |
3 changes: 3 additions & 0 deletions
3
...ration/TSInterfaceDeclaration/fixtures/_error_/decorator/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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`AST Fixtures declaration TSInterfaceDeclaration _error_ decorator Error Alignment 1`] = `"Both errored"`; |
1 change: 1 addition & 0 deletions
1
...ges/ast-spec/src/declaration/TSTypeAliasDeclaration/fixtures/_error_/decorator/fixture.ts
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 @@ | ||
@decl type Test = {}; |
8 changes: 8 additions & 0 deletions
8
...aration/TSTypeAliasDeclaration/fixtures/_error_/decorator/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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`AST Fixtures declaration TSTypeAliasDeclaration _error_ decorator TSESTree - Error 1`] = ` | ||
"TSError | ||
> 1 | @decl type Test = {}; | ||
| ^ Decorators are not valid here. | ||
2 |" | ||
`; |
3 changes: 3 additions & 0 deletions
3
...eclaration/TSTypeAliasDeclaration/fixtures/_error_/decorator/snapshots/2-Babel-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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`AST Fixtures declaration TSTypeAliasDeclaration _error_ decorator Babel - Error 1`] = `[SyntaxError: Leading decorators must be attached to a class declaration. (1:6)]`; |
3 changes: 3 additions & 0 deletions
3
...ration/TSTypeAliasDeclaration/fixtures/_error_/decorator/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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`AST Fixtures declaration TSTypeAliasDeclaration _error_ decorator Error Alignment 1`] = `"Both errored"`; |
1 change: 1 addition & 0 deletions
1
packages/ast-spec/src/declaration/VariableDeclaration/fixtures/_error_/decorator/fixture.ts
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 @@ | ||
@decl type Test = {}; |
8 changes: 8 additions & 0 deletions
8
...eclaration/VariableDeclaration/fixtures/_error_/decorator/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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`AST Fixtures declaration VariableDeclaration _error_ decorator TSESTree - Error 1`] = ` | ||
"TSError | ||
> 1 | @decl type Test = {}; | ||
| ^ Decorators are not valid here. | ||
2 |" | ||
`; |
3 changes: 3 additions & 0 deletions
3
...c/declaration/VariableDeclaration/fixtures/_error_/decorator/snapshots/2-Babel-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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`AST Fixtures declaration VariableDeclaration _error_ decorator Babel - Error 1`] = `[SyntaxError: Leading decorators must be attached to a class declaration. (1:6)]`; |
3 changes: 3 additions & 0 deletions
3
...claration/VariableDeclaration/fixtures/_error_/decorator/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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`AST Fixtures declaration VariableDeclaration _error_ decorator Error Alignment 1`] = `"Both errored"`; |
7 changes: 6 additions & 1 deletion
7
...ableDeclaration/fixtures/_error_/missing-id-without-value/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,8 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`AST Fixtures declaration VariableDeclaration _error_ missing-id-without-value TSESTree - Error 1`] = `"NO ERROR"`; | ||
exports[`AST Fixtures declaration VariableDeclaration _error_ missing-id-without-value TSESTree - Error 1`] = ` | ||
"TSError | ||
> 1 | const; | ||
| ^ A variable declaration list must have at least one variable declarator. | ||
2 |" | ||
`; |
2 changes: 1 addition & 1 deletion
2
...bleDeclaration/fixtures/_error_/missing-id-without-value/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 declaration VariableDeclaration _error_ missing-id-without-value Error Alignment 1`] = `"Babel errored but TSESTree didn't"`; | ||
exports[`AST Fixtures declaration VariableDeclaration _error_ missing-id-without-value Error Alignment 1`] = `"Both errored"`; |
1 change: 1 addition & 0 deletions
1
...ges/ast-spec/src/declaration/VariableDeclaration/fixtures/_error_/no-variables/fixture.ts
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 @@ | ||
const; |
8 changes: 8 additions & 0 deletions
8
...aration/VariableDeclaration/fixtures/_error_/no-variables/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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`AST Fixtures declaration VariableDeclaration _error_ no-variables TSESTree - Error 1`] = ` | ||
"TSError | ||
> 1 | const; | ||
| ^ A variable declaration list must have at least one variable declarator. | ||
2 |" | ||
`; |
3 changes: 3 additions & 0 deletions
3
...eclaration/VariableDeclaration/fixtures/_error_/no-variables/snapshots/2-Babel-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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`AST Fixtures declaration VariableDeclaration _error_ no-variables Babel - Error 1`] = `[SyntaxError: Unexpected token (1:5)]`; |
3 changes: 3 additions & 0 deletions
3
...ration/VariableDeclaration/fixtures/_error_/no-variables/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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`AST Fixtures declaration VariableDeclaration _error_ no-variables Error Alignment 1`] = `"Both errored"`; |
8 changes: 7 additions & 1 deletion
8
...orRecovery/fixtures/_error_/decorator-on-enum-declaration/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,9 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`AST Fixtures legacy-fixtures errorRecovery _error_ decorator-on-enum-declaration TSESTree - Error 1`] = `"NO ERROR"`; | ||
exports[`AST Fixtures legacy-fixtures errorRecovery _error_ decorator-on-enum-declaration TSESTree - Error 1`] = ` | ||
"TSError | ||
> 1 | // TODO: This fixture might be too large, and if so should be split up. | ||
| ^ Decorators are not valid here. | ||
2 | | ||
3 | @dec enum E {}" | ||
`; |
2 changes: 1 addition & 1 deletion
2
...rRecovery/fixtures/_error_/decorator-on-enum-declaration/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-enum-declaration Error Alignment 1`] = `"Babel errored but TSESTree didn't"`; | ||
exports[`AST Fixtures legacy-fixtures errorRecovery _error_ decorator-on-enum-declaration Error Alignment 1`] = `"Both errored"`; |
9 changes: 8 additions & 1 deletion
9
...overy/fixtures/_error_/decorator-on-interface-declaration/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,10 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`AST Fixtures legacy-fixtures errorRecovery _error_ decorator-on-interface-declaration TSESTree - Error 1`] = `"NO ERROR"`; | ||
exports[`AST Fixtures legacy-fixtures errorRecovery _error_ decorator-on-interface-declaration TSESTree - Error 1`] = ` | ||
"TSError | ||
> 1 | // TODO: This fixture might be too large, and if so should be split up. | ||
| ^ Decorators are not valid here. | ||
2 | | ||
3 | @deco() | ||
4 | interface M {}" | ||
`; |
2 changes: 1 addition & 1 deletion
2
...very/fixtures/_error_/decorator-on-interface-declaration/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-interface-declaration Error Alignment 1`] = `"Babel errored but TSESTree didn't"`; | ||
exports[`AST Fixtures legacy-fixtures errorRecovery _error_ decorator-on-interface-declaration Error Alignment 1`] = `"Both errored"`; |
9 changes: 8 additions & 1 deletion
9
...ures/errorRecovery/fixtures/_error_/decorator-on-variable/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,10 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`AST Fixtures legacy-fixtures errorRecovery _error_ decorator-on-variable TSESTree - Error 1`] = `"NO ERROR"`; | ||
exports[`AST Fixtures legacy-fixtures errorRecovery _error_ decorator-on-variable TSESTree - Error 1`] = ` | ||
"TSError | ||
> 1 | // TODO: This fixture might be too large, and if so should be split up. | ||
| ^ Decorators are not valid here. | ||
2 | | ||
3 | @deco() | ||
4 | const a = 1" | ||
`; |
2 changes: 1 addition & 1 deletion
2
...res/errorRecovery/fixtures/_error_/decorator-on-variable/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-variable Error Alignment 1`] = `"Babel errored but TSESTree didn't"`; | ||
exports[`AST Fixtures legacy-fixtures errorRecovery _error_ decorator-on-variable Error Alignment 1`] = `"Both errored"`; |
8 changes: 7 additions & 1 deletion
8
...legacy-fixtures/errorRecovery/fixtures/_error_/solo-const/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,9 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`AST Fixtures legacy-fixtures errorRecovery _error_ solo-const TSESTree - Error 1`] = `"NO ERROR"`; | ||
exports[`AST Fixtures legacy-fixtures errorRecovery _error_ solo-const TSESTree - Error 1`] = ` | ||
"TSError | ||
> 1 | // TODO: This fixture might be too large, and if so should be split up. | ||
| ^ A variable declaration list must have at least one variable declarator. | ||
2 | | ||
3 | const" | ||
`; |
2 changes: 1 addition & 1 deletion
2
...egacy-fixtures/errorRecovery/fixtures/_error_/solo-const/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_ solo-const Error Alignment 1`] = `"Babel errored but TSESTree didn't"`; | ||
exports[`AST Fixtures legacy-fixtures errorRecovery _error_ solo-const Error Alignment 1`] = `"Both errored"`; |
3 changes: 3 additions & 0 deletions
3
packages/ast-spec/src/statement/ThrowStatement/fixtures/_error_/missing-argument/fixture.ts
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,3 @@ | ||
{ | ||
throw | ||
} |
10 changes: 10 additions & 0 deletions
10
...tatement/ThrowStatement/fixtures/_error_/missing-argument/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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`AST Fixtures statement ThrowStatement _error_ missing-argument TSESTree - Error 1`] = ` | ||
"TSError | ||
> 1 | { | ||
| ^ A throw statement must throw an expression. | ||
2 | throw | ||
3 | } | ||
4 |" | ||
`; |
3 changes: 3 additions & 0 deletions
3
...c/statement/ThrowStatement/fixtures/_error_/missing-argument/snapshots/2-Babel-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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`AST Fixtures statement ThrowStatement _error_ missing-argument Babel - Error 1`] = `[SyntaxError: Illegal newline after throw. (2:9)]`; |
3 changes: 3 additions & 0 deletions
3
...atement/ThrowStatement/fixtures/_error_/missing-argument/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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`AST Fixtures statement ThrowStatement _error_ missing-argument 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
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.