Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
feat(typescript-estree): added allowInvalidAST option to not throw on invalid tokens#6247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
bradzacher merged 22 commits intotypescript-eslint:v6fromJoshuaKGoldberg:typescript-estree-throw-invalid-tokensMar 5, 2023
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes fromall commits
Commits
Show all changes
22 commits Select commitHold shift + click to select a range
34d3765
wip: throw on invalid tokens
JoshuaKGoldberg081bf03
Added option and tests
JoshuaKGoldberge2684df
More decorator checking
JoshuaKGoldberg6568522
A few more cases
JoshuaKGoldberg04a7f43
Merge branch 'v6'
JoshuaKGoldberg40cf6b2
Account for a few more cases
JoshuaKGoldberg789abc7
Moved tests to fixtures
JoshuaKGoldbergf1e39d2
Fix website build
JoshuaKGoldberg63d0af4
Merge branch 'v6'
JoshuaKGoldbergbaef9eb
Sort the typescript-estree parser argument
JoshuaKGoldbergbf34a86
Delete some files; rename the option
JoshuaKGoldbergd0d2825
Fixed unit test
JoshuaKGoldbergb947e88
Allowed eror fixtures to error
JoshuaKGoldberg52a3990
Merge branch 'v6'
JoshuaKGoldberg4aac264
Merge branch 'v6'
JoshuaKGoldbergc8000e4
Merge branch 'v6' into typescript-estree-throw-invalid-tokens
JoshuaKGoldbergbfd2fd8
Post-merge: standardized convert.ts throwing
JoshuaKGoldberg8121b2e
Removed erroneous function case, and now-invalid indent test case
JoshuaKGoldberg3ea47eb
Merge branch 'v6'
JoshuaKGoldberg142f644
Merge branch 'v6' into pr/JoshuaKGoldberg/6247
bradzacher13e0144
regen snapshots for latest v6
bradzacher7144e90
snaps
bradzacherFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
7 changes: 6 additions & 1 deletiondocs/architecture/TypeScript-ESTree.mdx
This file contains hidden or 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 |
---|---|---|
@@ -31,6 +31,12 @@ Parses the given string of code with the options provided and returns an ESTree- | ||
```ts | ||
interface ParseOptions { | ||
/** | ||
* Prevents the parser from throwing an error if it receives an invalid AST from TypeScript. | ||
* This case only usually occurs when attempting to lint invalid code. | ||
*/ | ||
allowInvalidAST?: boolean; | ||
bradzacher marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
/** | ||
* create a top-level comments array containing all comments | ||
*/ | ||
@@ -99,7 +105,6 @@ interface ParseOptions { | ||
const PARSE_DEFAULT_OPTIONS: ParseOptions = { | ||
comment: false, | ||
filePath: 'estree.ts', // or 'estree.tsx', if you pass jsx: true | ||
jsx: false, | ||
loc: false, | ||
1 change: 1 addition & 0 deletions...ast-spec/src/declaration/ClassDeclaration/fixtures/_error_/export-missing-name/fixture.ts
This file contains hidden or 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...ion/ClassDeclaration/fixtures/_error_/export-missing-name/snapshots/1-TSESTree-Error.shot
This file contains hidden or 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...ration/ClassDeclaration/fixtures/_error_/export-missing-name/snapshots/2-Babel-Error.shot
This file contains hidden or 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...on/ClassDeclaration/fixtures/_error_/export-missing-name/snapshots/3-Alignment-Error.shot
This file contains hidden or 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...n/ExportNamedDeclaration/fixtures/_error_/anonymous-class/snapshots/1-TSESTree-Error.shot
This file contains hidden or 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`] = ` | ||
"TSError | ||
> 1 | export class {} | ||
| ^ A class declaration without the 'default' modifier must have a name. | ||
2 |" | ||
`; |
2 changes: 1 addition & 1 deletion.../ExportNamedDeclaration/fixtures/_error_/anonymous-class/snapshots/3-Alignment-Error.shot
This file contains hidden or 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`] = `"Both errored"`; |
1 change: 1 addition & 0 deletionspackages/ast-spec/src/declaration/TSEnumDeclaration/fixtures/_error_/decorator/fixture.ts
This file contains hidden or 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.../declaration/TSEnumDeclaration/fixtures/_error_/decorator/snapshots/1-TSESTree-Error.shot
This file contains hidden or 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...src/declaration/TSEnumDeclaration/fixtures/_error_/decorator/snapshots/2-Babel-Error.shot
This file contains hidden or 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...declaration/TSEnumDeclaration/fixtures/_error_/decorator/snapshots/3-Alignment-Error.shot
This file contains hidden or 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...ges/ast-spec/src/declaration/TSInterfaceDeclaration/fixtures/_error_/decorator/fixture.ts
This file contains hidden or 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...aration/TSInterfaceDeclaration/fixtures/_error_/decorator/snapshots/1-TSESTree-Error.shot
This file contains hidden or 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...eclaration/TSInterfaceDeclaration/fixtures/_error_/decorator/snapshots/2-Babel-Error.shot
This file contains hidden or 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...ration/TSInterfaceDeclaration/fixtures/_error_/decorator/snapshots/3-Alignment-Error.shot
This file contains hidden or 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...ges/ast-spec/src/declaration/TSTypeAliasDeclaration/fixtures/_error_/decorator/fixture.ts
This file contains hidden or 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...aration/TSTypeAliasDeclaration/fixtures/_error_/decorator/snapshots/1-TSESTree-Error.shot
This file contains hidden or 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...eclaration/TSTypeAliasDeclaration/fixtures/_error_/decorator/snapshots/2-Babel-Error.shot
This file contains hidden or 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...ration/TSTypeAliasDeclaration/fixtures/_error_/decorator/snapshots/3-Alignment-Error.shot
This file contains hidden or 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 deletionspackages/ast-spec/src/declaration/VariableDeclaration/fixtures/_error_/decorator/fixture.ts
This file contains hidden or 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...eclaration/VariableDeclaration/fixtures/_error_/decorator/snapshots/1-TSESTree-Error.shot
This file contains hidden or 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...c/declaration/VariableDeclaration/fixtures/_error_/decorator/snapshots/2-Babel-Error.shot
This file contains hidden or 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...claration/VariableDeclaration/fixtures/_error_/decorator/snapshots/3-Alignment-Error.shot
This file contains hidden or 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...ableDeclaration/fixtures/_error_/missing-id-without-value/snapshots/1-TSESTree-Error.shot
This file contains hidden or 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`] = ` | ||
"TSError | ||
> 1 | const; | ||
| ^ A variable declaration list must have at least one variable declarator. | ||
2 |" | ||
`; |
2 changes: 1 addition & 1 deletion...bleDeclaration/fixtures/_error_/missing-id-without-value/snapshots/3-Alignment-Error.shot
This file contains hidden or 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`] = `"Both errored"`; |
1 change: 1 addition & 0 deletions...ges/ast-spec/src/declaration/VariableDeclaration/fixtures/_error_/no-variables/fixture.ts
This file contains hidden or 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...aration/VariableDeclaration/fixtures/_error_/no-variables/snapshots/1-TSESTree-Error.shot
This file contains hidden or 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...eclaration/VariableDeclaration/fixtures/_error_/no-variables/snapshots/2-Babel-Error.shot
This file contains hidden or 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...ration/VariableDeclaration/fixtures/_error_/no-variables/snapshots/3-Alignment-Error.shot
This file contains hidden or 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...orRecovery/fixtures/_error_/decorator-on-enum-declaration/snapshots/1-TSESTree-Error.shot
This file contains hidden or 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`] = ` | ||
"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...rRecovery/fixtures/_error_/decorator-on-enum-declaration/snapshots/3-Alignment-Error.shot
This file contains hidden or 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`] = `"Both errored"`; |
9 changes: 8 additions & 1 deletion...overy/fixtures/_error_/decorator-on-interface-declaration/snapshots/1-TSESTree-Error.shot
This file contains hidden or 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`] = ` | ||
"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...very/fixtures/_error_/decorator-on-interface-declaration/snapshots/3-Alignment-Error.shot
This file contains hidden or 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`] = `"Both errored"`; |
9 changes: 8 additions & 1 deletion...ures/errorRecovery/fixtures/_error_/decorator-on-variable/snapshots/1-TSESTree-Error.shot
This file contains hidden or 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`] = ` | ||
"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...res/errorRecovery/fixtures/_error_/decorator-on-variable/snapshots/3-Alignment-Error.shot
This file contains hidden or 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`] = `"Both errored"`; |
8 changes: 7 additions & 1 deletion...legacy-fixtures/errorRecovery/fixtures/_error_/solo-const/snapshots/1-TSESTree-Error.shot
This file contains hidden or 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`] = ` | ||
"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...egacy-fixtures/errorRecovery/fixtures/_error_/solo-const/snapshots/3-Alignment-Error.shot
This file contains hidden or 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`] = `"Both errored"`; |
3 changes: 3 additions & 0 deletionspackages/ast-spec/src/statement/ThrowStatement/fixtures/_error_/missing-argument/fixture.ts
This file contains hidden or 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...tatement/ThrowStatement/fixtures/_error_/missing-argument/snapshots/1-TSESTree-Error.shot
This file contains hidden or 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...c/statement/ThrowStatement/fixtures/_error_/missing-argument/snapshots/2-Babel-Error.shot
This file contains hidden or 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...atement/ThrowStatement/fixtures/_error_/missing-argument/snapshots/3-Alignment-Error.shot
This file contains hidden or 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"`; |
6 changes: 0 additions & 6 deletionspackages/ast-spec/tests/fixtures-with-differences-errors.shot
This file contains hidden or 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 deletionspackages/ast-spec/tests/util/parsers/typescript-estree.ts
This file contains hidden or 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
6 changes: 6 additions & 0 deletionspackages/ast-spec/typings/global.d.ts
This file contains hidden or 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
2 changes: 0 additions & 2 deletionspackages/eslint-plugin/tests/rules/indent/indent.test.ts
This file contains hidden or 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
2 changes: 0 additions & 2 deletionspackages/parser/tests/lib/parser.ts
This file contains hidden or 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 deletionspackages/typescript-estree/src/ast-converter.ts
This file contains hidden or 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.
Uh oh!
There was an error while loading.Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.