From 8f8fa1b02651e19b8607d1e8183680c9b166ed22 Mon Sep 17 00:00:00 2001 From: fisker Cheung Date: Wed, 15 Jul 2026 22:07:33 +0800 Subject: [PATCH] Remove `typescript-babel-only` directory (#19635) --- .../__snapshots__/format.test.js.snap | 34 +++++++++ ...arenthesized-decorators-call-expression.ts | 0 ...arenthesized-decorators-tagged-template.ts | 0 .../__snapshots__/format.test.js.snap | 74 ------------------- .../decorator-auto-accessors-new-line.ts | 14 ---- .../typescript-babel-only/format.test.js | 1 - 6 files changed, 34 insertions(+), 89 deletions(-) rename tests/format/typescript/{typescript-babel-only => decorators}/parenthesized-decorators-call-expression.ts (100%) rename tests/format/typescript/{typescript-babel-only => decorators}/parenthesized-decorators-tagged-template.ts (100%) delete mode 100644 tests/format/typescript/typescript-babel-only/__snapshots__/format.test.js.snap delete mode 100644 tests/format/typescript/typescript-babel-only/decorator-auto-accessors-new-line.ts delete mode 100644 tests/format/typescript/typescript-babel-only/format.test.js diff --git a/tests/format/typescript/decorators/__snapshots__/format.test.js.snap b/tests/format/typescript/decorators/__snapshots__/format.test.js.snap index 32bf67b7b..803d8f837 100644 --- a/tests/format/typescript/decorators/__snapshots__/format.test.js.snap +++ b/tests/format/typescript/decorators/__snapshots__/format.test.js.snap @@ -609,3 +609,37 @@ class OrderLine { ================================================================================ `; + +exports[`parenthesized-decorators-call-expression.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] + printWidth: 80 (default) | +=====================================input====================================== +@(test().x("global").y()) +class X {} + +=====================================output===================================== +@(test().x("global").y()) +class X {} + +================================================================================ +`; + +exports[`parenthesized-decorators-tagged-template.ts format 1`] = ` +====================================options===================================== +parsers: ["typescript"] + printWidth: 80 (default) | +=====================================input====================================== +class Test { + @(foo\`bar\`) + text: string = "text" +} + +=====================================output===================================== +class Test { + @(foo\`bar\`) + text: string = "text"; +} + +================================================================================ +`; diff --git a/tests/format/typescript/typescript-babel-only/parenthesized-decorators-call-expression.ts b/tests/format/typescript/decorators/parenthesized-decorators-call-expression.ts similarity index 100% rename from tests/format/typescript/typescript-babel-only/parenthesized-decorators-call-expression.ts rename to tests/format/typescript/decorators/parenthesized-decorators-call-expression.ts diff --git a/tests/format/typescript/typescript-babel-only/parenthesized-decorators-tagged-template.ts b/tests/format/typescript/decorators/parenthesized-decorators-tagged-template.ts similarity index 100% rename from tests/format/typescript/typescript-babel-only/parenthesized-decorators-tagged-template.ts rename to tests/format/typescript/decorators/parenthesized-decorators-tagged-template.ts diff --git a/tests/format/typescript/typescript-babel-only/__snapshots__/format.test.js.snap b/tests/format/typescript/typescript-babel-only/__snapshots__/format.test.js.snap deleted file mode 100644 index ef39cd87f..000000000 --- a/tests/format/typescript/typescript-babel-only/__snapshots__/format.test.js.snap +++ /dev/null @@ -1,74 +0,0 @@ -// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing - -exports[`decorator-auto-accessors-new-line.ts format 1`] = ` -====================================options===================================== -parsers: ["babel-ts"] - printWidth: 80 (default) | -=====================================input====================================== -class Foo { - accessor - ["bar"]; -} - -class Foo { - static accessor - bar; -} - -class Foo { - accessor - bar; -} - -=====================================output===================================== -class Foo { - accessor; - ["bar"]; -} - -class Foo { - static accessor; - bar; -} - -class Foo { - accessor; - bar; -} - -================================================================================ -`; - -exports[`parenthesized-decorators-call-expression.ts format 1`] = ` -====================================options===================================== -parsers: ["babel-ts"] - printWidth: 80 (default) | -=====================================input====================================== -@(test().x("global").y()) -class X {} - -=====================================output===================================== -@(test().x("global").y()) -class X {} - -================================================================================ -`; - -exports[`parenthesized-decorators-tagged-template.ts format 1`] = ` -====================================options===================================== -parsers: ["babel-ts"] - printWidth: 80 (default) | -=====================================input====================================== -class Test { - @(foo\`bar\`) - text: string = "text" -} - -=====================================output===================================== -class Test { - @(foo\`bar\`) - text: string = "text"; -} - -================================================================================ -`; diff --git a/tests/format/typescript/typescript-babel-only/decorator-auto-accessors-new-line.ts b/tests/format/typescript/typescript-babel-only/decorator-auto-accessors-new-line.ts deleted file mode 100644 index 084a69a60..000000000 --- a/tests/format/typescript/typescript-babel-only/decorator-auto-accessors-new-line.ts +++ /dev/null @@ -1,14 +0,0 @@ -class Foo { - accessor - ["bar"]; -} - -class Foo { - static accessor - bar; -} - -class Foo { - accessor - bar; -} diff --git a/tests/format/typescript/typescript-babel-only/format.test.js b/tests/format/typescript/typescript-babel-only/format.test.js deleted file mode 100644 index 4d5894a24..000000000 --- a/tests/format/typescript/typescript-babel-only/format.test.js +++ /dev/null @@ -1 +0,0 @@ -runFormatTest(import.meta, ["babel-ts"]);