diff --git a/packages/typescript-estree/src/node-utils.ts b/packages/typescript-estree/src/node-utils.ts index 3467a8263c4e..eb88660fdfa3 100644 --- a/packages/typescript-estree/src/node-utils.ts +++ b/packages/typescript-estree/src/node-utils.ts @@ -649,16 +649,26 @@ export function convertTokens(ast: ts.SourceFile): TSESTree.Token[] { return result; } -export interface TSError { - index: number; - lineNumber: number; - column: number; - message: string; +export class TSError extends Error { + constructor( + message: string, + public readonly fileName: string, + public readonly index: number, + public readonly lineNumber: number, + public readonly column: number, + ) { + super(message); + Object.defineProperty(this, 'name', { + value: new.target.name, + enumerable: false, + configurable: true, + }); + } } /** * @param ast the AST object - * @param start the index at which the error starts + * @param start the index at which the error starts * @param message the error message * @returns converted error object */ @@ -668,12 +678,7 @@ export function createError( message: string, ): TSError { const loc = ast.getLineAndCharacterOfPosition(start); - return { - index: start, - lineNumber: loc.line + 1, - column: loc.character, - message, - }; + return new TSError(message, ast.fileName, start, loc.line + 1, loc.character); } /** diff --git a/packages/typescript-estree/tests/ast-fixtures.test.ts b/packages/typescript-estree/tests/ast-fixtures.test.ts index 339378a6883c..613595e4f8aa 100644 --- a/packages/typescript-estree/tests/ast-fixtures.test.ts +++ b/packages/typescript-estree/tests/ast-fixtures.test.ts @@ -1,10 +1,13 @@ import fs from 'fs'; import glob from 'glob'; -import 'jest-specific-snapshot'; +import { addSerializer } from 'jest-specific-snapshot'; import makeDir from 'make-dir'; import path from 'path'; import { parseAndGenerateServices } from '../src/parser'; import { isJSXFileType } from '../tools/test-utils'; +import { serializer } from '../tools/tserror-serializer'; + +addSerializer(serializer); // Assign a segment set to this variable to limit the test to only this segment // This is super helpful if you need to debug why a specific fixture isn't producing the correct output diff --git a/packages/typescript-estree/tests/lib/__snapshots__/semantic-diagnostics-enabled.test.ts.snap b/packages/typescript-estree/tests/lib/__snapshots__/semantic-diagnostics-enabled.test.ts.snap index 2aa60bf249ea..e5e4d1e16bf5 100644 --- a/packages/typescript-estree/tests/lib/__snapshots__/semantic-diagnostics-enabled.test.ts.snap +++ b/packages/typescript-estree/tests/lib/__snapshots__/semantic-diagnostics-enabled.test.ts.snap @@ -81,7 +81,7 @@ exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" e exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-dup-params.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-missing-paren.src 1`] = ` -Object { +TSError { "column": 9, "index": 9, "lineNumber": 1, @@ -90,7 +90,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-not-arrow.src 1`] = ` -Object { +TSError { "column": 26, "index": 26, "lineNumber": 1, @@ -99,7 +99,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-numeric-param.src 1`] = ` -Object { +TSError { "column": 5, "index": 5, "lineNumber": 1, @@ -108,7 +108,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-numeric-param-multi.src 1`] = ` -Object { +TSError { "column": 9, "index": 9, "lineNumber": 1, @@ -117,7 +117,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-reverse-arrow.src 1`] = ` -Object { +TSError { "column": 1, "index": 1, "lineNumber": 1, @@ -134,7 +134,7 @@ exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" e exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-strict-eval-return.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-strict-octal.src 1`] = ` -Object { +TSError { "column": 21, "index": 21, "lineNumber": 1, @@ -153,7 +153,7 @@ exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" e exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-strict-param-no-paren-eval.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-two-lines.src 1`] = ` -Object { +TSError { "column": 1, "index": 12, "lineNumber": 2, @@ -162,7 +162,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-wrapped-param.src 1`] = ` -Object { +TSError { "column": 6, "index": 6, "lineNumber": 1, @@ -229,7 +229,7 @@ exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" e exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/bigIntLiterals/octal.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/binaryLiterals/invalid.src 1`] = ` -Object { +TSError { "column": 4, "index": 4, "lineNumber": 1, @@ -302,7 +302,7 @@ exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" e exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-with-constructor-with-space.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-with-no-body.src 1`] = ` -Object { +TSError { "column": 0, "index": 10, "lineNumber": 2, @@ -323,7 +323,7 @@ exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" e exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/empty-literal-derived-class.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/invalid-class-declaration.src 1`] = ` -Object { +TSError { "column": 0, "index": 0, "lineNumber": 1, @@ -332,7 +332,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/invalid-class-setter-declaration.src 1`] = ` -Object { +TSError { "column": 14, "index": 14, "lineNumber": 1, @@ -341,7 +341,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/invalid-class-two-super-classes.src 1`] = ` -Object { +TSError { "column": 18, "index": 18, "lineNumber": 1, @@ -440,7 +440,7 @@ exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" e exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/destructured-object-catch.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/invalid-defaults-object-assign.src 1`] = ` -Object { +TSError { "column": 0, "index": 0, "lineNumber": 1, @@ -525,7 +525,7 @@ exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" e exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-spread/destructuring-param.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-spread/error-complex-destructured-spread-first.src 1`] = ` -Object { +TSError { "column": 1, "index": 1, "lineNumber": 1, @@ -534,7 +534,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-spread/invalid-not-final-array-empty.src 1`] = ` -Object { +TSError { "column": 5, "index": 5, "lineNumber": 1, @@ -545,7 +545,7 @@ Object { exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-spread/multi-destructured.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-spread/not-final-array.src 1`] = ` -Object { +TSError { "column": 1, "index": 1, "lineNumber": 1, @@ -588,7 +588,7 @@ exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" e exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalDynamicImport/dynamic-import.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalDynamicImport/error-dynamic-import-params.src 1`] = ` -Object { +TSError { "column": 7, "index": 7, "lineNumber": 1, @@ -603,7 +603,7 @@ exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" e exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalObjectRestSpread/function-parameter-object-spread.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalObjectRestSpread/invalid-rest.src 1`] = ` -Object { +TSError { "column": 18, "index": 18, "lineNumber": 1, @@ -612,7 +612,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalObjectRestSpread/invalid-rest-trailing-comma.src 1`] = ` -Object { +TSError { "column": 16, "index": 16, "lineNumber": 1, @@ -663,7 +663,7 @@ exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" e exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forIn/for-in-destruction-object.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forIn/for-in-object.src 1`] = ` -Object { +TSError { "column": 14, "index": 14, "lineNumber": 1, @@ -694,7 +694,7 @@ exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" e exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forOf/for-of-object.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forOf/for-of-with-function-initializer.src 1`] = ` -Object { +TSError { "column": 9, "index": 9, "lineNumber": 1, @@ -743,7 +743,7 @@ exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" e exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/globalReturn/return-true.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/hexLiterals/invalid.src 1`] = ` -Object { +TSError { "column": 4, "index": 4, "lineNumber": 1, @@ -864,7 +864,7 @@ exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" e exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-class.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-export-batch-missing-from-clause.src 1`] = ` -Object { +TSError { "column": 0, "index": 9, "lineNumber": 2, @@ -873,7 +873,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-export-batch-token.src 1`] = ` -Object { +TSError { "column": 9, "index": 9, "lineNumber": 1, @@ -882,7 +882,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-export-default.src 1`] = ` -Object { +TSError { "column": 20, "index": 20, "lineNumber": 1, @@ -891,7 +891,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-export-default-equal.src 1`] = ` -Object { +TSError { "column": 15, "index": 15, "lineNumber": 1, @@ -900,7 +900,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-export-default-token.src 1`] = ` -Object { +TSError { "column": 17, "index": 17, "lineNumber": 1, @@ -911,7 +911,7 @@ Object { exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-export-named-default.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-export-named-extra-comma.src 1`] = ` -Object { +TSError { "column": 16, "index": 16, "lineNumber": 1, @@ -920,7 +920,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-export-named-middle-comma.src 1`] = ` -Object { +TSError { "column": 12, "index": 12, "lineNumber": 1, @@ -929,7 +929,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-default.src 1`] = ` -Object { +TSError { "column": 7, "index": 7, "lineNumber": 1, @@ -938,7 +938,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-default-after-named.src 1`] = ` -Object { +TSError { "column": 12, "index": 12, "lineNumber": 1, @@ -947,7 +947,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-default-after-named-after-default.src 1`] = ` -Object { +TSError { "column": 17, "index": 17, "lineNumber": 1, @@ -956,7 +956,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-default-missing-module-specifier.src 1`] = ` -Object { +TSError { "column": 0, "index": 11, "lineNumber": 2, @@ -965,7 +965,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-default-module-specifier.src 1`] = ` -Object { +TSError { "column": 16, "index": 16, "lineNumber": 1, @@ -974,7 +974,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-missing-module-specifier.src 1`] = ` -Object { +TSError { "column": 0, "index": 20, "lineNumber": 2, @@ -983,7 +983,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-module-specifier.src 1`] = ` -Object { +TSError { "column": 18, "index": 18, "lineNumber": 1, @@ -992,7 +992,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-named-after-named.src 1`] = ` -Object { +TSError { "column": 12, "index": 12, "lineNumber": 1, @@ -1001,7 +1001,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-named-after-namespace.src 1`] = ` -Object { +TSError { "column": 15, "index": 15, "lineNumber": 1, @@ -1010,7 +1010,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-named-as-missing-from.src 1`] = ` -Object { +TSError { "column": 0, "index": 24, "lineNumber": 2, @@ -1019,7 +1019,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-named-extra-comma.src 1`] = ` -Object { +TSError { "column": 16, "index": 16, "lineNumber": 1, @@ -1028,7 +1028,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-named-middle-comma.src 1`] = ` -Object { +TSError { "column": 12, "index": 12, "lineNumber": 1, @@ -1037,7 +1037,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-namespace-after-named.src 1`] = ` -Object { +TSError { "column": 12, "index": 12, "lineNumber": 1, @@ -1046,7 +1046,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-namespace-missing-as.src 1`] = ` -Object { +TSError { "column": 9, "index": 9, "lineNumber": 1, @@ -1055,7 +1055,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/newTarget/invalid-new-target.src 1`] = ` -Object { +TSError { "column": 8, "index": 8, "lineNumber": 1, @@ -1064,7 +1064,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/newTarget/invalid-unknown-property.src 1`] = ` -Object { +TSError { "column": 25, "index": 25, "lineNumber": 1, @@ -1087,7 +1087,7 @@ exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" e exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralComputedProperties/computed-variable-property.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralComputedProperties/invalid-computed-variable-property.src 1`] = ` -Object { +TSError { "column": 0, "index": 20, "lineNumber": 3, @@ -1096,7 +1096,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralComputedProperties/invalid-standalone-computed-variable-property.src 1`] = ` -Object { +TSError { "column": 5, "index": 5, "lineNumber": 1, @@ -1111,7 +1111,7 @@ exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" e exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralComputedProperties/standalone-expression-with-method.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralDuplicateProperties/error-proto-property.src 1`] = ` -Object { +TSError { "column": 1, "index": 62, "lineNumber": 7, @@ -1122,7 +1122,7 @@ Object { exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralDuplicateProperties/error-proto-string-property.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralDuplicateProperties/strict-duplicate-properties.src 1`] = ` -Object { +TSError { "column": 1, "index": 39, "lineNumber": 5, @@ -1133,7 +1133,7 @@ Object { exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralDuplicateProperties/strict-duplicate-string-properties.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralShorthandMethods/invalid-method-no-braces.src 1`] = ` -Object { +TSError { "column": 13, "index": 19, "lineNumber": 2, @@ -1158,7 +1158,7 @@ exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" e exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralShorthandProperties/shorthand-properties.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/octalLiterals/invalid.src 1`] = ` -Object { +TSError { "column": 4, "index": 4, "lineNumber": 1, @@ -1167,7 +1167,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/octalLiterals/legacy.src 1`] = ` -Object { +TSError { "column": 0, "index": 0, "lineNumber": 1, @@ -1198,7 +1198,7 @@ exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" e exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/restParams/class-method.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/restParams/error-no-default.src 1`] = ` -Object { +TSError { "column": 17, "index": 17, "lineNumber": 1, @@ -1207,7 +1207,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/restParams/error-not-last.src 1`] = ` -Object { +TSError { "column": 14, "index": 14, "lineNumber": 1, @@ -1240,7 +1240,7 @@ exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" e exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/spread/complex-spread.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/spread/error-invalid-if.src 1`] = ` -Object { +TSError { "column": 6, "index": 6, "lineNumber": 1, @@ -1249,7 +1249,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/spread/error-invalid-sequence.src 1`] = ` -Object { +TSError { "column": 4, "index": 4, "lineNumber": 1, @@ -1288,7 +1288,7 @@ exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" e exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/unicodeCodePointEscapes/ignored.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/unicodeCodePointEscapes/invalid-empty-escape.src 1`] = ` -Object { +TSError { "column": 4, "index": 4, "lineNumber": 1, @@ -1297,7 +1297,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/unicodeCodePointEscapes/invalid-too-large-escape.src 1`] = ` -Object { +TSError { "column": 10, "index": 10, "lineNumber": 1, @@ -1316,7 +1316,7 @@ exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" e exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/embedded-invalid-js-identifier.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/embedded-tags.src 1`] = ` -Object { +TSError { "column": 16, "index": 16, "lineNumber": 1, @@ -1335,7 +1335,7 @@ exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" e exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/escape-patters-multi.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-attribute.src 1`] = ` -Object { +TSError { "column": 5, "index": 5, "lineNumber": 1, @@ -1344,7 +1344,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-attribute-missing-equals.src 1`] = ` -Object { +TSError { "column": 14, "index": 14, "lineNumber": 1, @@ -1353,7 +1353,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-broken-tag.src 1`] = ` -Object { +TSError { "column": 12, "index": 12, "lineNumber": 1, @@ -1362,7 +1362,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-computed-end-tag-name.src 1`] = ` -Object { +TSError { "column": 2, "index": 2, "lineNumber": 1, @@ -1371,7 +1371,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-computed-string-end-tag-name.src 1`] = ` -Object { +TSError { "column": 2, "index": 2, "lineNumber": 1, @@ -1380,7 +1380,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-embedded-expression.src 1`] = ` -Object { +TSError { "column": 9, "index": 9, "lineNumber": 1, @@ -1389,7 +1389,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-leading-dot-tag-name.src 1`] = ` -Object { +TSError { "column": 0, "index": 0, "lineNumber": 1, @@ -1398,7 +1398,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-matching-placeholder-in-closing-tag.src 1`] = ` -Object { +TSError { "column": 27, "index": 27, "lineNumber": 1, @@ -1407,7 +1407,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-mismatched-closing-tag.src 1`] = ` -Object { +TSError { "column": 3, "index": 3, "lineNumber": 1, @@ -1416,7 +1416,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-mismatched-closing-tags.src 1`] = ` -Object { +TSError { "column": 1, "index": 1, "lineNumber": 1, @@ -1425,7 +1425,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-mismatched-dot-tag-name.src 1`] = ` -Object { +TSError { "column": 7, "index": 7, "lineNumber": 1, @@ -1434,7 +1434,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-mismatched-namespace-tag.src 1`] = ` -Object { +TSError { "column": 2, "index": 2, "lineNumber": 1, @@ -1443,7 +1443,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-missing-closing-tag.src 1`] = ` -Object { +TSError { "column": 1, "index": 1, "lineNumber": 1, @@ -1452,7 +1452,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-missing-closing-tag-attribute-placeholder.src 1`] = ` -Object { +TSError { "column": 1, "index": 1, "lineNumber": 1, @@ -1461,7 +1461,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-missing-namespace-name.src 1`] = ` -Object { +TSError { "column": 0, "index": 0, "lineNumber": 1, @@ -1470,7 +1470,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-missing-namespace-value.src 1`] = ` -Object { +TSError { "column": 2, "index": 2, "lineNumber": 1, @@ -1479,7 +1479,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-missing-spread-operator.src 1`] = ` -Object { +TSError { "column": 6, "index": 6, "lineNumber": 1, @@ -1488,7 +1488,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-namespace-name-with-docts.src 1`] = ` -Object { +TSError { "column": 4, "index": 4, "lineNumber": 1, @@ -1497,7 +1497,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-namespace-value-with-dots.src 1`] = ` -Object { +TSError { "column": 2, "index": 2, "lineNumber": 1, @@ -1506,7 +1506,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-no-common-parent.src 1`] = ` -Object { +TSError { "column": 8, "index": 8, "lineNumber": 1, @@ -1515,7 +1515,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-no-common-parent-with-comment.src 1`] = ` -Object { +TSError { "column": 8, "index": 8, "lineNumber": 1, @@ -1524,7 +1524,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-no-tag-name.src 1`] = ` -Object { +TSError { "column": 0, "index": 0, "lineNumber": 1, @@ -1533,7 +1533,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-placeholder-in-closing-tag.src 1`] = ` -Object { +TSError { "column": 16, "index": 16, "lineNumber": 1, @@ -1542,7 +1542,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-shorthand-fragment-no-closing.src 1`] = ` -Object { +TSError { "column": 0, "index": 0, "lineNumber": 1, @@ -1551,7 +1551,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-trailing-dot-tag-name.src 1`] = ` -Object { +TSError { "column": 3, "index": 3, "lineNumber": 1, @@ -1560,7 +1560,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-unexpected-comma.src 1`] = ` -Object { +TSError { "column": 19, "index": 19, "lineNumber": 1, @@ -1575,7 +1575,7 @@ exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" e exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/member-expression.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/member-expression-private.src 1`] = ` -Object { +TSError { "column": 10, "index": 10, "lineNumber": 1, @@ -1588,7 +1588,7 @@ exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" e exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/multiple-blank-spaces.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/namespaced-attribute-and-value-inserted.src 1`] = ` -Object { +TSError { "column": 4, "index": 4, "lineNumber": 1, @@ -1597,7 +1597,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/namespaced-name-and-attribute.src 1`] = ` -Object { +TSError { "column": 2, "index": 2, "lineNumber": 1, @@ -1606,7 +1606,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/newslines-and-entities.src 1`] = ` -Object { +TSError { "column": 8, "index": 8, "lineNumber": 1, @@ -1619,7 +1619,7 @@ exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" e exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/self-closing-tag-inside-tag.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/self-closing-tag-with-newline.src 1`] = ` -Object { +TSError { "column": 2, "index": 2, "lineNumber": 1, @@ -1654,7 +1654,7 @@ exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" e exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/tsx/generic-jsx-element.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/tsx/generic-jsx-member-expression-private.src 1`] = ` -Object { +TSError { "column": 22, "index": 22, "lineNumber": 1, @@ -1671,7 +1671,7 @@ exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" e exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/babylon-convergence/type-parameters.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/abstract-class-with-abstract-constructor.src 1`] = ` -Object { +TSError { "column": 4, "index": 43, "lineNumber": 2, @@ -1686,7 +1686,7 @@ exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" e exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/abstract-class-with-abstract-readonly-property.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/abstract-class-with-abstract-static-constructor.src 1`] = ` -Object { +TSError { "column": 2, "index": 41, "lineNumber": 2, @@ -1699,7 +1699,7 @@ exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" e exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/abstract-class-with-optional-method.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/abstract-interface.src 1`] = ` -Object { +TSError { "column": 7, "index": 7, "lineNumber": 1, @@ -1720,7 +1720,7 @@ exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" e exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/async-function-with-var-declaration.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/await-without-async-function.src 1`] = ` -Object { +TSError { "column": 14, "index": 31, "lineNumber": 2, @@ -1745,7 +1745,7 @@ exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" e exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/catch-clause-with-annotation.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/catch-clause-with-invalid-annotation.src 1`] = ` -Object { +TSError { "column": 12, "index": 19, "lineNumber": 3, @@ -1770,7 +1770,7 @@ exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" e exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-definite-assignment.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-export-parameter-properties.src 1`] = ` -Object { +TSError { "column": 16, "index": 28, "lineNumber": 2, @@ -1791,7 +1791,7 @@ exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" e exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-implements.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-implements-and-extends.src 1`] = ` -Object { +TSError { "column": 57, "index": 57, "lineNumber": 1, @@ -1834,7 +1834,7 @@ exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" e exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-readonly-property.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-static-parameter-properties.src 1`] = ` -Object { +TSError { "column": 16, "index": 28, "lineNumber": 2, @@ -1891,7 +1891,7 @@ exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" e exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/export-named-enum.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/export-named-enum-computed-number.src 1`] = ` -Object { +TSError { "column": 4, "index": 22, "lineNumber": 2, @@ -1902,7 +1902,7 @@ Object { exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/export-named-enum-computed-string.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/export-named-enum-computed-var-ref.src 1`] = ` -Object { +TSError { "column": 4, "index": 22, "lineNumber": 2, @@ -1971,7 +1971,7 @@ exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" e exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/interface-with-all-property-types.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/interface-with-construct-signature-with-parameter-accessibility.src 1`] = ` -Object { +TSError { "column": 9, "index": 26, "lineNumber": 2, @@ -2004,7 +2004,7 @@ exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" e exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/never-type-param.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/new-target-in-arrow-function-body.src 1`] = ` -Object { +TSError { "column": 16, "index": 16, "lineNumber": 1, @@ -2207,7 +2207,7 @@ exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" e exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/decorators/property-decorators/property-decorator-static-member.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/class-empty-extends.src 1`] = ` -Object { +TSError { "column": 17, "index": 17, "lineNumber": 1, @@ -2216,7 +2216,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/class-empty-extends-implements.src 1`] = ` -Object { +TSError { "column": 17, "index": 17, "lineNumber": 1, @@ -2225,7 +2225,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/class-extends-empty-implements.src 1`] = ` -Object { +TSError { "column": 32, "index": 32, "lineNumber": 1, @@ -2234,7 +2234,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/class-multiple-implements.src 1`] = ` -Object { +TSError { "column": 21, "index": 21, "lineNumber": 1, @@ -2243,7 +2243,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/decorator-on-enum-declaration.src 1`] = ` -Object { +TSError { "column": 0, "index": 0, "lineNumber": 1, @@ -2252,7 +2252,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/decorator-on-function.src 1`] = ` -Object { +TSError { "column": 0, "index": 0, "lineNumber": 1, @@ -2261,7 +2261,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/decorator-on-interface-declaration.src 1`] = ` -Object { +TSError { "column": 0, "index": 0, "lineNumber": 1, @@ -2270,7 +2270,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/decorator-on-variable.src 1`] = ` -Object { +TSError { "column": 0, "index": 0, "lineNumber": 1, @@ -2279,7 +2279,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/empty-type-arguments.src 1`] = ` -Object { +TSError { "column": 14, "index": 14, "lineNumber": 1, @@ -2288,7 +2288,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/empty-type-arguments-in-call-expression.src 1`] = ` -Object { +TSError { "column": 3, "index": 3, "lineNumber": 1, @@ -2297,7 +2297,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/empty-type-arguments-in-new-expression.src 1`] = ` -Object { +TSError { "column": 7, "index": 7, "lineNumber": 1, @@ -2306,7 +2306,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/empty-type-parameters.src 1`] = ` -Object { +TSError { "column": 11, "index": 11, "lineNumber": 1, @@ -2315,7 +2315,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/empty-type-parameters-in-arrow-function.src 1`] = ` -Object { +TSError { "column": 11, "index": 11, "lineNumber": 1, @@ -2324,7 +2324,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/empty-type-parameters-in-constructor.src 1`] = ` -Object { +TSError { "column": 13, "index": 25, "lineNumber": 2, @@ -2333,7 +2333,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/empty-type-parameters-in-function-expression.src 1`] = ` -Object { +TSError { "column": 20, "index": 20, "lineNumber": 1, @@ -2342,7 +2342,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/empty-type-parameters-in-method.src 1`] = ` -Object { +TSError { "column": 6, "index": 18, "lineNumber": 2, @@ -2351,7 +2351,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/empty-type-parameters-in-method-signature.src 1`] = ` -Object { +TSError { "column": 6, "index": 22, "lineNumber": 2, @@ -2360,7 +2360,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/enum-with-keywords.src 1`] = ` -Object { +TSError { "column": 7, "index": 7, "lineNumber": 1, @@ -2369,7 +2369,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/index-signature-parameters.src 1`] = ` -Object { +TSError { "column": 3, "index": 16, "lineNumber": 2, @@ -2378,7 +2378,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-empty-extends.src 1`] = ` -Object { +TSError { "column": 21, "index": 21, "lineNumber": 1, @@ -2387,7 +2387,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-implements.src 1`] = ` -Object { +TSError { "column": 12, "index": 12, "lineNumber": 1, @@ -2396,7 +2396,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-index-signature-export.src 1`] = ` -Object { +TSError { "column": 2, "index": 18, "lineNumber": 2, @@ -2405,7 +2405,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-index-signature-private.src 1`] = ` -Object { +TSError { "column": 2, "index": 18, "lineNumber": 2, @@ -2414,7 +2414,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-index-signature-protected.src 1`] = ` -Object { +TSError { "column": 2, "index": 18, "lineNumber": 2, @@ -2423,7 +2423,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-index-signature-public.src 1`] = ` -Object { +TSError { "column": 2, "index": 18, "lineNumber": 2, @@ -2432,7 +2432,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-index-signature-static.src 1`] = ` -Object { +TSError { "column": 2, "index": 18, "lineNumber": 2, @@ -2441,7 +2441,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-method-export.src 1`] = ` -Object { +TSError { "column": 4, "index": 20, "lineNumber": 2, @@ -2450,7 +2450,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-method-private.src 1`] = ` -Object { +TSError { "column": 4, "index": 20, "lineNumber": 2, @@ -2459,7 +2459,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-method-protected.src 1`] = ` -Object { +TSError { "column": 2, "index": 18, "lineNumber": 2, @@ -2468,7 +2468,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-method-public.src 1`] = ` -Object { +TSError { "column": 4, "index": 20, "lineNumber": 2, @@ -2479,7 +2479,7 @@ Object { exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-method-readonly.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-method-static.src 1`] = ` -Object { +TSError { "column": 2, "index": 18, "lineNumber": 2, @@ -2488,7 +2488,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-multiple-extends.src 1`] = ` -Object { +TSError { "column": 26, "index": 26, "lineNumber": 1, @@ -2497,7 +2497,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-property-export.src 1`] = ` -Object { +TSError { "column": 2, "index": 18, "lineNumber": 2, @@ -2506,7 +2506,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-property-private.src 1`] = ` -Object { +TSError { "column": 2, "index": 18, "lineNumber": 2, @@ -2515,7 +2515,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-property-protected.src 1`] = ` -Object { +TSError { "column": 2, "index": 18, "lineNumber": 2, @@ -2524,7 +2524,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-property-public.src 1`] = ` -Object { +TSError { "column": 4, "index": 20, "lineNumber": 2, @@ -2533,7 +2533,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-property-static.src 1`] = ` -Object { +TSError { "column": 2, "index": 18, "lineNumber": 2, @@ -2542,7 +2542,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-property-with-default-value.src 1`] = ` -Object { +TSError { "column": 16, "index": 32, "lineNumber": 2, @@ -2551,7 +2551,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-with-no-body.src 1`] = ` -Object { +TSError { "column": 0, "index": 14, "lineNumber": 2, @@ -2562,7 +2562,7 @@ Object { exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-with-optional-index-signature.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/object-assertion-not-allowed.src 1`] = ` -Object { +TSError { "column": 3, "index": 3, "lineNumber": 1, @@ -2571,7 +2571,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/object-optional-not-allowed.src 1`] = ` -Object { +TSError { "column": 3, "index": 3, "lineNumber": 1, @@ -2580,7 +2580,7 @@ Object { `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/solo-const.src 1`] = ` -Object { +TSError { "column": 5, "index": 5, "lineNumber": 1, diff --git a/packages/typescript-estree/tests/lib/semantic-diagnostics-enabled.test.ts b/packages/typescript-estree/tests/lib/semantic-diagnostics-enabled.test.ts index 3cbe87f9f552..eefd71a587e8 100644 --- a/packages/typescript-estree/tests/lib/semantic-diagnostics-enabled.test.ts +++ b/packages/typescript-estree/tests/lib/semantic-diagnostics-enabled.test.ts @@ -3,6 +3,7 @@ import glob from 'glob'; import path from 'path'; import * as parser from '../../src'; import { formatSnapshotName, isJSXFileType } from '../../tools/test-utils'; +import { serializer } from '../../tools/tserror-serializer'; /** * Process all fixtures, we will only snapshot the ones that have semantic errors @@ -10,10 +11,12 @@ import { formatSnapshotName, isJSXFileType } from '../../tools/test-utils'; */ const FIXTURES_DIR = path.join(__dirname, '../../../shared-fixtures/fixtures'); -const testFiles = glob.sync(`**/*.src.*`, { +const testFiles = glob.sync('**/*.src.*', { cwd: FIXTURES_DIR, }); +expect.addSnapshotSerializer(serializer); + describe('Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled', () => { testFiles.forEach(filename => { const code = readFileSync(path.join(FIXTURES_DIR, filename), 'utf8'); diff --git a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-missing-paren.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-missing-paren.src.js.shot index 4d8588883161..0ac39c77fa9b 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-missing-paren.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-missing-paren.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript arrowFunctions error-missing-paren.src 1`] = ` -Object { +TSError { "column": 9, "index": 9, "lineNumber": 1, diff --git a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-not-arrow.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-not-arrow.src.js.shot index 6e864113410b..ccca762cfacc 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-not-arrow.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-not-arrow.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript arrowFunctions error-not-arrow.src 1`] = ` -Object { +TSError { "column": 26, "index": 26, "lineNumber": 1, diff --git a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-numeric-param-multi.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-numeric-param-multi.src.js.shot index a420234d969d..a6309f29f7a1 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-numeric-param-multi.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-numeric-param-multi.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript arrowFunctions error-numeric-param-multi.src 1`] = ` -Object { +TSError { "column": 9, "index": 9, "lineNumber": 1, diff --git a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-numeric-param.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-numeric-param.src.js.shot index ce4227697aef..00a6318c84e4 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-numeric-param.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-numeric-param.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript arrowFunctions error-numeric-param.src 1`] = ` -Object { +TSError { "column": 5, "index": 5, "lineNumber": 1, diff --git a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-reverse-arrow.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-reverse-arrow.src.js.shot index 6d661e7e9416..2b010cb8480d 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-reverse-arrow.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-reverse-arrow.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript arrowFunctions error-reverse-arrow.src 1`] = ` -Object { +TSError { "column": 1, "index": 1, "lineNumber": 1, diff --git a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-wrapped-param.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-wrapped-param.src.js.shot index 49be12cab232..921faeae08b9 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-wrapped-param.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/arrowFunctions/error-wrapped-param.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript arrowFunctions error-wrapped-param.src 1`] = ` -Object { +TSError { "column": 6, "index": 6, "lineNumber": 1, diff --git a/packages/typescript-estree/tests/snapshots/javascript/binaryLiterals/invalid.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/binaryLiterals/invalid.src.js.shot index 061b8be20a61..a65dcc90f690 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/binaryLiterals/invalid.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/binaryLiterals/invalid.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript binaryLiterals invalid.src 1`] = ` -Object { +TSError { "column": 4, "index": 4, "lineNumber": 1, diff --git a/packages/typescript-estree/tests/snapshots/javascript/classes/class-with-no-body.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/classes/class-with-no-body.src.js.shot index da522f5fbd0a..b92aba616ebc 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/classes/class-with-no-body.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/classes/class-with-no-body.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript classes class-with-no-body.src 1`] = ` -Object { +TSError { "column": 0, "index": 10, "lineNumber": 2, diff --git a/packages/typescript-estree/tests/snapshots/javascript/classes/invalid-class-two-super-classes.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/classes/invalid-class-two-super-classes.src.js.shot index 3931bfb0029f..71e4b3acbbb5 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/classes/invalid-class-two-super-classes.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/classes/invalid-class-two-super-classes.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript classes invalid-class-two-super-classes.src 1`] = ` -Object { +TSError { "column": 18, "index": 18, "lineNumber": 1, diff --git a/packages/typescript-estree/tests/snapshots/javascript/experimentalDynamicImport/error-dynamic-import-params.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/experimentalDynamicImport/error-dynamic-import-params.src.js.shot index 4409934d5bd6..6eab5338468b 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/experimentalDynamicImport/error-dynamic-import-params.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/experimentalDynamicImport/error-dynamic-import-params.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript experimentalDynamicImport error-dynamic-import-params.src 1`] = ` -Object { +TSError { "column": 7, "index": 7, "lineNumber": 1, diff --git a/packages/typescript-estree/tests/snapshots/javascript/experimentalObjectRestSpread/invalid-rest.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/experimentalObjectRestSpread/invalid-rest.src.js.shot index d0b41a2d431b..79ebf6dc533f 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/experimentalObjectRestSpread/invalid-rest.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/experimentalObjectRestSpread/invalid-rest.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript experimentalObjectRestSpread invalid-rest.src 1`] = ` -Object { +TSError { "column": 18, "index": 18, "lineNumber": 1, diff --git a/packages/typescript-estree/tests/snapshots/javascript/forIn/for-in-object.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/forIn/for-in-object.src.js.shot index a7fc7b9f8af0..f1d2b3dbc4a0 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/forIn/for-in-object.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/forIn/for-in-object.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript forIn for-in-object.src 1`] = ` -Object { +TSError { "column": 14, "index": 14, "lineNumber": 1, diff --git a/packages/typescript-estree/tests/snapshots/javascript/hexLiterals/invalid.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/hexLiterals/invalid.src.js.shot index d340dd7f1af2..1095e6d6c8e2 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/hexLiterals/invalid.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/hexLiterals/invalid.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript hexLiterals invalid.src 1`] = ` -Object { +TSError { "column": 4, "index": 4, "lineNumber": 1, diff --git a/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-export-batch-missing-from-clause.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-export-batch-missing-from-clause.src.js.shot index 140771b44066..ae346cd3c57f 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-export-batch-missing-from-clause.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-export-batch-missing-from-clause.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript modules invalid-export-batch-missing-from-clause.src 1`] = ` -Object { +TSError { "column": 0, "index": 9, "lineNumber": 2, diff --git a/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-export-batch-token.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-export-batch-token.src.js.shot index 684e19e0233c..5a05ea68acb9 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-export-batch-token.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-export-batch-token.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript modules invalid-export-batch-token.src 1`] = ` -Object { +TSError { "column": 9, "index": 9, "lineNumber": 1, diff --git a/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-export-default-equal.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-export-default-equal.src.js.shot index 7a9ce96887f6..ee8455cff2e8 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-export-default-equal.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-export-default-equal.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript modules invalid-export-default-equal.src 1`] = ` -Object { +TSError { "column": 15, "index": 15, "lineNumber": 1, diff --git a/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-export-default-token.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-export-default-token.src.js.shot index 60a6d78b8a8c..68613dac12a5 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-export-default-token.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-export-default-token.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript modules invalid-export-default-token.src 1`] = ` -Object { +TSError { "column": 17, "index": 17, "lineNumber": 1, diff --git a/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-export-default.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-export-default.src.js.shot index 50249961d3af..aa02d1b56fc4 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-export-default.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-export-default.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript modules invalid-export-default.src 1`] = ` -Object { +TSError { "column": 20, "index": 20, "lineNumber": 1, diff --git a/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-export-named-extra-comma.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-export-named-extra-comma.src.js.shot index 6ecbf90fdcab..143a7bd54948 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-export-named-extra-comma.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-export-named-extra-comma.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript modules invalid-export-named-extra-comma.src 1`] = ` -Object { +TSError { "column": 16, "index": 16, "lineNumber": 1, diff --git a/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-export-named-middle-comma.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-export-named-middle-comma.src.js.shot index 41db50ebc78d..b4f8f3d9872d 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-export-named-middle-comma.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-export-named-middle-comma.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript modules invalid-export-named-middle-comma.src 1`] = ` -Object { +TSError { "column": 12, "index": 12, "lineNumber": 1, diff --git a/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-import-default-after-named-after-default.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-import-default-after-named-after-default.src.js.shot index 7607179ac6ee..fdb5bd5d6bd2 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-import-default-after-named-after-default.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-import-default-after-named-after-default.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript modules invalid-import-default-after-named-after-default.src 1`] = ` -Object { +TSError { "column": 17, "index": 17, "lineNumber": 1, diff --git a/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-import-default-after-named.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-import-default-after-named.src.js.shot index fdb8cb274d5d..756a15c8851f 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-import-default-after-named.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-import-default-after-named.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript modules invalid-import-default-after-named.src 1`] = ` -Object { +TSError { "column": 12, "index": 12, "lineNumber": 1, diff --git a/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-import-default-missing-module-specifier.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-import-default-missing-module-specifier.src.js.shot index 4dd22655d116..95e60f66c12d 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-import-default-missing-module-specifier.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-import-default-missing-module-specifier.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript modules invalid-import-default-missing-module-specifier.src 1`] = ` -Object { +TSError { "column": 0, "index": 11, "lineNumber": 2, diff --git a/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-import-default.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-import-default.src.js.shot index 072020a6f46b..a15834eebdca 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-import-default.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-import-default.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript modules invalid-import-default.src 1`] = ` -Object { +TSError { "column": 7, "index": 7, "lineNumber": 1, diff --git a/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-import-missing-module-specifier.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-import-missing-module-specifier.src.js.shot index eed69ef23a0c..adeb29427a96 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-import-missing-module-specifier.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-import-missing-module-specifier.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript modules invalid-import-missing-module-specifier.src 1`] = ` -Object { +TSError { "column": 0, "index": 20, "lineNumber": 2, diff --git a/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-import-named-after-named.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-import-named-after-named.src.js.shot index 39758891aa47..2205d06adcb6 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-import-named-after-named.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-import-named-after-named.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript modules invalid-import-named-after-named.src 1`] = ` -Object { +TSError { "column": 12, "index": 12, "lineNumber": 1, diff --git a/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-import-named-after-namespace.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-import-named-after-namespace.src.js.shot index 91a74529b99c..a6adaddba9ee 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-import-named-after-namespace.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-import-named-after-namespace.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript modules invalid-import-named-after-namespace.src 1`] = ` -Object { +TSError { "column": 15, "index": 15, "lineNumber": 1, diff --git a/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-import-named-as-missing-from.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-import-named-as-missing-from.src.js.shot index e725b5a845c3..e49ff4b519d5 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-import-named-as-missing-from.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-import-named-as-missing-from.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript modules invalid-import-named-as-missing-from.src 1`] = ` -Object { +TSError { "column": 0, "index": 24, "lineNumber": 2, diff --git a/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-import-named-extra-comma.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-import-named-extra-comma.src.js.shot index 7b6f49a80d52..602373b73e68 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-import-named-extra-comma.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-import-named-extra-comma.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript modules invalid-import-named-extra-comma.src 1`] = ` -Object { +TSError { "column": 16, "index": 16, "lineNumber": 1, diff --git a/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-import-named-middle-comma.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-import-named-middle-comma.src.js.shot index 9ae813ee7061..cac59c052809 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-import-named-middle-comma.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-import-named-middle-comma.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript modules invalid-import-named-middle-comma.src 1`] = ` -Object { +TSError { "column": 12, "index": 12, "lineNumber": 1, diff --git a/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-import-namespace-after-named.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-import-namespace-after-named.src.js.shot index c77b5326270f..b5b5e09f82b1 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-import-namespace-after-named.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-import-namespace-after-named.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript modules invalid-import-namespace-after-named.src 1`] = ` -Object { +TSError { "column": 12, "index": 12, "lineNumber": 1, diff --git a/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-import-namespace-missing-as.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-import-namespace-missing-as.src.js.shot index 5d846e434301..ccd1659afe4e 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-import-namespace-missing-as.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/modules/invalid-import-namespace-missing-as.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript modules invalid-import-namespace-missing-as.src 1`] = ` -Object { +TSError { "column": 9, "index": 9, "lineNumber": 1, diff --git a/packages/typescript-estree/tests/snapshots/javascript/objectLiteralComputedProperties/invalid-computed-variable-property.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/objectLiteralComputedProperties/invalid-computed-variable-property.src.js.shot index eba3235d029a..b70c46baf0ae 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/objectLiteralComputedProperties/invalid-computed-variable-property.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/objectLiteralComputedProperties/invalid-computed-variable-property.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript objectLiteralComputedProperties invalid-computed-variable-property.src 1`] = ` -Object { +TSError { "column": 0, "index": 20, "lineNumber": 3, diff --git a/packages/typescript-estree/tests/snapshots/javascript/objectLiteralComputedProperties/invalid-standalone-computed-variable-property.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/objectLiteralComputedProperties/invalid-standalone-computed-variable-property.src.js.shot index 3ad37e27ab31..3431838086bf 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/objectLiteralComputedProperties/invalid-standalone-computed-variable-property.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/objectLiteralComputedProperties/invalid-standalone-computed-variable-property.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript objectLiteralComputedProperties invalid-standalone-computed-variable-property.src 1`] = ` -Object { +TSError { "column": 5, "index": 5, "lineNumber": 1, diff --git a/packages/typescript-estree/tests/snapshots/javascript/objectLiteralShorthandMethods/invalid-method-no-braces.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/objectLiteralShorthandMethods/invalid-method-no-braces.src.js.shot index 80376a615c6a..14d3993f83b0 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/objectLiteralShorthandMethods/invalid-method-no-braces.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/objectLiteralShorthandMethods/invalid-method-no-braces.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript objectLiteralShorthandMethods invalid-method-no-braces.src 1`] = ` -Object { +TSError { "column": 13, "index": 19, "lineNumber": 2, diff --git a/packages/typescript-estree/tests/snapshots/javascript/octalLiterals/invalid.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/octalLiterals/invalid.src.js.shot index 849f063d5db9..40818b0aef69 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/octalLiterals/invalid.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/octalLiterals/invalid.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript octalLiterals invalid.src 1`] = ` -Object { +TSError { "column": 4, "index": 4, "lineNumber": 1, diff --git a/packages/typescript-estree/tests/snapshots/javascript/spread/error-invalid-if.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/spread/error-invalid-if.src.js.shot index 705c64e01793..f80801010e12 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/spread/error-invalid-if.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/spread/error-invalid-if.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript spread error-invalid-if.src 1`] = ` -Object { +TSError { "column": 6, "index": 6, "lineNumber": 1, diff --git a/packages/typescript-estree/tests/snapshots/javascript/spread/error-invalid-sequence.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/spread/error-invalid-sequence.src.js.shot index 4ee0121d3c74..2606eea3403a 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/spread/error-invalid-sequence.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/spread/error-invalid-sequence.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript spread error-invalid-sequence.src 1`] = ` -Object { +TSError { "column": 4, "index": 4, "lineNumber": 1, diff --git a/packages/typescript-estree/tests/snapshots/javascript/unicodeCodePointEscapes/invalid-empty-escape.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/unicodeCodePointEscapes/invalid-empty-escape.src.js.shot index 4a663bbe3a8d..7d4d1d1a6bde 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/unicodeCodePointEscapes/invalid-empty-escape.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/unicodeCodePointEscapes/invalid-empty-escape.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript unicodeCodePointEscapes invalid-empty-escape.src 1`] = ` -Object { +TSError { "column": 4, "index": 4, "lineNumber": 1, diff --git a/packages/typescript-estree/tests/snapshots/javascript/unicodeCodePointEscapes/invalid-too-large-escape.src.js.shot b/packages/typescript-estree/tests/snapshots/javascript/unicodeCodePointEscapes/invalid-too-large-escape.src.js.shot index cb7085a9d65b..b5e8902e41da 100644 --- a/packages/typescript-estree/tests/snapshots/javascript/unicodeCodePointEscapes/invalid-too-large-escape.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/javascript/unicodeCodePointEscapes/invalid-too-large-escape.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript unicodeCodePointEscapes invalid-too-large-escape.src 1`] = ` -Object { +TSError { "column": 10, "index": 10, "lineNumber": 1, diff --git a/packages/typescript-estree/tests/snapshots/jsx/embedded-tags.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/embedded-tags.src.js.shot index 95a7931627ba..d778d382e997 100644 --- a/packages/typescript-estree/tests/snapshots/jsx/embedded-tags.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/jsx/embedded-tags.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`jsx embedded-tags.src 1`] = ` -Object { +TSError { "column": 16, "index": 16, "lineNumber": 1, diff --git a/packages/typescript-estree/tests/snapshots/jsx/invalid-attribute-missing-equals.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/invalid-attribute-missing-equals.src.js.shot index bcca853e1250..312d414ac20d 100644 --- a/packages/typescript-estree/tests/snapshots/jsx/invalid-attribute-missing-equals.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/jsx/invalid-attribute-missing-equals.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`jsx invalid-attribute-missing-equals.src 1`] = ` -Object { +TSError { "column": 14, "index": 14, "lineNumber": 1, diff --git a/packages/typescript-estree/tests/snapshots/jsx/invalid-attribute.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/invalid-attribute.src.js.shot index cd30dc7093f5..b0eaf47f8e9e 100644 --- a/packages/typescript-estree/tests/snapshots/jsx/invalid-attribute.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/jsx/invalid-attribute.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`jsx invalid-attribute.src 1`] = ` -Object { +TSError { "column": 5, "index": 5, "lineNumber": 1, diff --git a/packages/typescript-estree/tests/snapshots/jsx/invalid-broken-tag.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/invalid-broken-tag.src.js.shot index 8e62b046d279..f04a71430590 100644 --- a/packages/typescript-estree/tests/snapshots/jsx/invalid-broken-tag.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/jsx/invalid-broken-tag.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`jsx invalid-broken-tag.src 1`] = ` -Object { +TSError { "column": 12, "index": 12, "lineNumber": 1, diff --git a/packages/typescript-estree/tests/snapshots/jsx/invalid-computed-end-tag-name.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/invalid-computed-end-tag-name.src.js.shot index 0f377ef358c5..4e6aab214780 100644 --- a/packages/typescript-estree/tests/snapshots/jsx/invalid-computed-end-tag-name.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/jsx/invalid-computed-end-tag-name.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`jsx invalid-computed-end-tag-name.src 1`] = ` -Object { +TSError { "column": 2, "index": 2, "lineNumber": 1, diff --git a/packages/typescript-estree/tests/snapshots/jsx/invalid-computed-string-end-tag-name.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/invalid-computed-string-end-tag-name.src.js.shot index 7a5ac6909c88..d6ebfad1a333 100644 --- a/packages/typescript-estree/tests/snapshots/jsx/invalid-computed-string-end-tag-name.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/jsx/invalid-computed-string-end-tag-name.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`jsx invalid-computed-string-end-tag-name.src 1`] = ` -Object { +TSError { "column": 2, "index": 2, "lineNumber": 1, diff --git a/packages/typescript-estree/tests/snapshots/jsx/invalid-embedded-expression.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/invalid-embedded-expression.src.js.shot index c8c137461dbd..b100da149e8b 100644 --- a/packages/typescript-estree/tests/snapshots/jsx/invalid-embedded-expression.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/jsx/invalid-embedded-expression.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`jsx invalid-embedded-expression.src 1`] = ` -Object { +TSError { "column": 9, "index": 9, "lineNumber": 1, diff --git a/packages/typescript-estree/tests/snapshots/jsx/invalid-leading-dot-tag-name.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/invalid-leading-dot-tag-name.src.js.shot index 7a898add8cb6..57a4e46ab9dc 100644 --- a/packages/typescript-estree/tests/snapshots/jsx/invalid-leading-dot-tag-name.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/jsx/invalid-leading-dot-tag-name.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`jsx invalid-leading-dot-tag-name.src 1`] = ` -Object { +TSError { "column": 0, "index": 0, "lineNumber": 1, diff --git a/packages/typescript-estree/tests/snapshots/jsx/invalid-matching-placeholder-in-closing-tag.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/invalid-matching-placeholder-in-closing-tag.src.js.shot index fe40f0361216..0109dd78aee8 100644 --- a/packages/typescript-estree/tests/snapshots/jsx/invalid-matching-placeholder-in-closing-tag.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/jsx/invalid-matching-placeholder-in-closing-tag.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`jsx invalid-matching-placeholder-in-closing-tag.src 1`] = ` -Object { +TSError { "column": 27, "index": 27, "lineNumber": 1, diff --git a/packages/typescript-estree/tests/snapshots/jsx/invalid-mismatched-closing-tag.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/invalid-mismatched-closing-tag.src.js.shot index bab969b949a6..a35f3afd7151 100644 --- a/packages/typescript-estree/tests/snapshots/jsx/invalid-mismatched-closing-tag.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/jsx/invalid-mismatched-closing-tag.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`jsx invalid-mismatched-closing-tag.src 1`] = ` -Object { +TSError { "column": 3, "index": 3, "lineNumber": 1, diff --git a/packages/typescript-estree/tests/snapshots/jsx/invalid-mismatched-closing-tags.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/invalid-mismatched-closing-tags.src.js.shot index 48a5da759091..911494689a40 100644 --- a/packages/typescript-estree/tests/snapshots/jsx/invalid-mismatched-closing-tags.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/jsx/invalid-mismatched-closing-tags.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`jsx invalid-mismatched-closing-tags.src 1`] = ` -Object { +TSError { "column": 1, "index": 1, "lineNumber": 1, diff --git a/packages/typescript-estree/tests/snapshots/jsx/invalid-mismatched-dot-tag-name.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/invalid-mismatched-dot-tag-name.src.js.shot index df751d1740dc..77d7e4187c3b 100644 --- a/packages/typescript-estree/tests/snapshots/jsx/invalid-mismatched-dot-tag-name.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/jsx/invalid-mismatched-dot-tag-name.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`jsx invalid-mismatched-dot-tag-name.src 1`] = ` -Object { +TSError { "column": 7, "index": 7, "lineNumber": 1, diff --git a/packages/typescript-estree/tests/snapshots/jsx/invalid-mismatched-namespace-tag.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/invalid-mismatched-namespace-tag.src.js.shot index 11aa190352b1..b466cc6ba4c8 100644 --- a/packages/typescript-estree/tests/snapshots/jsx/invalid-mismatched-namespace-tag.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/jsx/invalid-mismatched-namespace-tag.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`jsx invalid-mismatched-namespace-tag.src 1`] = ` -Object { +TSError { "column": 2, "index": 2, "lineNumber": 1, diff --git a/packages/typescript-estree/tests/snapshots/jsx/invalid-missing-closing-tag-attribute-placeholder.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/invalid-missing-closing-tag-attribute-placeholder.src.js.shot index 2d6c87006666..80d75f36ba2e 100644 --- a/packages/typescript-estree/tests/snapshots/jsx/invalid-missing-closing-tag-attribute-placeholder.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/jsx/invalid-missing-closing-tag-attribute-placeholder.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`jsx invalid-missing-closing-tag-attribute-placeholder.src 1`] = ` -Object { +TSError { "column": 1, "index": 1, "lineNumber": 1, diff --git a/packages/typescript-estree/tests/snapshots/jsx/invalid-missing-closing-tag.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/invalid-missing-closing-tag.src.js.shot index a1e249095988..56f8c0d6ae30 100644 --- a/packages/typescript-estree/tests/snapshots/jsx/invalid-missing-closing-tag.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/jsx/invalid-missing-closing-tag.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`jsx invalid-missing-closing-tag.src 1`] = ` -Object { +TSError { "column": 1, "index": 1, "lineNumber": 1, diff --git a/packages/typescript-estree/tests/snapshots/jsx/invalid-missing-namespace-name.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/invalid-missing-namespace-name.src.js.shot index 539d6637c079..c208b579c837 100644 --- a/packages/typescript-estree/tests/snapshots/jsx/invalid-missing-namespace-name.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/jsx/invalid-missing-namespace-name.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`jsx invalid-missing-namespace-name.src 1`] = ` -Object { +TSError { "column": 0, "index": 0, "lineNumber": 1, diff --git a/packages/typescript-estree/tests/snapshots/jsx/invalid-missing-namespace-value.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/invalid-missing-namespace-value.src.js.shot index d90c23b13602..d76a079d93ea 100644 --- a/packages/typescript-estree/tests/snapshots/jsx/invalid-missing-namespace-value.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/jsx/invalid-missing-namespace-value.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`jsx invalid-missing-namespace-value.src 1`] = ` -Object { +TSError { "column": 2, "index": 2, "lineNumber": 1, diff --git a/packages/typescript-estree/tests/snapshots/jsx/invalid-missing-spread-operator.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/invalid-missing-spread-operator.src.js.shot index daec8f23ef24..ac0a591ee4fe 100644 --- a/packages/typescript-estree/tests/snapshots/jsx/invalid-missing-spread-operator.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/jsx/invalid-missing-spread-operator.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`jsx invalid-missing-spread-operator.src 1`] = ` -Object { +TSError { "column": 6, "index": 6, "lineNumber": 1, diff --git a/packages/typescript-estree/tests/snapshots/jsx/invalid-namespace-name-with-docts.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/invalid-namespace-name-with-docts.src.js.shot index 8d3d4b531193..31752fe92610 100644 --- a/packages/typescript-estree/tests/snapshots/jsx/invalid-namespace-name-with-docts.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/jsx/invalid-namespace-name-with-docts.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`jsx invalid-namespace-name-with-docts.src 1`] = ` -Object { +TSError { "column": 4, "index": 4, "lineNumber": 1, diff --git a/packages/typescript-estree/tests/snapshots/jsx/invalid-namespace-value-with-dots.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/invalid-namespace-value-with-dots.src.js.shot index 632d941125a6..33b9b97c43a4 100644 --- a/packages/typescript-estree/tests/snapshots/jsx/invalid-namespace-value-with-dots.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/jsx/invalid-namespace-value-with-dots.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`jsx invalid-namespace-value-with-dots.src 1`] = ` -Object { +TSError { "column": 2, "index": 2, "lineNumber": 1, diff --git a/packages/typescript-estree/tests/snapshots/jsx/invalid-no-common-parent-with-comment.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/invalid-no-common-parent-with-comment.src.js.shot index 74546236bad9..70dbe413502c 100644 --- a/packages/typescript-estree/tests/snapshots/jsx/invalid-no-common-parent-with-comment.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/jsx/invalid-no-common-parent-with-comment.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`jsx invalid-no-common-parent-with-comment.src 1`] = ` -Object { +TSError { "column": 8, "index": 8, "lineNumber": 1, diff --git a/packages/typescript-estree/tests/snapshots/jsx/invalid-no-common-parent.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/invalid-no-common-parent.src.js.shot index 7490422a4b5f..459f48170205 100644 --- a/packages/typescript-estree/tests/snapshots/jsx/invalid-no-common-parent.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/jsx/invalid-no-common-parent.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`jsx invalid-no-common-parent.src 1`] = ` -Object { +TSError { "column": 8, "index": 8, "lineNumber": 1, diff --git a/packages/typescript-estree/tests/snapshots/jsx/invalid-no-tag-name.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/invalid-no-tag-name.src.js.shot index b63c1ccfe3c3..7468255ed504 100644 --- a/packages/typescript-estree/tests/snapshots/jsx/invalid-no-tag-name.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/jsx/invalid-no-tag-name.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`jsx invalid-no-tag-name.src 1`] = ` -Object { +TSError { "column": 0, "index": 0, "lineNumber": 1, diff --git a/packages/typescript-estree/tests/snapshots/jsx/invalid-placeholder-in-closing-tag.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/invalid-placeholder-in-closing-tag.src.js.shot index 2e857296666d..68d4a0fe19d7 100644 --- a/packages/typescript-estree/tests/snapshots/jsx/invalid-placeholder-in-closing-tag.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/jsx/invalid-placeholder-in-closing-tag.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`jsx invalid-placeholder-in-closing-tag.src 1`] = ` -Object { +TSError { "column": 16, "index": 16, "lineNumber": 1, diff --git a/packages/typescript-estree/tests/snapshots/jsx/invalid-shorthand-fragment-no-closing.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/invalid-shorthand-fragment-no-closing.src.js.shot index 48602742927e..decbdbd3dc16 100644 --- a/packages/typescript-estree/tests/snapshots/jsx/invalid-shorthand-fragment-no-closing.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/jsx/invalid-shorthand-fragment-no-closing.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`jsx invalid-shorthand-fragment-no-closing.src 1`] = ` -Object { +TSError { "column": 0, "index": 0, "lineNumber": 1, diff --git a/packages/typescript-estree/tests/snapshots/jsx/invalid-trailing-dot-tag-name.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/invalid-trailing-dot-tag-name.src.js.shot index 0d642dc05548..9043d6e41959 100644 --- a/packages/typescript-estree/tests/snapshots/jsx/invalid-trailing-dot-tag-name.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/jsx/invalid-trailing-dot-tag-name.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`jsx invalid-trailing-dot-tag-name.src 1`] = ` -Object { +TSError { "column": 3, "index": 3, "lineNumber": 1, diff --git a/packages/typescript-estree/tests/snapshots/jsx/invalid-unexpected-comma.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/invalid-unexpected-comma.src.js.shot index 9e8f2aadcc65..6f8f5c8668eb 100644 --- a/packages/typescript-estree/tests/snapshots/jsx/invalid-unexpected-comma.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/jsx/invalid-unexpected-comma.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`jsx invalid-unexpected-comma.src 1`] = ` -Object { +TSError { "column": 19, "index": 19, "lineNumber": 1, diff --git a/packages/typescript-estree/tests/snapshots/jsx/member-expression-private.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/member-expression-private.src.js.shot index be5a6d6f54d4..c6d458d493ef 100644 --- a/packages/typescript-estree/tests/snapshots/jsx/member-expression-private.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/jsx/member-expression-private.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`jsx member-expression-private.src 1`] = ` -Object { +TSError { "column": 10, "index": 10, "lineNumber": 1, diff --git a/packages/typescript-estree/tests/snapshots/jsx/namespaced-attribute-and-value-inserted.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/namespaced-attribute-and-value-inserted.src.js.shot index eea2ab649582..84724e7bdb74 100644 --- a/packages/typescript-estree/tests/snapshots/jsx/namespaced-attribute-and-value-inserted.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/jsx/namespaced-attribute-and-value-inserted.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`jsx namespaced-attribute-and-value-inserted.src 1`] = ` -Object { +TSError { "column": 4, "index": 4, "lineNumber": 1, diff --git a/packages/typescript-estree/tests/snapshots/jsx/namespaced-name-and-attribute.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/namespaced-name-and-attribute.src.js.shot index 5082dcbe1dde..ac04b31a1402 100644 --- a/packages/typescript-estree/tests/snapshots/jsx/namespaced-name-and-attribute.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/jsx/namespaced-name-and-attribute.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`jsx namespaced-name-and-attribute.src 1`] = ` -Object { +TSError { "column": 2, "index": 2, "lineNumber": 1, diff --git a/packages/typescript-estree/tests/snapshots/jsx/newslines-and-entities.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/newslines-and-entities.src.js.shot index 2690d120c1c5..598f29385b2d 100644 --- a/packages/typescript-estree/tests/snapshots/jsx/newslines-and-entities.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/jsx/newslines-and-entities.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`jsx newslines-and-entities.src 1`] = ` -Object { +TSError { "column": 8, "index": 8, "lineNumber": 1, diff --git a/packages/typescript-estree/tests/snapshots/jsx/self-closing-tag-with-newline.src.js.shot b/packages/typescript-estree/tests/snapshots/jsx/self-closing-tag-with-newline.src.js.shot index 51247306bf31..9de3d885b9d5 100644 --- a/packages/typescript-estree/tests/snapshots/jsx/self-closing-tag-with-newline.src.js.shot +++ b/packages/typescript-estree/tests/snapshots/jsx/self-closing-tag-with-newline.src.js.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`jsx self-closing-tag-with-newline.src 1`] = ` -Object { +TSError { "column": 2, "index": 2, "lineNumber": 1, diff --git a/packages/typescript-estree/tests/snapshots/tsx/generic-jsx-member-expression-private.src.tsx.shot b/packages/typescript-estree/tests/snapshots/tsx/generic-jsx-member-expression-private.src.tsx.shot index 71fd0f423147..5d5d2c98492f 100644 --- a/packages/typescript-estree/tests/snapshots/tsx/generic-jsx-member-expression-private.src.tsx.shot +++ b/packages/typescript-estree/tests/snapshots/tsx/generic-jsx-member-expression-private.src.tsx.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`tsx generic-jsx-member-expression-private.src 1`] = ` -Object { +TSError { "column": 22, "index": 22, "lineNumber": 1, diff --git a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-with-no-body.src.ts.shot b/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-with-no-body.src.ts.shot index 326171a51717..cd817aad0dc9 100644 --- a/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-with-no-body.src.ts.shot +++ b/packages/typescript-estree/tests/snapshots/typescript/errorRecovery/interface-with-no-body.src.ts.shot @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`typescript errorRecovery interface-with-no-body.src 1`] = ` -Object { +TSError { "column": 0, "index": 14, "lineNumber": 2, diff --git a/packages/typescript-estree/tools/tserror-serializer.ts b/packages/typescript-estree/tools/tserror-serializer.ts new file mode 100644 index 000000000000..b56ed97e837b --- /dev/null +++ b/packages/typescript-estree/tools/tserror-serializer.ts @@ -0,0 +1,18 @@ +import { TSError } from '../src/node-utils'; +import type { Plugin } from 'pretty-format'; + +export const serializer: Plugin = { + test: (val: unknown): val is TSError => val instanceof TSError, + serialize(val: TSError, config, indentation, depth, refs, printer) { + const format = (value: unknown): string => + printer(value, config, indentation, depth + 1, refs); + return ( + `${val.name} {\n` + + `${config.indent}"column": ${format(val.column)},\n` + + `${config.indent}"index": ${format(val.index)},\n` + + `${config.indent}"lineNumber": ${format(val.lineNumber)},\n` + + `${config.indent}"message": ${format(val.message)},\n` + + `}` + ); + }, +}; pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy