From a3e1be82b654b3cb48276c0a3d72b26db2b861fa Mon Sep 17 00:00:00 2001 From: Sosuke Suzuki Date: Mon, 13 Nov 2023 12:04:23 +0900 Subject: [PATCH] Clean changelog --- changelog_unreleased/angular/15606.md | 7 --- changelog_unreleased/api/15332.md | 21 -------- changelog_unreleased/blog-post-intro.md | 13 ----- changelog_unreleased/cli/15433.md | 30 ----------- changelog_unreleased/cli/15467.md | 18 ------- changelog_unreleased/cli/15597.md | 11 ---- changelog_unreleased/flow/15130.md | 13 ----- changelog_unreleased/flow/15429.md | 13 ----- changelog_unreleased/flow/15466.md | 8 --- changelog_unreleased/html/15334.md | 46 ---------------- changelog_unreleased/javascript/13183.md | 38 ------------- changelog_unreleased/javascript/15326.md | 69 ------------------------ changelog_unreleased/javascript/15468.md | 24 --------- changelog_unreleased/javascript/15472.md | 40 -------------- changelog_unreleased/javascript/15485.md | 27 ---------- changelog_unreleased/javascript/15525.md | 26 --------- changelog_unreleased/javascript/15547.md | 18 ------- changelog_unreleased/javascript/9559.md | 35 ------------ changelog_unreleased/markdown/15400.md | 25 --------- changelog_unreleased/markdown/15411.md | 29 ---------- changelog_unreleased/scss/15370.md | 19 ------- changelog_unreleased/typescript/15324.md | 34 ------------ changelog_unreleased/typescript/15408.md | 21 -------- changelog_unreleased/typescript/15409.md | 36 ------------- changelog_unreleased/typescript/15514.md | 15 ------ 25 files changed, 636 deletions(-) delete mode 100644 changelog_unreleased/angular/15606.md delete mode 100644 changelog_unreleased/api/15332.md delete mode 100644 changelog_unreleased/blog-post-intro.md delete mode 100644 changelog_unreleased/cli/15433.md delete mode 100644 changelog_unreleased/cli/15467.md delete mode 100644 changelog_unreleased/cli/15597.md delete mode 100644 changelog_unreleased/flow/15130.md delete mode 100644 changelog_unreleased/flow/15429.md delete mode 100644 changelog_unreleased/flow/15466.md delete mode 100644 changelog_unreleased/html/15334.md delete mode 100644 changelog_unreleased/javascript/13183.md delete mode 100644 changelog_unreleased/javascript/15326.md delete mode 100644 changelog_unreleased/javascript/15468.md delete mode 100644 changelog_unreleased/javascript/15472.md delete mode 100644 changelog_unreleased/javascript/15485.md delete mode 100644 changelog_unreleased/javascript/15525.md delete mode 100644 changelog_unreleased/javascript/15547.md delete mode 100644 changelog_unreleased/javascript/9559.md delete mode 100644 changelog_unreleased/markdown/15400.md delete mode 100644 changelog_unreleased/markdown/15411.md delete mode 100644 changelog_unreleased/scss/15370.md delete mode 100644 changelog_unreleased/typescript/15324.md delete mode 100644 changelog_unreleased/typescript/15408.md delete mode 100644 changelog_unreleased/typescript/15409.md delete mode 100644 changelog_unreleased/typescript/15514.md diff --git a/changelog_unreleased/angular/15606.md b/changelog_unreleased/angular/15606.md deleted file mode 100644 index 68fa04189..000000000 --- a/changelog_unreleased/angular/15606.md +++ /dev/null @@ -1,7 +0,0 @@ -#### [HIGHLIGHT]Support Angular control flow (#15606 by @DingWeizhe, @fisker) - -Added support for built-in control flow in Angular 17. Please give us feedback if you find any bugs. - -For more details about control flow, please check this article on the official blog. - -https://blog.angular.io/introducing-angular-v17-4d7033312e4b diff --git a/changelog_unreleased/api/15332.md b/changelog_unreleased/api/15332.md deleted file mode 100644 index 48fc80981..000000000 --- a/changelog_unreleased/api/15332.md +++ /dev/null @@ -1,21 +0,0 @@ -#### Accept `URL` in `prettier.{resolveConfig,resolveConfigFile,getFileInfo}()` (#15332, #15354, #15360, #15364 by @fisker) - -[`prettier.resolveConfig()`](https://prettier.io/docs/en/api#prettierresolveconfigfileurlorpath--options), [`prettier.resolveConfigFile()`](https://prettier.io/docs/en/api#prettierresolveconfigfilefileurlorpath), and [`prettier.getFileInfo()`](https://prettier.io/docs/en/api#prettiergetfileinfofileurlorpath--options) now accepts an [URL](https://developer.mozilla.org/en-US/docs/Web/API/URL) with `file:` protocol or a url string starts with `file://`. - -```js -// `URL` -await prettier.resolveConfig(new URL("./path/to/file", import.meta.url)); -await prettier.resolveConfigFile(new URL("./path/to/file", import.meta.url)); -await prettier.getFileInfo(new URL("./path/to/file", import.meta.url)); -await prettier.getFileInfo("/path/to/file", { - ignorePath: new URL("./.eslintignore", import.meta.url), -}); - -// URL string -await prettier.resolveConfig("file:///path/to/file"); -await prettier.resolveConfigFile("file:///path/to/file"); -await prettier.getFileInfo("file:///path/to/file"); -await prettier.getFileInfo("/path/to/file", { - ignorePath: "file:///path/to/.eslintignore", -}); -``` diff --git a/changelog_unreleased/blog-post-intro.md b/changelog_unreleased/blog-post-intro.md deleted file mode 100644 index 90e3e7dbd..000000000 --- a/changelog_unreleased/blog-post-intro.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -author: "Sosuke Suzuki (@sosukesuzuki)" -authorURL: "https://github.com/sosukesuzuki" -title: "Prettier 3.1: New experimental ternaries formatting and Angular control flow syntax!" ---- - -This release adds indentation back to nested ternaries along with a new `--experimental-ternaries` flag to try a more novel "curious ternary" format that scales better to deeply nested conditionals. We are keen for [your feedback](https://forms.gle/vwEuboCobTVhEkt66) on the experimental format before it rolls out as the default behavior later this year! - -We have also added support for the control flow syntax in Angular v17. For details on the syntax, please read [the official Angular release post](https://blog.angular.io/introducing-angular-v17-4d7033312e4b). - - - -If you appreciate Prettier and would like to support our work, please consider sponsoring us directly via [our OpenCollective](https://opencollective.com/prettier) or by sponsoring the projects we depend on, such as [typescript-eslint](https://opencollective.com/typescript-eslint), [remark](https://opencollective.com/unified), and [Babel](https://opencollective.com/babel). Thank you for your continued support! diff --git a/changelog_unreleased/cli/15433.md b/changelog_unreleased/cli/15433.md deleted file mode 100644 index b102ee6a1..000000000 --- a/changelog_unreleased/cli/15433.md +++ /dev/null @@ -1,30 +0,0 @@ -#### Process files only supported by plugins (#15433 by @sosukesuzuki) - -In Prettier 3.0, when specifying a directory from the CLI, only files with default supported extensions were processed. - -In the following scenario, not just `foo.js` but also `foo.astro` should be formatted: - -``` -# Prettier stable version - -$ ls . -foo.js foo.astro - -$ cat .prettierrc -{ "plugins": ["prettier-plugin-astro"] } - -$ prettier --write . -foo.js 20ms -``` - -With this update, both `foo.js` and `foo.astro` will now be formatted: - -``` -# Prettier main branch - -$ prettier --write . -foo.js 20ms -foo.astro 32ms -``` - -You can replace `prettier "**/*" --ignore-unknown` with `prettier .` since they are equivalent now. diff --git a/changelog_unreleased/cli/15467.md b/changelog_unreleased/cli/15467.md deleted file mode 100644 index 78eb65eb4..000000000 --- a/changelog_unreleased/cli/15467.md +++ /dev/null @@ -1,18 +0,0 @@ -#### Show `(unchanged)` keyword for accessibility in CLI `--write` (#15467 by @ADTC) - -Previously, the only distinction between a changed file and an unchanged file was the grey color of the file name. In the example below, we can't distinguish between `a.js` and `b.js` as the color is missing. This issue is fixed by adding the `(unchanged)` keyword which makes the distinction accessible without color. - - -```sh -prettier --write . - -# Prettier stable -a.js 0ms -b.js 0ms -c.js 0ms (cached) - -# Prettier main -a.js 0ms -b.js 0ms (unchanged) -c.js 0ms (unchanged) (cached) -``` diff --git a/changelog_unreleased/cli/15597.md b/changelog_unreleased/cli/15597.md deleted file mode 100644 index 3ca0dda31..000000000 --- a/changelog_unreleased/cli/15597.md +++ /dev/null @@ -1,11 +0,0 @@ -#### Fix error when formatting file names contains special characters (#15597 by @fisker) - -```sh -prettier "[with-square-brackets].js" --list - -# Prettier stable -[error] Explicitly specified file was ignored due to negative glob patterns: "[with-square-brackets].js". - -# Prettier main -[with-square-brackets].js -``` diff --git a/changelog_unreleased/flow/15130.md b/changelog_unreleased/flow/15130.md deleted file mode 100644 index 1b13498ac..000000000 --- a/changelog_unreleased/flow/15130.md +++ /dev/null @@ -1,13 +0,0 @@ -#### Support `as` and `satisfies` expressions for Flow (#15130 by @gkz) - - -```jsx -// Input -const x = y as T; - -// Prettier stable -// - -// Prettier main -const x = y as T; -``` diff --git a/changelog_unreleased/flow/15429.md b/changelog_unreleased/flow/15429.md deleted file mode 100644 index 5a32052cf..000000000 --- a/changelog_unreleased/flow/15429.md +++ /dev/null @@ -1,13 +0,0 @@ -#### Support type arguments on jsx opening elements for Flow (#15429 by @SamChou19815) - - -```jsx -// Input - />; - -// Prettier stable -; - -// Prettier main - />; -``` diff --git a/changelog_unreleased/flow/15466.md b/changelog_unreleased/flow/15466.md deleted file mode 100644 index 0ab08d6a9..000000000 --- a/changelog_unreleased/flow/15466.md +++ /dev/null @@ -1,8 +0,0 @@ -#### Support type arguments after `typeof` (#15466 by @sosukesuzuki) - -Supports type arguments after `typeof` syntax supported since [Flow v0.127.0](https://github.com/facebook/flow/blob/HEAD/Changelog.md#02170): - - -```jsx -type Foo = typeof MyGenericClass; -``` diff --git a/changelog_unreleased/html/15334.md b/changelog_unreleased/html/15334.md deleted file mode 100644 index b8d15a948..000000000 --- a/changelog_unreleased/html/15334.md +++ /dev/null @@ -1,46 +0,0 @@ -#### Fix formatting of `menu` and `marquee` elements (#15334 by @fisker) - - -```html - -
  • -
  • -
  • - This text will bounce - - -
  • -
  • -
  • - This text will bounce - - - -
  • -
  • -
  • -
    - - This text will bounce - -``` diff --git a/changelog_unreleased/javascript/13183.md b/changelog_unreleased/javascript/13183.md deleted file mode 100644 index 092daa03e..000000000 --- a/changelog_unreleased/javascript/13183.md +++ /dev/null @@ -1,38 +0,0 @@ -#### [HIGHLIGHT]New Experimental Ternary Formatting: A Curious Case of the Ternaries (#13183 by @rattrayalex) - -This is implemented behind a `--experimental-ternaries` flag. - -We move the `?` in multiline ternaries to the end of the first line instead of the start of the second, along with several related changes. - -While it might look weird at first, beta-testing shows that after a few hours of use, developers find it makes nested ternaries much more readable and useful. - -This PR resolves one of our [a highly-upvoted issue](https://github.com/prettier/prettier/issues/5814) without the problems its proposed solution would reintroduce. - -Please see [A curious case of the ternaries](https://prettier.io/blog/2023/11/12/curious-ternaries) for more details. - -##### Example - - -```js -// "Questioning" ternaries for simple ternaries: -const content = - children && !isEmptyChildren(children) ? - render(children) - : renderDefaultChildren(); - -// "Case-style" ternaries for chained ternaries: -const message = - i % 3 === 0 && i % 5 === 0 ? "fizzbuzz" - : i % 3 === 0 ? "fizz" - : i % 5 === 0 ? "buzz" - : String(i); - -// Smoothly transitions between "case-style" and "questioning" when things get complicated: -const reactRouterResult = - children && !isEmptyChildren(children) ? children - : props.match ? - component ? React.createElement(component, props) - : render ? render(props) - : null - : null -``` diff --git a/changelog_unreleased/javascript/15326.md b/changelog_unreleased/javascript/15326.md deleted file mode 100644 index 1758d939d..000000000 --- a/changelog_unreleased/javascript/15326.md +++ /dev/null @@ -1,69 +0,0 @@ -#### Fix comment between parentheses and function body (#15326 by @fisker) - - -```jsx -// Input -function function_declaration() -// this is a function -{ - return 42 -} - -(function function_expression() -// this is a function -{ - return 42 -})(); - -// Prettier stable -function function_declaration() { - // this is a function - return 42; -} - -(function function_expression() // this is a function -{ - return 42; -})(); - -// Prettier main -function function_declaration() { - // this is a function - return 42; -} - -(function function_expression() { - // this is a function - return 42; -})(); -``` - - -```jsx -// Input -function function_declaration() -// this is a function -{ - return 42 -} - -export default function() -// this is a function -{ - return 42 -} - -// Prettier stable -TypeError: Cannot read properties of null (reading 'range') - -// Prettier main -function function_declaration() { - // this is a function - return 42; -} - -export default function () { - // this is a function - return 42; -} -``` diff --git a/changelog_unreleased/javascript/15468.md b/changelog_unreleased/javascript/15468.md deleted file mode 100644 index 690335f5f..000000000 --- a/changelog_unreleased/javascript/15468.md +++ /dev/null @@ -1,24 +0,0 @@ -#### Disambiguate unary expressions on left hand side of instanceof and in (#15468 by @lucacasonato) - -Parentheses are now added around unary expression on the left hand side of -`instanceof` and `in` expressions, to disambiguate the unary on the left hand -side with a unary applying to the entire binary expression. - -This helps catch a common mistake where a user intends to write `!("x" in y)` -but instead writes `!"x" in y`, which is really parsed as the nonsensical -`(!"x") in y`. - - -```js -// Input -!"x" in y; -!("x" in y); - -// Prettier stable -!"x" in y; -!("x" in y); - -// Prettier main -(!"x") in y; -!("x" in y); -``` diff --git a/changelog_unreleased/javascript/15472.md b/changelog_unreleased/javascript/15472.md deleted file mode 100644 index 8c0debad9..000000000 --- a/changelog_unreleased/javascript/15472.md +++ /dev/null @@ -1,40 +0,0 @@ -#### Fix name case of selectors in styled components interpolation ([#15472](https://github.com/prettier/prettier/pull/15472) by [@lucasols](https://github.com/lucasols)) - - -```js -// Input -const StyledComponent = styled.div` - margin-right: -4px; - - ${Container}.isExpanded & { - transform: rotate(-180deg); - } -`; - -const StyledComponent2 = styled.div` - margin-right: -4px; - - ${abc}.camelCase + ${def}.camelCase & { - transform: rotate(-180deg); - } -`; - -// Prettier stable -const StyledComponent = styled.div` - margin-right: -4px; - - ${Container}.isexpanded & { - transform: rotate(-180deg); - } -`; - -const StyledComponent2 = styled.div` - margin-right: -4px; - - ${abc}.camelcase + ${def}.camelCase & { - transform: rotate(-180deg); - } -`; - -// Prettier main -- same as input -``` diff --git a/changelog_unreleased/javascript/15485.md b/changelog_unreleased/javascript/15485.md deleted file mode 100644 index 5ec559bc6..000000000 --- a/changelog_unreleased/javascript/15485.md +++ /dev/null @@ -1,27 +0,0 @@ -#### [HIGHLIGHT]Support new syntaxes supported by Babel 7.23.0 (#15485, #15486, #15487, #15488 by @sosukesuzuki) - -We support new JS syntax supported by [Babel 7.23.0](https://babeljs.io/blog/2023/09/25/7.23.0)! - -##### Source Phase Imports - -Please see https://github.com/tc39/proposal-source-phase-imports for more details. - -```js -import source x from "mod"; -``` - -##### Deferred Import Evaluation - -Please see https://github.com/tc39/proposal-defer-import-eval for more details. - -```js -import defer * as ns from "mod"; -``` - -##### Optional Chaining Assignments - -Please see https://github.com/tc39/proposal-optional-chaining-assignment for more details. - -```js -maybeObj?.prop1 = value; -``` diff --git a/changelog_unreleased/javascript/15525.md b/changelog_unreleased/javascript/15525.md deleted file mode 100644 index de0f9b20d..000000000 --- a/changelog_unreleased/javascript/15525.md +++ /dev/null @@ -1,26 +0,0 @@ -#### Consistently format strings containing escapes (#15525 by @sosukesuzuki) - - -```jsx -// Input -export const MSG_GENERIC_OPERATION_FAILURE_BODY_1 = - goog.getMsg("That's all we know"); - -export const MSG_GENERIC_OPERATION_FAILURE_BODY_2 = - goog.getMsg("That\'s all we know"); - -// Prettier stable -export const MSG_GENERIC_OPERATION_FAILURE_BODY_1 = - goog.getMsg("That's all we know"); - -export const MSG_GENERIC_OPERATION_FAILURE_BODY_2 = goog.getMsg( - "That's all we know", -); - -// Prettier main -export const MSG_GENERIC_OPERATION_FAILURE_BODY_1 = - goog.getMsg("That's all we know"); - -export const MSG_GENERIC_OPERATION_FAILURE_BODY_2 = - goog.getMsg("That's all we know"); -``` diff --git a/changelog_unreleased/javascript/15547.md b/changelog_unreleased/javascript/15547.md deleted file mode 100644 index b14c82194..000000000 --- a/changelog_unreleased/javascript/15547.md +++ /dev/null @@ -1,18 +0,0 @@ -#### Improve formatting for assignment its left can break (#15547 by @sosukesuzuki) - - -```jsx -// Input -params["redirectTo"] = - `${window.location.pathname}${window.location.search}${window.location.hash}`; - -// Prettier stable -params[ - "redirectTo" -] = `${window.location.pathname}${window.location.search}${window.location.hash}`; - -// Prettier main -params["redirectTo"] = - `${window.location.pathname}${window.location.search}${window.location.hash}`; - -``` diff --git a/changelog_unreleased/javascript/9559.md b/changelog_unreleased/javascript/9559.md deleted file mode 100644 index c6504ceca..000000000 --- a/changelog_unreleased/javascript/9559.md +++ /dev/null @@ -1,35 +0,0 @@ -#### [HIGHLIGHT]Add indentation back to nested ternaries (#9559 by @rattrayalex) - - -```js -// Input -const message = - i % 3 === 0 && i % 5 === 0 - ? "fizzbuzz" - : i % 3 === 0 - ? "fizz" - : i % 5 === 0 - ? "buzz" - : String(i); - - -// Prettier stable -const message = - i % 3 === 0 && i % 5 === 0 - ? "fizzbuzz" - : i % 3 === 0 - ? "fizz" - : i % 5 === 0 - ? "buzz" - : String(i); - -// Prettier main -const message = - i % 3 === 0 && i % 5 === 0 - ? "fizzbuzz" - : i % 3 === 0 - ? "fizz" - : i % 5 === 0 - ? "buzz" - : String(i); -``` diff --git a/changelog_unreleased/markdown/15400.md b/changelog_unreleased/markdown/15400.md deleted file mode 100644 index 9fe662a33..000000000 --- a/changelog_unreleased/markdown/15400.md +++ /dev/null @@ -1,25 +0,0 @@ -#### Encoding `<` and `>` in markdown urls (#15400 by @vivekjoshi556) - - -```md - -[link](https://www.google.fr/()foo->bar) - - -[link](bar>) - - -[link]() -``` - - -```md - -![link](bar>) - - -![link](bar>) - - -![link]() -``` diff --git a/changelog_unreleased/markdown/15411.md b/changelog_unreleased/markdown/15411.md deleted file mode 100644 index 63e5bf1c3..000000000 --- a/changelog_unreleased/markdown/15411.md +++ /dev/null @@ -1,29 +0,0 @@ -#### Don't split lines between Japanese kana & COMBINING KATAKANA-HIRAGANA (SEMI-)VOICED SOUND MARK (#15411 by @tats-u) - -This PR fixes [#15410](https://github.com/prettier/prettier/issues/15410). - -Japanese (semi-)voiced kana characters can be split into two code points. For example, the following hiragana character /ka/ can be represented as: - -が (U+304C) → か (U+304B) + ゙ (U+3099) → が (U+304C U+3099) - -Most users do not use or meet expressions like this except for file paths in macOS. However, there are some characters that can only be represented in this way. Some Japanese text that have to tell /ŋa̠/ (there are not a few Japanese that do not use it these days though) from the common /ga/ use a expression ["か゚" (U+304B U+309A)](https://en.wiktionary.org/wiki/%E3%81%8B%E3%82%9A). - -```markdown -nasalか゚き゚く゚け゚こ゚か゚き゚く゚け゚こ゚か゚き゚く゚け゚こ゚か゚き゚く゚け゚こ゚ -``` - -The above Markdown is formatted as in Prettier 3.0: - -```markdown -nasalか゚き゚く゚け゚こ゚か゚き゚く゚け゚こ゚か゚き゚く゚け゚こ゚か゚き゚く゚け -゚こ゚ -``` - -The semi-voiced sound mark goes to the next line but it is not correct. By this PR, the source Markdown is now formatted as: - -```markdown -nasalか゚き゚く゚け゚こ゚か゚き゚く゚け゚こ゚か゚き゚く゚け゚こ゚か゚き゚く゚ -け゚こ゚ -``` - -The semi-voiced sound mark now keeps attached to the hiragana "け". diff --git a/changelog_unreleased/scss/15370.md b/changelog_unreleased/scss/15370.md deleted file mode 100644 index ad32949cb..000000000 --- a/changelog_unreleased/scss/15370.md +++ /dev/null @@ -1,19 +0,0 @@ -#### Do not split call of scss function with leading dash (#15370 by @auvred) - - -```scss -/* Input */ -div { - width: -double(-double(3)); -} - -/* Prettier stable */ -div { - width: -double(- double(3)); -} - -/* Prettier main */ -div { - width: -double(-double(3)); -} -``` diff --git a/changelog_unreleased/typescript/15324.md b/changelog_unreleased/typescript/15324.md deleted file mode 100644 index 67c65752c..000000000 --- a/changelog_unreleased/typescript/15324.md +++ /dev/null @@ -1,34 +0,0 @@ -#### Fix unstable comment after the last parameter property (#15324 by @fisker) - - -```tsx -// Input -class Class { - constructor( - private readonly paramProp: Type, - // comment - ) { - } -} - -// Prettier stable -class Class { - constructor(private readonly paramProp: Type) // comment - {} -} - -// Prettier stable (Second format) -class Class { - constructor( - private readonly paramProp: Type, // comment - ) {} -} - -// Prettier main -class Class { - constructor( - private readonly paramProp: Type, - // comment - ) {} -} -``` diff --git a/changelog_unreleased/typescript/15408.md b/changelog_unreleased/typescript/15408.md deleted file mode 100644 index abade71c2..000000000 --- a/changelog_unreleased/typescript/15408.md +++ /dev/null @@ -1,21 +0,0 @@ -#### Support embedded formatting in template literals annotated with `as const` (#15408 by @sosukesuzuki) - - -```tsx -// Input -const GQL_QUERY_WITH_CONST = /* GraphQL */ ` - query S { shop } -` as const; - -// Prettier stable -const GQL_QUERY_WITH_CONST = /* GraphQL */ ` - query S { shop } -` as const; - -// Prettier main -const GQL_QUERY_WITH_CONST = /* GraphQL */ ` - query S { - shop - } -` as const; -``` diff --git a/changelog_unreleased/typescript/15409.md b/changelog_unreleased/typescript/15409.md deleted file mode 100644 index 6834c9efb..000000000 --- a/changelog_unreleased/typescript/15409.md +++ /dev/null @@ -1,36 +0,0 @@ -#### Fix printing comment for the last operand of union types (#15409 by @sosukesuzuki) - - -```tsx -// Input -type Foo1 = ( - | "thing1" // Comment1 - | "thing2" // Comment2 -)[]; // Final comment1 -type Foo2 = ( - | "thing1" // Comment1 - | "thing2" // Comment2 -) & Bar; // Final comment2 - -// Prettier stable -type Foo1 = ( - | "thing1" // Comment1 - | "thing2" -)[]; // Comment2 // Final comment1 -type Foo2 = ( - | "thing1" // Comment1 - | "thing2" -) & // Comment2 - Bar; // Final comment2 - -// Prettier main -type Foo1 = ( - | "thing1" // Comment1 - | "thing2" // Comment2 -)[]; // Final comment1 -type Foo2 = ( - | "thing1" // Comment1 - | "thing2" // Comment2 -) & - Bar; // Final comment2 -``` diff --git a/changelog_unreleased/typescript/15514.md b/changelog_unreleased/typescript/15514.md deleted file mode 100644 index d733fd059..000000000 --- a/changelog_unreleased/typescript/15514.md +++ /dev/null @@ -1,15 +0,0 @@ -#### Keep required parenthesis around some specific keyword like identifiers in expression statement of satisfies / as expression (#15514 by @seiyab) - - -```ts -// Input -(type) satisfies never; - - -// Prettier stable -type satisfies never; - - -// Prettier main -(type) satisfies never; -```