From e28ee8bf728084fcc4b9c724403d874ac71be6e7 Mon Sep 17 00:00:00 2001 From: Armano Date: Mon, 8 Feb 2021 09:02:32 +0100 Subject: [PATCH] fix(typescript-estree): remove prototype and update serializer --- packages/typescript-estree/src/node-utils.ts | 1 - .../semantic-diagnostics-enabled.test.ts.snap | 1022 ++++++++++------- .../error-missing-paren.src.js.shot | 7 +- .../error-not-arrow.src.js.shot | 7 +- .../error-numeric-param-multi.src.js.shot | 7 +- .../error-numeric-param.src.js.shot | 7 +- .../error-reverse-arrow.src.js.shot | 7 +- .../error-wrapped-param.src.js.shot | 7 +- .../binaryLiterals/invalid.src.js.shot | 7 +- .../classes/class-with-no-body.src.js.shot | 7 +- ...nvalid-class-two-super-classes.src.js.shot | 7 +- .../error-dynamic-import-params.src.js.shot | 7 +- .../invalid-rest.src.js.shot | 7 +- .../forIn/for-in-object.src.js.shot | 7 +- .../hexLiterals/invalid.src.js.shot | 7 +- ...port-batch-missing-from-clause.src.js.shot | 7 +- .../invalid-export-batch-token.src.js.shot | 7 +- .../invalid-export-default-equal.src.js.shot | 7 +- .../invalid-export-default-token.src.js.shot | 7 +- .../invalid-export-default.src.js.shot | 7 +- ...valid-export-named-extra-comma.src.js.shot | 7 +- ...alid-export-named-middle-comma.src.js.shot | 7 +- ...ault-after-named-after-default.src.js.shot | 7 +- ...lid-import-default-after-named.src.js.shot | 7 +- ...fault-missing-module-specifier.src.js.shot | 7 +- .../invalid-import-default.src.js.shot | 7 +- ...mport-missing-module-specifier.src.js.shot | 7 +- ...valid-import-named-after-named.src.js.shot | 7 +- ...d-import-named-after-namespace.src.js.shot | 7 +- ...d-import-named-as-missing-from.src.js.shot | 7 +- ...valid-import-named-extra-comma.src.js.shot | 7 +- ...alid-import-named-middle-comma.src.js.shot | 7 +- ...d-import-namespace-after-named.src.js.shot | 7 +- ...id-import-namespace-missing-as.src.js.shot | 7 +- ...lid-computed-variable-property.src.js.shot | 7 +- ...one-computed-variable-property.src.js.shot | 7 +- .../invalid-method-no-braces.src.js.shot | 7 +- .../octalLiterals/invalid.src.js.shot | 7 +- .../spread/error-invalid-if.src.js.shot | 7 +- .../spread/error-invalid-sequence.src.js.shot | 7 +- .../invalid-empty-escape.src.js.shot | 7 +- .../invalid-too-large-escape.src.js.shot | 7 +- .../snapshots/jsx/embedded-tags.src.js.shot | 7 +- ...valid-attribute-missing-equals.src.js.shot | 7 +- .../jsx/invalid-attribute.src.js.shot | 7 +- .../jsx/invalid-broken-tag.src.js.shot | 7 +- .../invalid-computed-end-tag-name.src.js.shot | 7 +- ...d-computed-string-end-tag-name.src.js.shot | 7 +- .../invalid-embedded-expression.src.js.shot | 7 +- .../invalid-leading-dot-tag-name.src.js.shot | 7 +- ...ing-placeholder-in-closing-tag.src.js.shot | 7 +- ...invalid-mismatched-closing-tag.src.js.shot | 7 +- ...nvalid-mismatched-closing-tags.src.js.shot | 7 +- ...nvalid-mismatched-dot-tag-name.src.js.shot | 7 +- ...valid-mismatched-namespace-tag.src.js.shot | 7 +- ...sing-tag-attribute-placeholder.src.js.shot | 7 +- .../invalid-missing-closing-tag.src.js.shot | 7 +- ...invalid-missing-namespace-name.src.js.shot | 7 +- ...nvalid-missing-namespace-value.src.js.shot | 7 +- ...nvalid-missing-spread-operator.src.js.shot | 7 +- ...alid-namespace-name-with-docts.src.js.shot | 7 +- ...alid-namespace-value-with-dots.src.js.shot | 7 +- ...-no-common-parent-with-comment.src.js.shot | 7 +- .../jsx/invalid-no-common-parent.src.js.shot | 7 +- .../jsx/invalid-no-tag-name.src.js.shot | 7 +- ...lid-placeholder-in-closing-tag.src.js.shot | 7 +- ...-shorthand-fragment-no-closing.src.js.shot | 7 +- .../invalid-trailing-dot-tag-name.src.js.shot | 7 +- .../jsx/invalid-unexpected-comma.src.js.shot | 7 +- .../jsx/member-expression-private.src.js.shot | 7 +- ...d-attribute-and-value-inserted.src.js.shot | 7 +- .../namespaced-name-and-attribute.src.js.shot | 7 +- .../jsx/newslines-and-entities.src.js.shot | 7 +- .../self-closing-tag-with-newline.src.js.shot | 7 +- ...jsx-member-expression-private.src.tsx.shot | 7 +- .../interface-with-no-body.src.ts.shot | 7 +- .../tools/tserror-serializer.ts | 10 +- 77 files changed, 886 insertions(+), 665 deletions(-) diff --git a/packages/typescript-estree/src/node-utils.ts b/packages/typescript-estree/src/node-utils.ts index 5a965f88ccf..eb88660fdfa 100644 --- a/packages/typescript-estree/src/node-utils.ts +++ b/packages/typescript-estree/src/node-utils.ts @@ -658,7 +658,6 @@ export class TSError extends Error { public readonly column: number, ) { super(message); - Object.setPrototypeOf(this, TSError.prototype); Object.defineProperty(this, 'name', { value: new.target.name, enumerable: false, 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 bbc279fd4c2..e5e4d1e16bf 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,43 +81,48 @@ 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`] = ` -[TSError: ';' expected. - "lineNumber": 1, +TSError { "column": 9, "index": 9, -] + "lineNumber": 1, + "message": "';' expected.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-not-arrow.src 1`] = ` -[TSError: Expression expected. - "lineNumber": 1, +TSError { "column": 26, "index": 26, -] + "lineNumber": 1, + "message": "Expression expected.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-numeric-param.src 1`] = ` -[TSError: ';' expected. - "lineNumber": 1, +TSError { "column": 5, "index": 5, -] + "lineNumber": 1, + "message": "';' expected.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-numeric-param-multi.src 1`] = ` -[TSError: ';' expected. - "lineNumber": 1, +TSError { "column": 9, "index": 9, -] + "lineNumber": 1, + "message": "';' expected.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-reverse-arrow.src 1`] = ` -[TSError: Expression expected. - "lineNumber": 1, +TSError { "column": 1, "index": 1, -] + "lineNumber": 1, + "message": "Expression expected.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-strict-default-param-eval.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; @@ -129,11 +134,12 @@ 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`] = ` -[TSError: Octal literals are not allowed in strict mode. - "lineNumber": 1, +TSError { "column": 21, "index": 21, -] + "lineNumber": 1, + "message": "Octal literals are not allowed in strict mode.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-strict-param-arguments.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; @@ -147,19 +153,21 @@ 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`] = ` -[TSError: Line terminator not permitted before arrow. - "lineNumber": 2, +TSError { "column": 1, "index": 12, -] + "lineNumber": 2, + "message": "Line terminator not permitted before arrow.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-wrapped-param.src 1`] = ` -[TSError: ';' expected. - "lineNumber": 1, +TSError { "column": 6, "index": 6, -] + "lineNumber": 1, + "message": "';' expected.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/expression.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; @@ -221,11 +229,12 @@ 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`] = ` -[TSError: ';' expected. - "lineNumber": 1, +TSError { "column": 4, "index": 4, -] + "lineNumber": 1, + "message": "';' expected.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/binaryLiterals/lowercase.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; @@ -293,11 +302,12 @@ 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`] = ` -[TSError: '{' expected. - "lineNumber": 2, +TSError { "column": 0, "index": 10, -] + "lineNumber": 2, + "message": "'{' expected.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/derived-class-assign-to-var.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; @@ -313,27 +323,30 @@ 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`] = ` -[TSError: A class declaration without the 'default' modifier must have a name. - "lineNumber": 1, +TSError { "column": 0, "index": 0, -] + "lineNumber": 1, + "message": "A class declaration without the 'default' modifier must have a name.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/invalid-class-setter-declaration.src 1`] = ` -[TSError: A 'set' accessor must have exactly one parameter. - "lineNumber": 1, +TSError { "column": 14, "index": 14, -] + "lineNumber": 1, + "message": "A 'set' accessor must have exactly one parameter.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/invalid-class-two-super-classes.src 1`] = ` -[TSError: Classes can only extend a single class. - "lineNumber": 1, +TSError { "column": 18, "index": 18, -] + "lineNumber": 1, + "message": "Classes can only extend a single class.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/named-class-expression.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; @@ -427,11 +440,12 @@ 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`] = ` -[TSError: The left-hand side of an assignment expression must be a variable or a property access. - "lineNumber": 1, +TSError { "column": 0, "index": 0, -] + "lineNumber": 1, + "message": "The left-hand side of an assignment expression must be a variable or a property access.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/named-param.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; @@ -511,29 +525,32 @@ 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`] = ` -[TSError: A rest element must be last in a destructuring pattern. - "lineNumber": 1, +TSError { "column": 1, "index": 1, -] + "lineNumber": 1, + "message": "A rest element must be last in a destructuring pattern.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-spread/invalid-not-final-array-empty.src 1`] = ` -[TSError: A rest parameter or binding pattern may not have a trailing comma. - "lineNumber": 1, +TSError { "column": 5, "index": 5, -] + "lineNumber": 1, + "message": "A rest parameter or binding pattern may not have a trailing comma.", +} `; 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`] = ` -[TSError: A rest element must be last in a destructuring pattern. - "lineNumber": 1, +TSError { "column": 1, "index": 1, -] + "lineNumber": 1, + "message": "A rest element must be last in a destructuring pattern.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-spread/single-destructured.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; @@ -571,11 +588,12 @@ 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`] = ` -[TSError: Dynamic import must have one specifier as an argument. - "lineNumber": 1, +TSError { "column": 7, "index": 7, -] + "lineNumber": 1, + "message": "Dynamic import must have one specifier as an argument.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalObjectRestSpread/arg-spread.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; @@ -585,19 +603,21 @@ 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`] = ` -[TSError: ',' expected. - "lineNumber": 1, +TSError { "column": 18, "index": 18, -] + "lineNumber": 1, + "message": "',' expected.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalObjectRestSpread/invalid-rest-trailing-comma.src 1`] = ` -[TSError: A rest parameter or binding pattern may not have a trailing comma. - "lineNumber": 1, +TSError { "column": 16, "index": 16, -] + "lineNumber": 1, + "message": "A rest parameter or binding pattern may not have a trailing comma.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalObjectRestSpread/object-rest.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; @@ -643,11 +663,12 @@ 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`] = ` -[TSError: ';' expected. - "lineNumber": 1, +TSError { "column": 14, "index": 14, -] + "lineNumber": 1, + "message": "';' expected.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forIn/for-in-object-with-body.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; @@ -673,11 +694,12 @@ 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`] = ` -[TSError: The variable declaration of a 'for...of' statement cannot have an initializer. - "lineNumber": 1, +TSError { "column": 9, "index": 9, -] + "lineNumber": 1, + "message": "The variable declaration of a 'for...of' statement cannot have an initializer.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forOf/for-of-with-rest.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; @@ -721,11 +743,12 @@ 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`] = ` -[TSError: ';' expected. - "lineNumber": 1, +TSError { "column": 4, "index": 4, -] + "lineNumber": 1, + "message": "';' expected.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/hexLiterals/lowercase.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; @@ -841,189 +864,212 @@ 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`] = ` -[TSError: 'from' expected. - "lineNumber": 2, +TSError { "column": 0, "index": 9, -] + "lineNumber": 2, + "message": "'from' expected.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-export-batch-token.src 1`] = ` -[TSError: 'from' expected. - "lineNumber": 1, +TSError { "column": 9, "index": 9, -] + "lineNumber": 1, + "message": "'from' expected.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-export-default.src 1`] = ` -[TSError: ';' expected. - "lineNumber": 1, +TSError { "column": 20, "index": 20, -] + "lineNumber": 1, + "message": "';' expected.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-export-default-equal.src 1`] = ` -[TSError: Expression expected. - "lineNumber": 1, +TSError { "column": 15, "index": 15, -] + "lineNumber": 1, + "message": "Expression expected.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-export-default-token.src 1`] = ` -[TSError: ';' expected. - "lineNumber": 1, +TSError { "column": 17, "index": 17, -] + "lineNumber": 1, + "message": "';' expected.", +} `; 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`] = ` -[TSError: Identifier expected. - "lineNumber": 1, +TSError { "column": 16, "index": 16, -] + "lineNumber": 1, + "message": "Identifier expected.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-export-named-middle-comma.src 1`] = ` -[TSError: Identifier expected. - "lineNumber": 1, +TSError { "column": 12, "index": 12, -] + "lineNumber": 1, + "message": "Identifier expected.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-default.src 1`] = ` -[TSError: Expression expected. - "lineNumber": 1, +TSError { "column": 7, "index": 7, -] + "lineNumber": 1, + "message": "Expression expected.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-default-after-named.src 1`] = ` -[TSError: 'from' expected. - "lineNumber": 1, +TSError { "column": 12, "index": 12, -] + "lineNumber": 1, + "message": "'from' expected.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-default-after-named-after-default.src 1`] = ` -[TSError: 'from' expected. - "lineNumber": 1, +TSError { "column": 17, "index": 17, -] + "lineNumber": 1, + "message": "'from' expected.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-default-missing-module-specifier.src 1`] = ` -[TSError: '=' expected. - "lineNumber": 2, +TSError { "column": 0, "index": 11, -] + "lineNumber": 2, + "message": "'=' expected.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-default-module-specifier.src 1`] = ` -[TSError: String literal expected. - "lineNumber": 1, +TSError { "column": 16, "index": 16, -] + "lineNumber": 1, + "message": "String literal expected.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-missing-module-specifier.src 1`] = ` -[TSError: 'from' expected. - "lineNumber": 2, +TSError { "column": 0, "index": 20, -] + "lineNumber": 2, + "message": "'from' expected.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-module-specifier.src 1`] = ` -[TSError: String literal expected. - "lineNumber": 1, +TSError { "column": 18, "index": 18, -] + "lineNumber": 1, + "message": "String literal expected.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-named-after-named.src 1`] = ` -[TSError: 'from' expected. - "lineNumber": 1, +TSError { "column": 12, "index": 12, -] + "lineNumber": 1, + "message": "'from' expected.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-named-after-namespace.src 1`] = ` -[TSError: 'from' expected. - "lineNumber": 1, +TSError { "column": 15, "index": 15, -] + "lineNumber": 1, + "message": "'from' expected.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-named-as-missing-from.src 1`] = ` -[TSError: 'from' expected. - "lineNumber": 2, +TSError { "column": 0, "index": 24, -] + "lineNumber": 2, + "message": "'from' expected.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-named-extra-comma.src 1`] = ` -[TSError: Identifier expected. - "lineNumber": 1, +TSError { "column": 16, "index": 16, -] + "lineNumber": 1, + "message": "Identifier expected.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-named-middle-comma.src 1`] = ` -[TSError: Identifier expected. - "lineNumber": 1, +TSError { "column": 12, "index": 12, -] + "lineNumber": 1, + "message": "Identifier expected.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-namespace-after-named.src 1`] = ` -[TSError: 'from' expected. - "lineNumber": 1, +TSError { "column": 12, "index": 12, -] + "lineNumber": 1, + "message": "'from' expected.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-namespace-missing-as.src 1`] = ` -[TSError: 'as' expected. - "lineNumber": 1, +TSError { "column": 9, "index": 9, -] + "lineNumber": 1, + "message": "'as' expected.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/newTarget/invalid-new-target.src 1`] = ` -[TSError: Meta-property 'new.target' is only allowed in the body of a function declaration, function expression, or constructor. - "lineNumber": 1, +TSError { "column": 8, "index": 8, -] + "lineNumber": 1, + "message": "Meta-property 'new.target' is only allowed in the body of a function declaration, function expression, or constructor.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/newTarget/invalid-unknown-property.src 1`] = ` -[TSError: 'unknown_property' is not a valid meta-property for keyword 'new'. Did you mean 'target'? - "lineNumber": 1, +TSError { "column": 25, "index": 25, -] + "lineNumber": 1, + "message": "'unknown_property' is not a valid meta-property for keyword 'new'. Did you mean 'target'?", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/newTarget/simple-new-target.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; @@ -1041,19 +1087,21 @@ 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`] = ` -[TSError: ':' expected. - "lineNumber": 3, +TSError { "column": 0, "index": 20, -] + "lineNumber": 3, + "message": "':' expected.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralComputedProperties/invalid-standalone-computed-variable-property.src 1`] = ` -[TSError: ':' expected. - "lineNumber": 1, +TSError { "column": 5, "index": 5, -] + "lineNumber": 1, + "message": "':' expected.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralComputedProperties/standalone-expression.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; @@ -1063,31 +1111,34 @@ 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`] = ` -[TSError: An object literal cannot have multiple properties with the same name in strict mode. - "lineNumber": 7, +TSError { "column": 1, "index": 62, -] + "lineNumber": 7, + "message": "An object literal cannot have multiple properties with the same name in strict mode.", +} `; 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`] = ` -[TSError: An object literal cannot have multiple properties with the same name in strict mode. - "lineNumber": 5, +TSError { "column": 1, "index": 39, -] + "lineNumber": 5, + "message": "An object literal cannot have multiple properties with the same name in strict mode.", +} `; 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`] = ` -[TSError: '{' expected. - "lineNumber": 2, +TSError { "column": 13, "index": 19, -] + "lineNumber": 2, + "message": "'{' expected.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralShorthandMethods/method-property.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; @@ -1107,19 +1158,21 @@ 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`] = ` -[TSError: ';' expected. - "lineNumber": 1, +TSError { "column": 4, "index": 4, -] + "lineNumber": 1, + "message": "';' expected.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/octalLiterals/legacy.src 1`] = ` -[TSError: Octal literals are not available when targeting ECMAScript 5 and higher. Use the syntax '0o2343'. - "lineNumber": 1, +TSError { "column": 0, "index": 0, -] + "lineNumber": 1, + "message": "Octal literals are not available when targeting ECMAScript 5 and higher. Use the syntax '0o2343'.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/octalLiterals/lowercase.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; @@ -1145,19 +1198,21 @@ 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`] = ` -[TSError: A rest parameter cannot have an initializer. - "lineNumber": 1, +TSError { "column": 17, "index": 17, -] + "lineNumber": 1, + "message": "A rest parameter cannot have an initializer.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/restParams/error-not-last.src 1`] = ` -[TSError: A rest parameter must be last in a parameter list. - "lineNumber": 1, +TSError { "column": 14, "index": 14, -] + "lineNumber": 1, + "message": "A rest parameter must be last in a parameter list.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/restParams/func-expression.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; @@ -1185,19 +1240,21 @@ 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`] = ` -[TSError: Expression expected. - "lineNumber": 1, +TSError { "column": 6, "index": 6, -] + "lineNumber": 1, + "message": "Expression expected.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/spread/error-invalid-sequence.src 1`] = ` -[TSError: Expression expected. - "lineNumber": 1, +TSError { "column": 4, "index": 4, -] + "lineNumber": 1, + "message": "Expression expected.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/spread/multi-function-call.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; @@ -1231,19 +1288,21 @@ 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`] = ` -[TSError: Hexadecimal digit expected. - "lineNumber": 1, +TSError { "column": 4, "index": 4, -] + "lineNumber": 1, + "message": "Hexadecimal digit expected.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/unicodeCodePointEscapes/invalid-too-large-escape.src 1`] = ` -[TSError: An extended Unicode escape value must be between 0x0 and 0x10FFFF inclusive. - "lineNumber": 1, +TSError { "column": 10, "index": 10, -] + "lineNumber": 1, + "message": "An extended Unicode escape value must be between 0x0 and 0x10FFFF inclusive.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/attributes.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; @@ -1257,11 +1316,12 @@ 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`] = ` -[TSError: '{' expected. - "lineNumber": 1, +TSError { "column": 16, "index": 16, -] + "lineNumber": 1, + "message": "'{' expected.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/empty-placeholder.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; @@ -1275,211 +1335,237 @@ 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`] = ` -[TSError: '{' expected. - "lineNumber": 1, +TSError { "column": 5, "index": 5, -] + "lineNumber": 1, + "message": "'{' expected.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-attribute-missing-equals.src 1`] = ` -[TSError: Identifier expected. - "lineNumber": 1, +TSError { "column": 14, "index": 14, -] + "lineNumber": 1, + "message": "Identifier expected.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-broken-tag.src 1`] = ` -[TSError: Unterminated string literal. - "lineNumber": 1, +TSError { "column": 12, "index": 12, -] + "lineNumber": 1, + "message": "Unterminated string literal.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-computed-end-tag-name.src 1`] = ` -[TSError: Identifier expected. - "lineNumber": 1, +TSError { "column": 2, "index": 2, -] + "lineNumber": 1, + "message": "Identifier expected.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-computed-string-end-tag-name.src 1`] = ` -[TSError: Identifier expected. - "lineNumber": 1, +TSError { "column": 2, "index": 2, -] + "lineNumber": 1, + "message": "Identifier expected.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-embedded-expression.src 1`] = ` -[TSError: '}' expected. - "lineNumber": 1, +TSError { "column": 9, "index": 9, -] + "lineNumber": 1, + "message": "'}' expected.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-leading-dot-tag-name.src 1`] = ` -[TSError: Expression expected. - "lineNumber": 1, +TSError { "column": 0, "index": 0, -] + "lineNumber": 1, + "message": "Expression expected.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-matching-placeholder-in-closing-tag.src 1`] = ` -[TSError: '>' expected. - "lineNumber": 1, +TSError { "column": 27, "index": 27, -] + "lineNumber": 1, + "message": "'>' expected.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-mismatched-closing-tag.src 1`] = ` -[TSError: Expected corresponding JSX closing tag for 'a'. - "lineNumber": 1, +TSError { "column": 3, "index": 3, -] + "lineNumber": 1, + "message": "Expected corresponding JSX closing tag for 'a'.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-mismatched-closing-tags.src 1`] = ` -[TSError: JSX element 'a' has no corresponding closing tag. - "lineNumber": 1, +TSError { "column": 1, "index": 1, -] + "lineNumber": 1, + "message": "JSX element 'a' has no corresponding closing tag.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-mismatched-dot-tag-name.src 1`] = ` -[TSError: Expected corresponding JSX closing tag for 'a.b.c'. - "lineNumber": 1, +TSError { "column": 7, "index": 7, -] + "lineNumber": 1, + "message": "Expected corresponding JSX closing tag for 'a.b.c'.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-mismatched-namespace-tag.src 1`] = ` -[TSError: Identifier expected. - "lineNumber": 1, +TSError { "column": 2, "index": 2, -] + "lineNumber": 1, + "message": "Identifier expected.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-missing-closing-tag.src 1`] = ` -[TSError: JSX element 'a' has no corresponding closing tag. - "lineNumber": 1, +TSError { "column": 1, "index": 1, -] + "lineNumber": 1, + "message": "JSX element 'a' has no corresponding closing tag.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-missing-closing-tag-attribute-placeholder.src 1`] = ` -[TSError: JSX element 'a' has no corresponding closing tag. - "lineNumber": 1, +TSError { "column": 1, "index": 1, -] + "lineNumber": 1, + "message": "JSX element 'a' has no corresponding closing tag.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-missing-namespace-name.src 1`] = ` -[TSError: Expression expected. - "lineNumber": 1, +TSError { "column": 0, "index": 0, -] + "lineNumber": 1, + "message": "Expression expected.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-missing-namespace-value.src 1`] = ` -[TSError: Identifier expected. - "lineNumber": 1, +TSError { "column": 2, "index": 2, -] + "lineNumber": 1, + "message": "Identifier expected.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-missing-spread-operator.src 1`] = ` -[TSError: '...' expected. - "lineNumber": 1, +TSError { "column": 6, "index": 6, -] + "lineNumber": 1, + "message": "'...' expected.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-namespace-name-with-docts.src 1`] = ` -[TSError: Identifier expected. - "lineNumber": 1, +TSError { "column": 4, "index": 4, -] + "lineNumber": 1, + "message": "Identifier expected.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-namespace-value-with-dots.src 1`] = ` -[TSError: Identifier expected. - "lineNumber": 1, +TSError { "column": 2, "index": 2, -] + "lineNumber": 1, + "message": "Identifier expected.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-no-common-parent.src 1`] = ` -[TSError: JSX expressions must have one parent element. - "lineNumber": 1, +TSError { "column": 8, "index": 8, -] + "lineNumber": 1, + "message": "JSX expressions must have one parent element.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-no-common-parent-with-comment.src 1`] = ` -[TSError: JSX expressions must have one parent element. - "lineNumber": 1, +TSError { "column": 8, "index": 8, -] + "lineNumber": 1, + "message": "JSX expressions must have one parent element.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-no-tag-name.src 1`] = ` -[TSError: Declaration or statement expected. - "lineNumber": 1, +TSError { "column": 0, "index": 0, -] + "lineNumber": 1, + "message": "Declaration or statement expected.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-placeholder-in-closing-tag.src 1`] = ` -[TSError: '>' expected. - "lineNumber": 1, +TSError { "column": 16, "index": 16, -] + "lineNumber": 1, + "message": "'>' expected.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-shorthand-fragment-no-closing.src 1`] = ` -[TSError: JSX fragment has no corresponding closing tag. - "lineNumber": 1, +TSError { "column": 0, "index": 0, -] + "lineNumber": 1, + "message": "JSX fragment has no corresponding closing tag.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-trailing-dot-tag-name.src 1`] = ` -[TSError: Identifier expected. - "lineNumber": 1, +TSError { "column": 3, "index": 3, -] + "lineNumber": 1, + "message": "Identifier expected.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-unexpected-comma.src 1`] = ` -[TSError: Identifier expected. - "lineNumber": 1, +TSError { "column": 19, "index": 19, -] + "lineNumber": 1, + "message": "Identifier expected.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/japanese-characters.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; @@ -1489,11 +1575,12 @@ 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`] = ` -[TSError: Identifier expected. - "lineNumber": 1, +TSError { "column": 10, "index": 10, -] + "lineNumber": 1, + "message": "Identifier expected.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/member-expression-this.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; @@ -1501,27 +1588,30 @@ 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`] = ` -[TSError: Identifier expected. - "lineNumber": 1, +TSError { "column": 4, "index": 4, -] + "lineNumber": 1, + "message": "Identifier expected.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/namespaced-name-and-attribute.src 1`] = ` -[TSError: Identifier expected. - "lineNumber": 1, +TSError { "column": 2, "index": 2, -] + "lineNumber": 1, + "message": "Identifier expected.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/newslines-and-entities.src 1`] = ` -[TSError: Invalid character. - "lineNumber": 1, +TSError { "column": 8, "index": 8, -] + "lineNumber": 1, + "message": "Invalid character.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/self-closing-tag.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; @@ -1529,11 +1619,12 @@ 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`] = ` -[TSError: Invalid character. - "lineNumber": 1, +TSError { "column": 2, "index": 2, -] + "lineNumber": 1, + "message": "Invalid character.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/shorthand-fragment.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; @@ -1563,11 +1654,12 @@ 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`] = ` -[TSError: Identifier expected. - "lineNumber": 1, +TSError { "column": 22, "index": 22, -] + "lineNumber": 1, + "message": "Identifier expected.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/tsx/generic-jsx-opening-element.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; @@ -1579,11 +1671,12 @@ 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`] = ` -[TSError: 'abstract' modifier can only appear on a class, method, or property declaration. - "lineNumber": 2, +TSError { "column": 4, "index": 43, -] + "lineNumber": 2, + "message": "'abstract' modifier can only appear on a class, method, or property declaration.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/abstract-class-with-abstract-method.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; @@ -1593,11 +1686,12 @@ 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`] = ` -[TSError: 'abstract' modifier can only appear on a class, method, or property declaration. - "lineNumber": 2, +TSError { "column": 2, "index": 41, -] + "lineNumber": 2, + "message": "'abstract' modifier can only appear on a class, method, or property declaration.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/abstract-class-with-declare-properties.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; @@ -1605,11 +1699,12 @@ 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`] = ` -[TSError: 'abstract' modifier can only appear on a class, method, or property declaration. - "lineNumber": 1, +TSError { "column": 7, "index": 7, -] + "lineNumber": 1, + "message": "'abstract' modifier can only appear on a class, method, or property declaration.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/angle-bracket-type-assertion.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; @@ -1625,11 +1720,12 @@ 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`] = ` -[TSError: 'await' expressions are only allowed within async functions and at the top levels of modules. - "lineNumber": 2, +TSError { "column": 14, "index": 31, -] + "lineNumber": 2, + "message": "'await' expressions are only allowed within async functions and at the top levels of modules.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/call-signatures.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; @@ -1649,11 +1745,12 @@ 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`] = ` -[TSError: Catch clause variable type annotation must be 'any' or 'unknown' if specified. - "lineNumber": 3, +TSError { "column": 12, "index": 19, -] + "lineNumber": 3, + "message": "Catch clause variable type annotation must be 'any' or 'unknown' if specified.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-multi-line-keyword-abstract.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; @@ -1673,11 +1770,12 @@ 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`] = ` -[TSError: 'export' modifier cannot appear on a parameter. - "lineNumber": 2, +TSError { "column": 16, "index": 28, -] + "lineNumber": 2, + "message": "'export' modifier cannot appear on a parameter.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-extends-and-implements.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; @@ -1693,11 +1791,12 @@ 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`] = ` -[TSError: 'extends' clause must precede 'implements' clause. - "lineNumber": 1, +TSError { "column": 57, "index": 57, -] + "lineNumber": 1, + "message": "'extends' clause must precede 'implements' clause.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-implements-generic.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; @@ -1735,11 +1834,12 @@ 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`] = ` -[TSError: 'static' modifier cannot appear on a parameter. - "lineNumber": 2, +TSError { "column": 16, "index": 28, -] + "lineNumber": 2, + "message": "'static' modifier cannot appear on a parameter.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-two-methods-computed-constructor.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; @@ -1791,21 +1891,23 @@ 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`] = ` -[TSError: An enum member cannot have a numeric name. - "lineNumber": 2, +TSError { "column": 4, "index": 22, -] + "lineNumber": 2, + "message": "An enum member cannot have a numeric name.", +} `; 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`] = ` -[TSError: Computed property names are not allowed in enums. - "lineNumber": 2, +TSError { "column": 4, "index": 22, -] + "lineNumber": 2, + "message": "Computed property names are not allowed in enums.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/export-star-as-ns-from.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; @@ -1869,11 +1971,12 @@ 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`] = ` -[TSError: A parameter property is only allowed in a constructor implementation. - "lineNumber": 2, +TSError { "column": 9, "index": 26, -] + "lineNumber": 2, + "message": "A parameter property is only allowed in a constructor implementation.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/interface-with-extends-member-expression.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; @@ -1901,11 +2004,12 @@ 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`] = ` -[TSError: Meta-property 'new.target' is only allowed in the body of a function declaration, function expression, or constructor. - "lineNumber": 1, +TSError { "column": 16, "index": 16, -] + "lineNumber": 1, + "message": "Meta-property 'new.target' is only allowed in the body of a function declaration, function expression, or constructor.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/non-null-assertion-operator.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; @@ -2103,343 +2207,385 @@ 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`] = ` -[TSError: 'extends' list cannot be empty. - "lineNumber": 1, +TSError { "column": 17, "index": 17, -] + "lineNumber": 1, + "message": "'extends' list cannot be empty.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/class-empty-extends-implements.src 1`] = ` -[TSError: 'extends' list cannot be empty. - "lineNumber": 1, +TSError { "column": 17, "index": 17, -] + "lineNumber": 1, + "message": "'extends' list cannot be empty.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/class-extends-empty-implements.src 1`] = ` -[TSError: 'implements' list cannot be empty. - "lineNumber": 1, +TSError { "column": 32, "index": 32, -] + "lineNumber": 1, + "message": "'implements' list cannot be empty.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/class-multiple-implements.src 1`] = ` -[TSError: 'implements' clause already seen. - "lineNumber": 1, +TSError { "column": 21, "index": 21, -] + "lineNumber": 1, + "message": "'implements' clause already seen.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/decorator-on-enum-declaration.src 1`] = ` -[TSError: Decorators are not valid here. - "lineNumber": 1, +TSError { "column": 0, "index": 0, -] + "lineNumber": 1, + "message": "Decorators are not valid here.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/decorator-on-function.src 1`] = ` -[TSError: Decorators are not valid here. - "lineNumber": 1, +TSError { "column": 0, "index": 0, -] + "lineNumber": 1, + "message": "Decorators are not valid here.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/decorator-on-interface-declaration.src 1`] = ` -[TSError: Decorators are not valid here. - "lineNumber": 1, +TSError { "column": 0, "index": 0, -] + "lineNumber": 1, + "message": "Decorators are not valid here.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/decorator-on-variable.src 1`] = ` -[TSError: Decorators are not valid here. - "lineNumber": 1, +TSError { "column": 0, "index": 0, -] + "lineNumber": 1, + "message": "Decorators are not valid here.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/empty-type-arguments.src 1`] = ` -[TSError: Type argument list cannot be empty. - "lineNumber": 1, +TSError { "column": 14, "index": 14, -] + "lineNumber": 1, + "message": "Type argument list cannot be empty.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/empty-type-arguments-in-call-expression.src 1`] = ` -[TSError: Type argument list cannot be empty. - "lineNumber": 1, +TSError { "column": 3, "index": 3, -] + "lineNumber": 1, + "message": "Type argument list cannot be empty.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/empty-type-arguments-in-new-expression.src 1`] = ` -[TSError: Type argument list cannot be empty. - "lineNumber": 1, +TSError { "column": 7, "index": 7, -] + "lineNumber": 1, + "message": "Type argument list cannot be empty.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/empty-type-parameters.src 1`] = ` -[TSError: Type parameter list cannot be empty. - "lineNumber": 1, +TSError { "column": 11, "index": 11, -] + "lineNumber": 1, + "message": "Type parameter list cannot be empty.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/empty-type-parameters-in-arrow-function.src 1`] = ` -[TSError: Type parameter list cannot be empty. - "lineNumber": 1, +TSError { "column": 11, "index": 11, -] + "lineNumber": 1, + "message": "Type parameter list cannot be empty.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/empty-type-parameters-in-constructor.src 1`] = ` -[TSError: Type parameter list cannot be empty. - "lineNumber": 2, +TSError { "column": 13, "index": 25, -] + "lineNumber": 2, + "message": "Type parameter list cannot be empty.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/empty-type-parameters-in-function-expression.src 1`] = ` -[TSError: Type parameter list cannot be empty. - "lineNumber": 1, +TSError { "column": 20, "index": 20, -] + "lineNumber": 1, + "message": "Type parameter list cannot be empty.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/empty-type-parameters-in-method.src 1`] = ` -[TSError: Type parameter list cannot be empty. - "lineNumber": 2, +TSError { "column": 6, "index": 18, -] + "lineNumber": 2, + "message": "Type parameter list cannot be empty.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/empty-type-parameters-in-method-signature.src 1`] = ` -[TSError: Type parameter list cannot be empty. - "lineNumber": 2, +TSError { "column": 6, "index": 22, -] + "lineNumber": 2, + "message": "Type parameter list cannot be empty.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/enum-with-keywords.src 1`] = ` -[TSError: 'private' modifier cannot appear on a module or namespace element. - "lineNumber": 1, +TSError { "column": 7, "index": 7, -] + "lineNumber": 1, + "message": "'private' modifier cannot appear on a module or namespace element.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/index-signature-parameters.src 1`] = ` -[TSError: An index signature must have exactly one parameter. - "lineNumber": 2, +TSError { "column": 3, "index": 16, -] + "lineNumber": 2, + "message": "An index signature must have exactly one parameter.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-empty-extends.src 1`] = ` -[TSError: 'extends' list cannot be empty. - "lineNumber": 1, +TSError { "column": 21, "index": 21, -] + "lineNumber": 1, + "message": "'extends' list cannot be empty.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-implements.src 1`] = ` -[TSError: Interface declaration cannot have 'implements' clause. - "lineNumber": 1, +TSError { "column": 12, "index": 12, -] + "lineNumber": 1, + "message": "Interface declaration cannot have 'implements' clause.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-index-signature-export.src 1`] = ` -[TSError: 'export' modifier cannot appear on an index signature. - "lineNumber": 2, +TSError { "column": 2, "index": 18, -] + "lineNumber": 2, + "message": "'export' modifier cannot appear on an index signature.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-index-signature-private.src 1`] = ` -[TSError: 'private' modifier cannot appear on an index signature. - "lineNumber": 2, +TSError { "column": 2, "index": 18, -] + "lineNumber": 2, + "message": "'private' modifier cannot appear on an index signature.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-index-signature-protected.src 1`] = ` -[TSError: 'protected' modifier cannot appear on an index signature. - "lineNumber": 2, +TSError { "column": 2, "index": 18, -] + "lineNumber": 2, + "message": "'protected' modifier cannot appear on an index signature.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-index-signature-public.src 1`] = ` -[TSError: 'public' modifier cannot appear on an index signature. - "lineNumber": 2, +TSError { "column": 2, "index": 18, -] + "lineNumber": 2, + "message": "'public' modifier cannot appear on an index signature.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-index-signature-static.src 1`] = ` -[TSError: 'static' modifier cannot appear on an index signature. - "lineNumber": 2, +TSError { "column": 2, "index": 18, -] + "lineNumber": 2, + "message": "'static' modifier cannot appear on an index signature.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-method-export.src 1`] = ` -[TSError: 'export' modifier cannot appear on a type member. - "lineNumber": 2, +TSError { "column": 4, "index": 20, -] + "lineNumber": 2, + "message": "'export' modifier cannot appear on a type member.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-method-private.src 1`] = ` -[TSError: 'private' modifier cannot appear on a type member. - "lineNumber": 2, +TSError { "column": 4, "index": 20, -] + "lineNumber": 2, + "message": "'private' modifier cannot appear on a type member.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-method-protected.src 1`] = ` -[TSError: 'protected' modifier cannot appear on a type member. - "lineNumber": 2, +TSError { "column": 2, "index": 18, -] + "lineNumber": 2, + "message": "'protected' modifier cannot appear on a type member.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-method-public.src 1`] = ` -[TSError: 'public' modifier cannot appear on a type member. - "lineNumber": 2, +TSError { "column": 4, "index": 20, -] + "lineNumber": 2, + "message": "'public' modifier cannot appear on a type member.", +} `; 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`] = ` -[TSError: 'static' modifier cannot appear on a type member. - "lineNumber": 2, +TSError { "column": 2, "index": 18, -] + "lineNumber": 2, + "message": "'static' modifier cannot appear on a type member.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-multiple-extends.src 1`] = ` -[TSError: 'extends' clause already seen. - "lineNumber": 1, +TSError { "column": 26, "index": 26, -] + "lineNumber": 1, + "message": "'extends' clause already seen.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-property-export.src 1`] = ` -[TSError: 'export' modifier cannot appear on a type member. - "lineNumber": 2, +TSError { "column": 2, "index": 18, -] + "lineNumber": 2, + "message": "'export' modifier cannot appear on a type member.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-property-private.src 1`] = ` -[TSError: 'private' modifier cannot appear on a type member. - "lineNumber": 2, +TSError { "column": 2, "index": 18, -] + "lineNumber": 2, + "message": "'private' modifier cannot appear on a type member.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-property-protected.src 1`] = ` -[TSError: 'protected' modifier cannot appear on a type member. - "lineNumber": 2, +TSError { "column": 2, "index": 18, -] + "lineNumber": 2, + "message": "'protected' modifier cannot appear on a type member.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-property-public.src 1`] = ` -[TSError: 'public' modifier cannot appear on a type member. - "lineNumber": 2, +TSError { "column": 4, "index": 20, -] + "lineNumber": 2, + "message": "'public' modifier cannot appear on a type member.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-property-static.src 1`] = ` -[TSError: 'static' modifier cannot appear on a type member. - "lineNumber": 2, +TSError { "column": 2, "index": 18, -] + "lineNumber": 2, + "message": "'static' modifier cannot appear on a type member.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-property-with-default-value.src 1`] = ` -[TSError: An interface property cannot have an initializer. - "lineNumber": 2, +TSError { "column": 16, "index": 32, -] + "lineNumber": 2, + "message": "An interface property cannot have an initializer.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-with-no-body.src 1`] = ` -[TSError: '{' expected. - "lineNumber": 2, +TSError { "column": 0, "index": 14, -] + "lineNumber": 2, + "message": "'{' expected.", +} `; 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`] = ` -[TSError: A definite assignment assertion '!' is not permitted in this context. - "lineNumber": 1, +TSError { "column": 3, "index": 3, -] + "lineNumber": 1, + "message": "A definite assignment assertion '!' is not permitted in this context.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/object-optional-not-allowed.src 1`] = ` -[TSError: An object member cannot be declared optional. - "lineNumber": 1, +TSError { "column": 3, "index": 3, -] + "lineNumber": 1, + "message": "An object member cannot be declared optional.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/solo-const.src 1`] = ` -[TSError: Variable declaration list cannot be empty. - "lineNumber": 1, +TSError { "column": 5, "index": 5, -] + "lineNumber": 1, + "message": "Variable declaration list cannot be empty.", +} `; exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/expressions/call-expression-type-arguments.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; 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 e502c890caa..0ac39c77fa9 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript arrowFunctions error-missing-paren.src 1`] = ` -[TSError: ';' expected. - "lineNumber": 1, +TSError { "column": 9, "index": 9, -] + "lineNumber": 1, + "message": "';' expected.", +} `; 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 dd6649bc32e..ccca762cfac 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript arrowFunctions error-not-arrow.src 1`] = ` -[TSError: Expression expected. - "lineNumber": 1, +TSError { "column": 26, "index": 26, -] + "lineNumber": 1, + "message": "Expression expected.", +} `; 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 9885cef88ac..a6309f29f7a 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript arrowFunctions error-numeric-param-multi.src 1`] = ` -[TSError: ';' expected. - "lineNumber": 1, +TSError { "column": 9, "index": 9, -] + "lineNumber": 1, + "message": "';' expected.", +} `; 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 da1b45760d4..00a6318c84e 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript arrowFunctions error-numeric-param.src 1`] = ` -[TSError: ';' expected. - "lineNumber": 1, +TSError { "column": 5, "index": 5, -] + "lineNumber": 1, + "message": "';' expected.", +} `; 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 6b8cb8e4e86..2b010cb8480 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript arrowFunctions error-reverse-arrow.src 1`] = ` -[TSError: Expression expected. - "lineNumber": 1, +TSError { "column": 1, "index": 1, -] + "lineNumber": 1, + "message": "Expression expected.", +} `; 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 a216e6d17de..921faeae08b 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript arrowFunctions error-wrapped-param.src 1`] = ` -[TSError: ';' expected. - "lineNumber": 1, +TSError { "column": 6, "index": 6, -] + "lineNumber": 1, + "message": "';' expected.", +} `; 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 70173d74a90..a65dcc90f69 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript binaryLiterals invalid.src 1`] = ` -[TSError: ';' expected. - "lineNumber": 1, +TSError { "column": 4, "index": 4, -] + "lineNumber": 1, + "message": "';' expected.", +} `; 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 15ed845fb8a..b92aba616eb 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript classes class-with-no-body.src 1`] = ` -[TSError: '{' expected. - "lineNumber": 2, +TSError { "column": 0, "index": 10, -] + "lineNumber": 2, + "message": "'{' expected.", +} `; 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 6c65bc233aa..71e4b3acbbb 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript classes invalid-class-two-super-classes.src 1`] = ` -[TSError: Classes can only extend a single class. - "lineNumber": 1, +TSError { "column": 18, "index": 18, -] + "lineNumber": 1, + "message": "Classes can only extend a single class.", +} `; 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 02bfd4ae36b..6eab5338468 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript experimentalDynamicImport error-dynamic-import-params.src 1`] = ` -[TSError: Dynamic import must have one specifier as an argument. - "lineNumber": 1, +TSError { "column": 7, "index": 7, -] + "lineNumber": 1, + "message": "Dynamic import must have one specifier as an argument.", +} `; 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 4e77403916d..79ebf6dc533 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript experimentalObjectRestSpread invalid-rest.src 1`] = ` -[TSError: ',' expected. - "lineNumber": 1, +TSError { "column": 18, "index": 18, -] + "lineNumber": 1, + "message": "',' expected.", +} `; 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 4e19d3f1563..f1d2b3dbc4a 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript forIn for-in-object.src 1`] = ` -[TSError: ';' expected. - "lineNumber": 1, +TSError { "column": 14, "index": 14, -] + "lineNumber": 1, + "message": "';' expected.", +} `; 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 540b6906d48..1095e6d6c8e 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript hexLiterals invalid.src 1`] = ` -[TSError: ';' expected. - "lineNumber": 1, +TSError { "column": 4, "index": 4, -] + "lineNumber": 1, + "message": "';' expected.", +} `; 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 42f9313d4df..ae346cd3c57 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript modules invalid-export-batch-missing-from-clause.src 1`] = ` -[TSError: 'from' expected. - "lineNumber": 2, +TSError { "column": 0, "index": 9, -] + "lineNumber": 2, + "message": "'from' expected.", +} `; 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 f234b75aa01..5a05ea68acb 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript modules invalid-export-batch-token.src 1`] = ` -[TSError: 'from' expected. - "lineNumber": 1, +TSError { "column": 9, "index": 9, -] + "lineNumber": 1, + "message": "'from' expected.", +} `; 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 ae375c82b74..ee8455cff2e 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript modules invalid-export-default-equal.src 1`] = ` -[TSError: Expression expected. - "lineNumber": 1, +TSError { "column": 15, "index": 15, -] + "lineNumber": 1, + "message": "Expression expected.", +} `; 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 898cf15ff59..68613dac12a 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript modules invalid-export-default-token.src 1`] = ` -[TSError: ';' expected. - "lineNumber": 1, +TSError { "column": 17, "index": 17, -] + "lineNumber": 1, + "message": "';' expected.", +} `; 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 e34dc7c4bd2..aa02d1b56fc 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript modules invalid-export-default.src 1`] = ` -[TSError: ';' expected. - "lineNumber": 1, +TSError { "column": 20, "index": 20, -] + "lineNumber": 1, + "message": "';' expected.", +} `; 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 8bd1eaf46b4..143a7bd5494 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript modules invalid-export-named-extra-comma.src 1`] = ` -[TSError: Identifier expected. - "lineNumber": 1, +TSError { "column": 16, "index": 16, -] + "lineNumber": 1, + "message": "Identifier expected.", +} `; 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 745a5ab7c8e..b4f8f3d9872 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript modules invalid-export-named-middle-comma.src 1`] = ` -[TSError: Identifier expected. - "lineNumber": 1, +TSError { "column": 12, "index": 12, -] + "lineNumber": 1, + "message": "Identifier expected.", +} `; 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 554b8b7a4fc..fdb5bd5d6bd 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript modules invalid-import-default-after-named-after-default.src 1`] = ` -[TSError: 'from' expected. - "lineNumber": 1, +TSError { "column": 17, "index": 17, -] + "lineNumber": 1, + "message": "'from' expected.", +} `; 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 b4121b01d09..756a15c8851 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript modules invalid-import-default-after-named.src 1`] = ` -[TSError: 'from' expected. - "lineNumber": 1, +TSError { "column": 12, "index": 12, -] + "lineNumber": 1, + "message": "'from' expected.", +} `; 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 d80e9b93ad0..95e60f66c12 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript modules invalid-import-default-missing-module-specifier.src 1`] = ` -[TSError: '=' expected. - "lineNumber": 2, +TSError { "column": 0, "index": 11, -] + "lineNumber": 2, + "message": "'=' expected.", +} `; 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 db5bf3a34e4..a15834eebdc 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript modules invalid-import-default.src 1`] = ` -[TSError: Expression expected. - "lineNumber": 1, +TSError { "column": 7, "index": 7, -] + "lineNumber": 1, + "message": "Expression expected.", +} `; 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 54093474de0..adeb29427a9 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript modules invalid-import-missing-module-specifier.src 1`] = ` -[TSError: 'from' expected. - "lineNumber": 2, +TSError { "column": 0, "index": 20, -] + "lineNumber": 2, + "message": "'from' expected.", +} `; 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 10532efb24f..2205d06adcb 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript modules invalid-import-named-after-named.src 1`] = ` -[TSError: 'from' expected. - "lineNumber": 1, +TSError { "column": 12, "index": 12, -] + "lineNumber": 1, + "message": "'from' expected.", +} `; 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 dcfa7d688b9..a6adaddba9e 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript modules invalid-import-named-after-namespace.src 1`] = ` -[TSError: 'from' expected. - "lineNumber": 1, +TSError { "column": 15, "index": 15, -] + "lineNumber": 1, + "message": "'from' expected.", +} `; 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 d01909959cc..e49ff4b519d 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript modules invalid-import-named-as-missing-from.src 1`] = ` -[TSError: 'from' expected. - "lineNumber": 2, +TSError { "column": 0, "index": 24, -] + "lineNumber": 2, + "message": "'from' expected.", +} `; 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 05148e20a42..602373b73e6 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript modules invalid-import-named-extra-comma.src 1`] = ` -[TSError: Identifier expected. - "lineNumber": 1, +TSError { "column": 16, "index": 16, -] + "lineNumber": 1, + "message": "Identifier expected.", +} `; 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 7aa15ca5f0d..cac59c05280 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript modules invalid-import-named-middle-comma.src 1`] = ` -[TSError: Identifier expected. - "lineNumber": 1, +TSError { "column": 12, "index": 12, -] + "lineNumber": 1, + "message": "Identifier expected.", +} `; 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 80a240cc680..b5b5e09f82b 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript modules invalid-import-namespace-after-named.src 1`] = ` -[TSError: 'from' expected. - "lineNumber": 1, +TSError { "column": 12, "index": 12, -] + "lineNumber": 1, + "message": "'from' expected.", +} `; 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 26b6fcfe035..ccd1659afe4 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript modules invalid-import-namespace-missing-as.src 1`] = ` -[TSError: 'as' expected. - "lineNumber": 1, +TSError { "column": 9, "index": 9, -] + "lineNumber": 1, + "message": "'as' expected.", +} `; 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 b815f23e5a2..b70c46baf0a 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript objectLiteralComputedProperties invalid-computed-variable-property.src 1`] = ` -[TSError: ':' expected. - "lineNumber": 3, +TSError { "column": 0, "index": 20, -] + "lineNumber": 3, + "message": "':' expected.", +} `; 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 0051189dbcf..3431838086b 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript objectLiteralComputedProperties invalid-standalone-computed-variable-property.src 1`] = ` -[TSError: ':' expected. - "lineNumber": 1, +TSError { "column": 5, "index": 5, -] + "lineNumber": 1, + "message": "':' expected.", +} `; 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 b4388fe76c1..14d3993f83b 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript objectLiteralShorthandMethods invalid-method-no-braces.src 1`] = ` -[TSError: '{' expected. - "lineNumber": 2, +TSError { "column": 13, "index": 19, -] + "lineNumber": 2, + "message": "'{' expected.", +} `; 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 fe4a77826c5..40818b0aef6 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript octalLiterals invalid.src 1`] = ` -[TSError: ';' expected. - "lineNumber": 1, +TSError { "column": 4, "index": 4, -] + "lineNumber": 1, + "message": "';' expected.", +} `; 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 ab738c0df41..f80801010e1 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript spread error-invalid-if.src 1`] = ` -[TSError: Expression expected. - "lineNumber": 1, +TSError { "column": 6, "index": 6, -] + "lineNumber": 1, + "message": "Expression expected.", +} `; 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 d6dfaa018ad..2606eea3403 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript spread error-invalid-sequence.src 1`] = ` -[TSError: Expression expected. - "lineNumber": 1, +TSError { "column": 4, "index": 4, -] + "lineNumber": 1, + "message": "Expression expected.", +} `; 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 90cbd7d3dcb..7d4d1d1a6bd 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript unicodeCodePointEscapes invalid-empty-escape.src 1`] = ` -[TSError: Hexadecimal digit expected. - "lineNumber": 1, +TSError { "column": 4, "index": 4, -] + "lineNumber": 1, + "message": "Hexadecimal digit expected.", +} `; 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 314fbfed290..b5e8902e41d 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`javascript unicodeCodePointEscapes invalid-too-large-escape.src 1`] = ` -[TSError: An extended Unicode escape value must be between 0x0 and 0x10FFFF inclusive. - "lineNumber": 1, +TSError { "column": 10, "index": 10, -] + "lineNumber": 1, + "message": "An extended Unicode escape value must be between 0x0 and 0x10FFFF inclusive.", +} `; 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 cbedec55dcd..d778d382e99 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`jsx embedded-tags.src 1`] = ` -[TSError: '{' expected. - "lineNumber": 1, +TSError { "column": 16, "index": 16, -] + "lineNumber": 1, + "message": "'{' expected.", +} `; 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 e90b1ac200d..312d414ac20 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`jsx invalid-attribute-missing-equals.src 1`] = ` -[TSError: Identifier expected. - "lineNumber": 1, +TSError { "column": 14, "index": 14, -] + "lineNumber": 1, + "message": "Identifier expected.", +} `; 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 70112b41caa..b0eaf47f8e9 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`jsx invalid-attribute.src 1`] = ` -[TSError: '{' expected. - "lineNumber": 1, +TSError { "column": 5, "index": 5, -] + "lineNumber": 1, + "message": "'{' expected.", +} `; 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 b5b798e4af3..f04a7143059 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`jsx invalid-broken-tag.src 1`] = ` -[TSError: Unterminated string literal. - "lineNumber": 1, +TSError { "column": 12, "index": 12, -] + "lineNumber": 1, + "message": "Unterminated string literal.", +} `; 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 f24b770accc..4e6aab21478 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`jsx invalid-computed-end-tag-name.src 1`] = ` -[TSError: Identifier expected. - "lineNumber": 1, +TSError { "column": 2, "index": 2, -] + "lineNumber": 1, + "message": "Identifier expected.", +} `; 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 a8fbf24eaf4..d6ebfad1a33 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`jsx invalid-computed-string-end-tag-name.src 1`] = ` -[TSError: Identifier expected. - "lineNumber": 1, +TSError { "column": 2, "index": 2, -] + "lineNumber": 1, + "message": "Identifier expected.", +} `; 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 97b9a4905e1..b100da149e8 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`jsx invalid-embedded-expression.src 1`] = ` -[TSError: '}' expected. - "lineNumber": 1, +TSError { "column": 9, "index": 9, -] + "lineNumber": 1, + "message": "'}' expected.", +} `; 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 235b8944bed..57a4e46ab9d 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`jsx invalid-leading-dot-tag-name.src 1`] = ` -[TSError: Expression expected. - "lineNumber": 1, +TSError { "column": 0, "index": 0, -] + "lineNumber": 1, + "message": "Expression expected.", +} `; 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 4e2fed63ec8..0109dd78aee 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`jsx invalid-matching-placeholder-in-closing-tag.src 1`] = ` -[TSError: '>' expected. - "lineNumber": 1, +TSError { "column": 27, "index": 27, -] + "lineNumber": 1, + "message": "'>' expected.", +} `; 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 8d49cc3d396..a35f3afd715 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`jsx invalid-mismatched-closing-tag.src 1`] = ` -[TSError: Expected corresponding JSX closing tag for 'a'. - "lineNumber": 1, +TSError { "column": 3, "index": 3, -] + "lineNumber": 1, + "message": "Expected corresponding JSX closing tag for 'a'.", +} `; 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 d84e8f56d7f..911494689a4 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`jsx invalid-mismatched-closing-tags.src 1`] = ` -[TSError: JSX element 'a' has no corresponding closing tag. - "lineNumber": 1, +TSError { "column": 1, "index": 1, -] + "lineNumber": 1, + "message": "JSX element 'a' has no corresponding closing tag.", +} `; 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 1589e24b6cd..77d7e4187c3 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`jsx invalid-mismatched-dot-tag-name.src 1`] = ` -[TSError: Expected corresponding JSX closing tag for 'a.b.c'. - "lineNumber": 1, +TSError { "column": 7, "index": 7, -] + "lineNumber": 1, + "message": "Expected corresponding JSX closing tag for 'a.b.c'.", +} `; 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 1c8d6416b0d..b466cc6ba4c 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`jsx invalid-mismatched-namespace-tag.src 1`] = ` -[TSError: Identifier expected. - "lineNumber": 1, +TSError { "column": 2, "index": 2, -] + "lineNumber": 1, + "message": "Identifier expected.", +} `; 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 032ed007613..80d75f36ba2 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`jsx invalid-missing-closing-tag-attribute-placeholder.src 1`] = ` -[TSError: JSX element 'a' has no corresponding closing tag. - "lineNumber": 1, +TSError { "column": 1, "index": 1, -] + "lineNumber": 1, + "message": "JSX element 'a' has no corresponding closing tag.", +} `; 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 b36e4d1fb72..56f8c0d6ae3 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`jsx invalid-missing-closing-tag.src 1`] = ` -[TSError: JSX element 'a' has no corresponding closing tag. - "lineNumber": 1, +TSError { "column": 1, "index": 1, -] + "lineNumber": 1, + "message": "JSX element 'a' has no corresponding closing tag.", +} `; 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 dea530d767c..c208b579c83 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`jsx invalid-missing-namespace-name.src 1`] = ` -[TSError: Expression expected. - "lineNumber": 1, +TSError { "column": 0, "index": 0, -] + "lineNumber": 1, + "message": "Expression expected.", +} `; 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 2a42a4c2172..d76a079d93e 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`jsx invalid-missing-namespace-value.src 1`] = ` -[TSError: Identifier expected. - "lineNumber": 1, +TSError { "column": 2, "index": 2, -] + "lineNumber": 1, + "message": "Identifier expected.", +} `; 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 fe0bb8c954f..ac0a591ee4f 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`jsx invalid-missing-spread-operator.src 1`] = ` -[TSError: '...' expected. - "lineNumber": 1, +TSError { "column": 6, "index": 6, -] + "lineNumber": 1, + "message": "'...' expected.", +} `; 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 c240fb63965..31752fe9261 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`jsx invalid-namespace-name-with-docts.src 1`] = ` -[TSError: Identifier expected. - "lineNumber": 1, +TSError { "column": 4, "index": 4, -] + "lineNumber": 1, + "message": "Identifier expected.", +} `; 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 c0539449451..33b9b97c43a 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`jsx invalid-namespace-value-with-dots.src 1`] = ` -[TSError: Identifier expected. - "lineNumber": 1, +TSError { "column": 2, "index": 2, -] + "lineNumber": 1, + "message": "Identifier expected.", +} `; 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 179976cf725..70dbe413502 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`jsx invalid-no-common-parent-with-comment.src 1`] = ` -[TSError: JSX expressions must have one parent element. - "lineNumber": 1, +TSError { "column": 8, "index": 8, -] + "lineNumber": 1, + "message": "JSX expressions must have one parent element.", +} `; 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 25511bcae25..459f4817020 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`jsx invalid-no-common-parent.src 1`] = ` -[TSError: JSX expressions must have one parent element. - "lineNumber": 1, +TSError { "column": 8, "index": 8, -] + "lineNumber": 1, + "message": "JSX expressions must have one parent element.", +} `; 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 463e011f24e..7468255ed50 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`jsx invalid-no-tag-name.src 1`] = ` -[TSError: Declaration or statement expected. - "lineNumber": 1, +TSError { "column": 0, "index": 0, -] + "lineNumber": 1, + "message": "Declaration or statement expected.", +} `; 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 d904a14f16f..68d4a0fe19d 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`jsx invalid-placeholder-in-closing-tag.src 1`] = ` -[TSError: '>' expected. - "lineNumber": 1, +TSError { "column": 16, "index": 16, -] + "lineNumber": 1, + "message": "'>' expected.", +} `; 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 98f8df8f0c5..decbdbd3dc1 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`jsx invalid-shorthand-fragment-no-closing.src 1`] = ` -[TSError: JSX fragment has no corresponding closing tag. - "lineNumber": 1, +TSError { "column": 0, "index": 0, -] + "lineNumber": 1, + "message": "JSX fragment has no corresponding closing tag.", +} `; 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 fee23279f41..9043d6e4195 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`jsx invalid-trailing-dot-tag-name.src 1`] = ` -[TSError: Identifier expected. - "lineNumber": 1, +TSError { "column": 3, "index": 3, -] + "lineNumber": 1, + "message": "Identifier expected.", +} `; 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 d576fa7d7f9..6f8f5c8668e 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`jsx invalid-unexpected-comma.src 1`] = ` -[TSError: Identifier expected. - "lineNumber": 1, +TSError { "column": 19, "index": 19, -] + "lineNumber": 1, + "message": "Identifier expected.", +} `; 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 3c7df55b082..c6d458d493e 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`jsx member-expression-private.src 1`] = ` -[TSError: Identifier expected. - "lineNumber": 1, +TSError { "column": 10, "index": 10, -] + "lineNumber": 1, + "message": "Identifier expected.", +} `; 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 f49b819d242..84724e7bdb7 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`jsx namespaced-attribute-and-value-inserted.src 1`] = ` -[TSError: Identifier expected. - "lineNumber": 1, +TSError { "column": 4, "index": 4, -] + "lineNumber": 1, + "message": "Identifier expected.", +} `; 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 c042cb357f5..ac04b31a140 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`jsx namespaced-name-and-attribute.src 1`] = ` -[TSError: Identifier expected. - "lineNumber": 1, +TSError { "column": 2, "index": 2, -] + "lineNumber": 1, + "message": "Identifier expected.", +} `; 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 41fa892714a..598f29385b2 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`jsx newslines-and-entities.src 1`] = ` -[TSError: Invalid character. - "lineNumber": 1, +TSError { "column": 8, "index": 8, -] + "lineNumber": 1, + "message": "Invalid character.", +} `; 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 fb24fa524ad..9de3d885b9d 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`jsx self-closing-tag-with-newline.src 1`] = ` -[TSError: Invalid character. - "lineNumber": 1, +TSError { "column": 2, "index": 2, -] + "lineNumber": 1, + "message": "Invalid character.", +} `; 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 16e0787d035..5d5d2c98492 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`tsx generic-jsx-member-expression-private.src 1`] = ` -[TSError: Identifier expected. - "lineNumber": 1, +TSError { "column": 22, "index": 22, -] + "lineNumber": 1, + "message": "Identifier expected.", +} `; 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 1814b95fbe0..cd817aad0dc 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,9 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`typescript errorRecovery interface-with-no-body.src 1`] = ` -[TSError: '{' expected. - "lineNumber": 2, +TSError { "column": 0, "index": 14, -] + "lineNumber": 2, + "message": "'{' expected.", +} `; diff --git a/packages/typescript-estree/tools/tserror-serializer.ts b/packages/typescript-estree/tools/tserror-serializer.ts index 840c7c4696f..972170ce0b0 100644 --- a/packages/typescript-estree/tools/tserror-serializer.ts +++ b/packages/typescript-estree/tools/tserror-serializer.ts @@ -1,14 +1,16 @@ import { TSError } from '../src/node-utils'; +import type { Plugin } from 'pretty-format'; -export const serializer: import('pretty-format').Plugin = { +export const serializer: Plugin = { test: (val: unknown): val is TSError => val instanceof TSError, serialize(val: TSError, config) { return ( - `[${val.name}: ${val.message}\n` + - `${config.indent}"lineNumber": ${val.lineNumber},\n` + + `${val.name} {\n` + `${config.indent}"column": ${val.column},\n` + `${config.indent}"index": ${val.index},\n` + - `]` + `${config.indent}"lineNumber": ${val.lineNumber},\n` + + `${config.indent}"message": "${val.message}",\n` + + `}` ); }, };