From 8f7164fdf49c8241ffaca2f1c7cc4a3f6af06e2a Mon Sep 17 00:00:00 2001 From: Georgii Dolzhykov Date: Sat, 21 Mar 2020 22:41:36 +0200 Subject: [PATCH] clean changelog_unreleased --- changelog_unreleased/angular/pr-6869.md | 15 ---- changelog_unreleased/angular/pr-7371.md | 29 -------- changelog_unreleased/api/pr-5813.md | 3 - changelog_unreleased/api/pr-6908.md | 3 - changelog_unreleased/api/pr-6963.md | 10 --- changelog_unreleased/api/pr-6993.md | 10 --- changelog_unreleased/api/pr-7430.md | 22 ------ changelog_unreleased/api/pr-7435.md | 17 ----- changelog_unreleased/api/pr-7485.md | 3 - changelog_unreleased/api/pr-7511.md | 8 --- changelog_unreleased/api/pr-7620.md | 3 - changelog_unreleased/blog-post-intro.md | 8 +-- changelog_unreleased/cli/pr-7210.md | 12 ---- changelog_unreleased/cli/pr-7587.md | 3 - changelog_unreleased/cli/pr-7588.md | 4 -- changelog_unreleased/cli/pr-7660.md | 8 --- changelog_unreleased/cli/pr-7668.md | 3 - changelog_unreleased/css/pr-6947.md | 20 ------ changelog_unreleased/flow/pr-7472.md | 15 ---- changelog_unreleased/flow/pr-7482.md | 31 --------- changelog_unreleased/flow/pr-7484.md | 19 ------ changelog_unreleased/graphql/pr-7305.md | 33 --------- changelog_unreleased/handlebars/pr-7051.md | 58 ---------------- changelog_unreleased/handlebars/pr-7052.md | 18 ----- changelog_unreleased/handlebars/pr-7157.md | 20 ------ changelog_unreleased/handlebars/pr-7275.md | 49 -------------- changelog_unreleased/handlebars/pr-7306.md | 24 ------- changelog_unreleased/handlebars/pr-7552.md | 17 ----- changelog_unreleased/handlebars/pr-7575.md | 25 ------- changelog_unreleased/html/pr-5959.md | 24 ------- changelog_unreleased/html/pr-7273.md | 59 ---------------- changelog_unreleased/html/pr-7293.md | 14 ---- changelog_unreleased/html/pr-7295.md | 17 ----- changelog_unreleased/html/pr-7392.md | 15 ---- changelog_unreleased/html/pr-7395.md | 23 ------- changelog_unreleased/html/pr-7461.md | 22 ------ changelog_unreleased/html/pr-7555.md | 32 --------- changelog_unreleased/html/pr-7556.md | 48 ------------- changelog_unreleased/html/pr-7654.md | 40 ----------- changelog_unreleased/javascript/pr-3903.md | 26 ------- changelog_unreleased/javascript/pr-6685.md | 25 ------- changelog_unreleased/javascript/pr-6984.md | 21 ------ changelog_unreleased/javascript/pr-7010.md | 28 -------- changelog_unreleased/javascript/pr-7026.md | 26 ------- changelog_unreleased/javascript/pr-7070.md | 24 ------- changelog_unreleased/javascript/pr-7087.md | 25 ------- changelog_unreleased/javascript/pr-7138.md | 31 --------- changelog_unreleased/javascript/pr-7140.md | 14 ---- changelog_unreleased/javascript/pr-7208.md | 23 ------- changelog_unreleased/javascript/pr-7367.md | 19 ------ changelog_unreleased/javascript/pr-7491.md | 15 ---- changelog_unreleased/javascript/pr-7500.md | 16 ----- changelog_unreleased/javascript/pr-7504.md | 38 ----------- changelog_unreleased/javascript/pr-7709.md | 14 ---- changelog_unreleased/javascript/pr-7791.md | 23 ------- changelog_unreleased/less/pr-6981.md | 6 -- changelog_unreleased/markdown/pr-6852.md | 19 ------ changelog_unreleased/markdown/pr-7178.md | 79 ---------------------- changelog_unreleased/markdown/pr-7181.md | 46 ------------- changelog_unreleased/markdown/pr-7203.md | 26 ------- changelog_unreleased/mdx/pr-6398.md | 19 ------ changelog_unreleased/mdx/pr-6949.md | 37 ---------- changelog_unreleased/scss/pr-6918.md | 28 -------- changelog_unreleased/scss/pr-7211.md | 19 ------ changelog_unreleased/typescript/pr-6400.md | 3 - changelog_unreleased/typescript/pr-6901.md | 24 ------- changelog_unreleased/typescript/pr-7020.md | 15 ---- changelog_unreleased/typescript/pr-7075.md | 35 ---------- changelog_unreleased/typescript/pr-7094.md | 30 -------- changelog_unreleased/typescript/pr-7104.md | 22 ------ changelog_unreleased/typescript/pr-7144.md | 73 -------------------- changelog_unreleased/typescript/pr-7221.md | 13 ---- changelog_unreleased/typescript/pr-7228.md | 18 ----- changelog_unreleased/typescript/pr-7631.md | 7 -- changelog_unreleased/typescript/pr-7729.md | 13 ---- changelog_unreleased/vue/pr-7180.md | 46 ------------- changelog_unreleased/vue/pr-7479.md | 31 --------- changelog_unreleased/vue/pr-7781.md | 51 -------------- 78 files changed, 4 insertions(+), 1808 deletions(-) delete mode 100644 changelog_unreleased/angular/pr-6869.md delete mode 100644 changelog_unreleased/angular/pr-7371.md delete mode 100644 changelog_unreleased/api/pr-5813.md delete mode 100644 changelog_unreleased/api/pr-6908.md delete mode 100644 changelog_unreleased/api/pr-6963.md delete mode 100644 changelog_unreleased/api/pr-6993.md delete mode 100644 changelog_unreleased/api/pr-7430.md delete mode 100644 changelog_unreleased/api/pr-7435.md delete mode 100644 changelog_unreleased/api/pr-7485.md delete mode 100644 changelog_unreleased/api/pr-7511.md delete mode 100644 changelog_unreleased/api/pr-7620.md delete mode 100644 changelog_unreleased/cli/pr-7210.md delete mode 100644 changelog_unreleased/cli/pr-7587.md delete mode 100644 changelog_unreleased/cli/pr-7588.md delete mode 100644 changelog_unreleased/cli/pr-7660.md delete mode 100644 changelog_unreleased/cli/pr-7668.md delete mode 100644 changelog_unreleased/css/pr-6947.md delete mode 100644 changelog_unreleased/flow/pr-7472.md delete mode 100644 changelog_unreleased/flow/pr-7482.md delete mode 100644 changelog_unreleased/flow/pr-7484.md delete mode 100644 changelog_unreleased/graphql/pr-7305.md delete mode 100644 changelog_unreleased/handlebars/pr-7051.md delete mode 100644 changelog_unreleased/handlebars/pr-7052.md delete mode 100644 changelog_unreleased/handlebars/pr-7157.md delete mode 100644 changelog_unreleased/handlebars/pr-7275.md delete mode 100644 changelog_unreleased/handlebars/pr-7306.md delete mode 100644 changelog_unreleased/handlebars/pr-7552.md delete mode 100644 changelog_unreleased/handlebars/pr-7575.md delete mode 100644 changelog_unreleased/html/pr-5959.md delete mode 100644 changelog_unreleased/html/pr-7273.md delete mode 100644 changelog_unreleased/html/pr-7293.md delete mode 100644 changelog_unreleased/html/pr-7295.md delete mode 100644 changelog_unreleased/html/pr-7392.md delete mode 100644 changelog_unreleased/html/pr-7395.md delete mode 100644 changelog_unreleased/html/pr-7461.md delete mode 100644 changelog_unreleased/html/pr-7555.md delete mode 100644 changelog_unreleased/html/pr-7556.md delete mode 100644 changelog_unreleased/html/pr-7654.md delete mode 100644 changelog_unreleased/javascript/pr-3903.md delete mode 100644 changelog_unreleased/javascript/pr-6685.md delete mode 100644 changelog_unreleased/javascript/pr-6984.md delete mode 100644 changelog_unreleased/javascript/pr-7010.md delete mode 100644 changelog_unreleased/javascript/pr-7026.md delete mode 100644 changelog_unreleased/javascript/pr-7070.md delete mode 100644 changelog_unreleased/javascript/pr-7087.md delete mode 100644 changelog_unreleased/javascript/pr-7138.md delete mode 100644 changelog_unreleased/javascript/pr-7140.md delete mode 100644 changelog_unreleased/javascript/pr-7208.md delete mode 100644 changelog_unreleased/javascript/pr-7367.md delete mode 100644 changelog_unreleased/javascript/pr-7491.md delete mode 100644 changelog_unreleased/javascript/pr-7500.md delete mode 100644 changelog_unreleased/javascript/pr-7504.md delete mode 100644 changelog_unreleased/javascript/pr-7709.md delete mode 100644 changelog_unreleased/javascript/pr-7791.md delete mode 100644 changelog_unreleased/less/pr-6981.md delete mode 100644 changelog_unreleased/markdown/pr-6852.md delete mode 100644 changelog_unreleased/markdown/pr-7178.md delete mode 100644 changelog_unreleased/markdown/pr-7181.md delete mode 100644 changelog_unreleased/markdown/pr-7203.md delete mode 100644 changelog_unreleased/mdx/pr-6398.md delete mode 100644 changelog_unreleased/mdx/pr-6949.md delete mode 100644 changelog_unreleased/scss/pr-6918.md delete mode 100644 changelog_unreleased/scss/pr-7211.md delete mode 100644 changelog_unreleased/typescript/pr-6400.md delete mode 100644 changelog_unreleased/typescript/pr-6901.md delete mode 100644 changelog_unreleased/typescript/pr-7020.md delete mode 100644 changelog_unreleased/typescript/pr-7075.md delete mode 100644 changelog_unreleased/typescript/pr-7094.md delete mode 100644 changelog_unreleased/typescript/pr-7104.md delete mode 100644 changelog_unreleased/typescript/pr-7144.md delete mode 100644 changelog_unreleased/typescript/pr-7221.md delete mode 100644 changelog_unreleased/typescript/pr-7228.md delete mode 100644 changelog_unreleased/typescript/pr-7631.md delete mode 100644 changelog_unreleased/typescript/pr-7729.md delete mode 100644 changelog_unreleased/vue/pr-7180.md delete mode 100644 changelog_unreleased/vue/pr-7479.md delete mode 100644 changelog_unreleased/vue/pr-7781.md diff --git a/changelog_unreleased/angular/pr-6869.md b/changelog_unreleased/angular/pr-6869.md deleted file mode 100644 index 69291ddce608..000000000000 --- a/changelog_unreleased/angular/pr-6869.md +++ /dev/null @@ -1,15 +0,0 @@ -#### Unofficial rudimentary support for some of the most used directives of AngularJS 1.x ([#6869](https://github.com/prettier/prettier/pull/6869) by [@thorn0](https://github.com/thorn0)) - -While there are some syntax incompatibilities (one-time bindings and the precedence of `|`) between the expression languages of the old AngularJS and the new Angular, overall the two languages are compatible enough for legacy and hybrid AngularJS-based projects to be able to benefit from using Prettier. Previously, when Prettier formatted AngularJS templates using the Angular parser, it formatted expressions only in interpolations. Now, some of the most used AngularJS directives are formatted too, namely: `ng-if`, `ng-show`, `ng-hide`, `ng-class`, `ng-style`. - - -```html - -
Warning!
- - -
Warning!
- - -
Warning!
-``` diff --git a/changelog_unreleased/angular/pr-7371.md b/changelog_unreleased/angular/pr-7371.md deleted file mode 100644 index 736b2db2d55d..000000000000 --- a/changelog_unreleased/angular/pr-7371.md +++ /dev/null @@ -1,29 +0,0 @@ -#### Fix formatting of i18n attributes ([#7371](https://github.com/prettier/prettier/pull/7371) by [@thorn0](https://github.com/thorn0)) - -Prettier 1.19 [added](https://prettier.io/blog/2019/11/09/1.19.0.html#add-formatting-for-i18n-attributes-6695-by-voithos) -support for formatting [i18n attributes](https://angular.io/guide/i18n), but putting the closing quote mark on a new line -broke [custom ids](https://angular.io/guide/i18n#set-a-custom-id-for-persistence-and-maintenance). This is fixed now. - - -```html - -
- - -
- - -
-``` diff --git a/changelog_unreleased/api/pr-5813.md b/changelog_unreleased/api/pr-5813.md deleted file mode 100644 index bb844b69134b..000000000000 --- a/changelog_unreleased/api/pr-5813.md +++ /dev/null @@ -1,3 +0,0 @@ -#### [BREAKING] Fix config overrides pattern matching to include dot files ([#5813](https://github.com/prettier/prettier/pull/5813) by [@chrisblossom](https://github.com/chrisblossom)) - -Previously, [configuration overrides](/docs/en/configuration.html#configuration-overrides) weren't applied to files whose name had a leading dot. diff --git a/changelog_unreleased/api/pr-6908.md b/changelog_unreleased/api/pr-6908.md deleted file mode 100644 index bb625128dd7f..000000000000 --- a/changelog_unreleased/api/pr-6908.md +++ /dev/null @@ -1,3 +0,0 @@ -#### [BREAKING] Drop support for Node versions older than 10 ([#6908](https://github.com/prettier/prettier/pull/6908) by [@fisker](https://github.com/fisker)) - -The minimal required Node version now is 10.13.0. diff --git a/changelog_unreleased/api/pr-6963.md b/changelog_unreleased/api/pr-6963.md deleted file mode 100644 index 6e7bc6bbcc25..000000000000 --- a/changelog_unreleased/api/pr-6963.md +++ /dev/null @@ -1,10 +0,0 @@ -#### [BREAKING] Change default value for `trailingComma` to `es5` ([#6963](https://github.com/prettier/prettier/pull/6963) by [@fisker](https://github.com/fisker)) - -Before version 2.0, Prettier was avoiding trailing commas by default where possible. -This made the resulting JavaScript compatible with now very old environments such as IE8, but implied [some missed opportunities](https://medium.com/@nikgraf/why-you-should-enforce-dangling-commas-for-multiline-statements-d034c98e36f8). - -Prettier has included an [option to configure trailing commas](https://prettier.io/docs/en/options.html#trailing-commas) since its early days, and an initiative to change the default value has been out there [for over three years](https://github.com/prettier/prettier/issues/68). -Finally, the default value becomes `es5` instead of `none` in Prettier v2.0. - -If the old behavior is still preferred, please configure Prettier with `{ "trailingComma": "none" }`. -There is a possibility that the default value will change to `always` (meaning even more trailing commas) in a future major version of Prettier as the JavaScript ecosystem further matures. diff --git a/changelog_unreleased/api/pr-6993.md b/changelog_unreleased/api/pr-6993.md deleted file mode 100644 index 60a6798bf785..000000000000 --- a/changelog_unreleased/api/pr-6993.md +++ /dev/null @@ -1,10 +0,0 @@ -#### [BREAKING] Remove deprecated API and change util signatures ([#6993](https://github.com/prettier/prettier/pull/6993) by [@fisker](https://github.com/fisker)) - -- Parser `typescript-eslint` is removed. Use the `typescript` parser instead. -- `prettier.util.mapDoc` is removed. Use `prettier.doc.utils.mapDoc` instead. -- `prettier.util.isNextLineEmpty` is updated.
- Use `isNextLineEmpty(text, node, locEnd)` instead of `isNextLineEmpty(text, node, options)`. -- `prettier.util.isPreviousLineEmpty` is updated.
- Use `isPreviousLineEmpty(text, node, locStart)` instead of `isPreviousLineEmpty(text, node, options)`. -- `prettier.util.getNextNonSpaceNonCommentCharacterIndex` is updated.
- Use `getNextNonSpaceNonCommentCharacterIndex(text, node, locEnd)` instead of `getNextNonSpaceNonCommentCharacterIndex(text, node, options)`. diff --git a/changelog_unreleased/api/pr-7430.md b/changelog_unreleased/api/pr-7430.md deleted file mode 100644 index 802b02fb256e..000000000000 --- a/changelog_unreleased/api/pr-7430.md +++ /dev/null @@ -1,22 +0,0 @@ -#### [BREAKING] Change default value for `arrowParens` to `always` ([#7430](https://github.com/prettier/prettier/pull/7430) by [@kachkaev](https://github.com/kachkaev)) - -[Since version 1.9](https://prettier.io/blog/2017/12/05/1.9.0.html#option-to-add-parens-in-arrow-function-arguments-3324httpsgithubcomprettierprettierpull3324-by-rattrayalexhttpsgithubcomrattrayalex-and-suchipihttpsgithubcomsuchipi), Prettier has had an [option](https://prettier.io/docs/en/options.html#arrow-function-parentheses) to always wrap arrow function arguments with parentheses. -In version 2.0, this behavior has become the default. - - -```js -// Input -const fn = (x) => y => x + y; - -// Prettier stable -const fn = x => y => x + y; - -// Prettier master -const fn = (x) => (y) => x + y; -``` - -At first glance, avoiding parentheses in the isolated example above may look like a better choice because it results in less visual noise. -However, when Prettier removes parentheses, it becomes harder to add type annotations, extra arguments, default values, or a variety of [other things](https://twitter.com/ManuelBieh/status/1181880524954050560). -Consistent use of parentheses provides a better developer experience when editing real codebases, which justifies the change. - -You are encouraged to use the new default value, but if the old behavior is still preferred, please configure Prettier with `{ "arrowParens": "avoid" }`. diff --git a/changelog_unreleased/api/pr-7435.md b/changelog_unreleased/api/pr-7435.md deleted file mode 100644 index f36d3dd84904..000000000000 --- a/changelog_unreleased/api/pr-7435.md +++ /dev/null @@ -1,17 +0,0 @@ -#### [BREAKING] Change default value for `endOfLine` to `lf` ([#7435](https://github.com/prettier/prettier/pull/7435) by [@kachkaev](https://github.com/kachkaev)) - -Early versions of Prettier were formatting all files with the \*nix flavor of [line endings](https://en.wikipedia.org/wiki/Newline) (`\n`, also known as `LF`). -This behavior was changed in [#472](https://github.com/prettier/prettier/pull/472), which allowed preserving Windows line endings (`\r\n`, also known as `CRLF`). - -[Since Prettier version 1.15](https://prettier.io/blog/2018/11/07/1.15.0.html#add-an-option-to-enforce-line-endings-5327-by-kachkaev), the flavor of line endings has been configurable via the `endOfLine` option. -The default value was set to `auto` for backwards compatibility, which meant that Prettier preserved whichever flavor of line endings was already present in a given file. - -That meant Prettier converted mixed line endings within one file to what was found at the end of the first line. -However, line endings in separate files could still remain inconsistent. -Besides, contributors on different operating systems could accidentally change line endings in previously committed files and this would be fine with Prettier. -Doing so would produce a large `git diff` and thus make the line-by-line history for a file (`git blame`) harder to explore. - -You are encouraged to use the new default value for `endOfLine`, which is now `lf`. -It may be also worth [checking the option docs](https://prettier.io/docs/en/options.html#end-of-line) to ensure your project repository is configured correctly. -This will help you avoid a mix of line endings in the repo and a broken `git blame`. -If the old behavior is still preferred, please configure Prettier with `{ "endOfLine": "auto" }`. diff --git a/changelog_unreleased/api/pr-7485.md b/changelog_unreleased/api/pr-7485.md deleted file mode 100644 index 6abc9b8706bb..000000000000 --- a/changelog_unreleased/api/pr-7485.md +++ /dev/null @@ -1,3 +0,0 @@ -#### [BREAKING] Cache plugin search results ([#7485](https://github.com/prettier/prettier/pull/7485) by [@fisker](https://github.com/fisker)) - -Previously, Prettier searched the file system for plugins on every `prettier.format` call. Now, search results are cached. The cache can be cleared by calling `prettier.clearConfigCache()`. diff --git a/changelog_unreleased/api/pr-7511.md b/changelog_unreleased/api/pr-7511.md deleted file mode 100644 index ab59b6806b67..000000000000 --- a/changelog_unreleased/api/pr-7511.md +++ /dev/null @@ -1,8 +0,0 @@ -#### [BREAKING] Remove deprecated options and option values ([#7511](https://github.com/prettier/prettier/pull/7511), [#7533](https://github.com/prettier/prettier/pull/7533), [#7535](https://github.com/prettier/prettier/pull/7535), [#7536](https://github.com/prettier/prettier/pull/7536) by [@fisker](https://github.com/fisker)) - -- Options: - - `useFlowParser` (`--flow-parser` in CLI) has been deprecated [since `v0.0.10`](https://github.com/prettier/prettier/blob/master/CHANGELOG.md#0010). -- Option values: - - `parser`: `babylon` (renamed to `babel` in v1.16.0), `postcss` (renamed to `css` in v1.7.1) - - `proseWrap`: `true` (renamed to `always` in v1.9.0), `false` (renamed to `never` in v1.9.0) - - `trailingComma`: `true` (renamed to `es5` in v0.19.0), `false` (renamed to `none` in v0.19.0) diff --git a/changelog_unreleased/api/pr-7620.md b/changelog_unreleased/api/pr-7620.md deleted file mode 100644 index f3f1a67785e7..000000000000 --- a/changelog_unreleased/api/pr-7620.md +++ /dev/null @@ -1,3 +0,0 @@ -#### [BREAKING] Remove the `version` parameter of `prettier.getSupportInfo` ([#7620](https://github.com/prettier/prettier/pull/7620) by [@thorn0](https://github.com/thorn0)) - -Since Prettier 1.8.0, it was possible to pass a version number to `prettier.getSupportInfo` to get information on the languages, options, etc. supported by previous versions. This interesting but apparently not very useful API kept causing maintenance problems and has been removed in Prettier 2.0.0. diff --git a/changelog_unreleased/blog-post-intro.md b/changelog_unreleased/blog-post-intro.md index f349dba5bcd2..726b44873a4c 100644 --- a/changelog_unreleased/blog-post-intro.md +++ b/changelog_unreleased/blog-post-intro.md @@ -1,7 +1,7 @@ --- -author: "Georgii Dolzhykov (@thorn0)" -authorURL: "https://github.com/thorn0" -title: "Prettier 2.0 “2020”" +author: "🚧" +authorURL: "https://github.com/🚧" +title: "Prettier 🚧" --- -Better defaults, a better CLI and better heuristics. Oh, and TypeScript 3.8. +🚧 Write an introduction here. diff --git a/changelog_unreleased/cli/pr-7210.md b/changelog_unreleased/cli/pr-7210.md deleted file mode 100644 index c05a53969ac4..000000000000 --- a/changelog_unreleased/cli/pr-7210.md +++ /dev/null @@ -1,12 +0,0 @@ -#### Support file extensions `.cjs` and `.yaml.sed` ([#7210](https://github.com/prettier/prettier/pull/7210) by [@sosukesuzuki](https://github.com/sosukesuzuki)) - -```sh -# Prettier stable -$ prettier test.cjs -test.cjs[error] No parser could be inferred for file: test.cjs - -# Prettier master -$ prettier test.cjs -"use strict"; -console.log("Hello, World!"); -``` diff --git a/changelog_unreleased/cli/pr-7587.md b/changelog_unreleased/cli/pr-7587.md deleted file mode 100644 index 0a4ca4325471..000000000000 --- a/changelog_unreleased/cli/pr-7587.md +++ /dev/null @@ -1,3 +0,0 @@ -#### [HIGHLIGHT] Test whether passed globs are names of existing files before treating them as globs ([#7587](https://github.com/prettier/prettier/pull/7587) by [@fisker](https://github.com/fisker)) - -Since file names in Linux can contain almost any characters, strings like `foo*.js` and `[bar].css` are valid file names. Previously, if the user needed to format a file named `[bar].css`, a glob escaping syntax had to be used: `prettier "\[bar].css"` (this one doesn't work on Windows, where backslashes are treated as path separators) or `prettier "[[]bar].css"`. Because of this, important use cases were broken. E.g. [lint-staged](https://github.com/okonet/lint-staged) passes absolute paths and knows nothing about the escaping syntax. Now, when Prettier CLI gets a glob, it first tries to resolve it as a literal file name. diff --git a/changelog_unreleased/cli/pr-7588.md b/changelog_unreleased/cli/pr-7588.md deleted file mode 100644 index 9f33fd1c581b..000000000000 --- a/changelog_unreleased/cli/pr-7588.md +++ /dev/null @@ -1,4 +0,0 @@ -#### Respect `--ignore-path` when prettier executes from a subdirectory ([#7588](https://github.com/prettier/prettier/pull/7588) by [@heylookltsme](https://github.com/heylookltsme)) - -Changes the filename used when filtering ignored files to be relative to the -`--ignore-path`, if present, rather than the current working directory. diff --git a/changelog_unreleased/cli/pr-7660.md b/changelog_unreleased/cli/pr-7660.md deleted file mode 100644 index 3007f89bf62a..000000000000 --- a/changelog_unreleased/cli/pr-7660.md +++ /dev/null @@ -1,8 +0,0 @@ -#### [HIGHLIGHT] Expand directories, including `.` ([#7660](https://github.com/prettier/prettier/pull/7660) by [@thorn0](https://github.com/thorn0)) - -It's finally possible to run `prettier --write .` to format all supported files in the current directory and its subdirectories. -Directory names can be mixed with file names and glob patterns (e.g. `prettier src "test/*.spec.js" foo.js`). - -Also, the order in which files are processed has changed. Previously, all the files were sorted alphabetically before -formatting. Now, their order corresponds to the order of the specified paths. For each path, the list of resolved -files is sorted, but the full sorting of the resulting combined list isn't done anymore. diff --git a/changelog_unreleased/cli/pr-7668.md b/changelog_unreleased/cli/pr-7668.md deleted file mode 100644 index df86184aec14..000000000000 --- a/changelog_unreleased/cli/pr-7668.md +++ /dev/null @@ -1,3 +0,0 @@ -#### Remove `--stdin` ([#7668](https://github.com/prettier/prettier/pull/7668) by [@thorn0](https://github.com/thorn0)) - -This CLI flag, never properly documented, was supposed to make Prettier CLI read input from stdin, but Prettier CLI does so anyway when not given any file paths or glob patterns. So the flag was redundant. Now that it's been removed, if you use this flag in your commands, you'll see a warning: "Ignored unknown option". This warning is just information. It doesn't prevent the command from doing what it should do and doesn't affect the exit code. diff --git a/changelog_unreleased/css/pr-6947.md b/changelog_unreleased/css/pr-6947.md deleted file mode 100644 index 37f66d14b89f..000000000000 --- a/changelog_unreleased/css/pr-6947.md +++ /dev/null @@ -1,20 +0,0 @@ -#### Don't lowercase element names in CSS selectors ([#6947](https://github.com/prettier/prettier/pull/6947) by [@ark120202](https://github.com/ark120202)) - -Previously, Prettier already preserved casing of unknown element names, but it did lowercase names of HTML elements. -This caused issues when CSS was applied to a case-sensitive document and there was an element with the same name as in HTML, which is the case in NativeScript. -Prettier now always preserves original casing. - - -```css -/* Input */ -Label { -} - -/* Prettier stable */ -label { -} - -/* Prettier master */ -Label { -} -``` diff --git a/changelog_unreleased/flow/pr-7472.md b/changelog_unreleased/flow/pr-7472.md deleted file mode 100644 index 50b1a044baa3..000000000000 --- a/changelog_unreleased/flow/pr-7472.md +++ /dev/null @@ -1,15 +0,0 @@ -#### Add support for `symbol` ([#7472](https://github.com/prettier/prettier/pull/7472) by [@fisker](https://github.com/fisker)) - -A new AST node type was introduced in flow@0.114.0, now it's recognized. - - -```jsx -// Input -const x: symbol = Symbol(); - -// Prettier after updating Flow, but without this fix -Error: unknown type: "SymbolTypeAnnotation" - -// Prettier master -const x: symbol = Symbol(); -``` diff --git a/changelog_unreleased/flow/pr-7482.md b/changelog_unreleased/flow/pr-7482.md deleted file mode 100644 index 19b8442e2a31..000000000000 --- a/changelog_unreleased/flow/pr-7482.md +++ /dev/null @@ -1,31 +0,0 @@ -#### Add support for decorators ([#7482](https://github.com/prettier/prettier/pull/7482) by [@fisker](https://github.com/fisker)) - - -```jsx -// Input -/* @flow */ -@decorator4 -class Foo { - @decorator1 - method1() {} - - @decorator2 - @decorator3 - method2() {} -} - -// Prettier stable -SyntaxError: Unexpected token `@`, expected the token `class` (2:1) - -// Prettier master -/* @flow */ -@decorator4 -class Foo { - @decorator1 - method1() {} - - @decorator2 - @decorator3 - method2() {} -} -``` diff --git a/changelog_unreleased/flow/pr-7484.md b/changelog_unreleased/flow/pr-7484.md deleted file mode 100644 index bf6db7c57319..000000000000 --- a/changelog_unreleased/flow/pr-7484.md +++ /dev/null @@ -1,19 +0,0 @@ -#### Fix private class field declarations ([#7484](https://github.com/prettier/prettier/pull/7484) by [@fisker](https://github.com/fisker)) - - -```js -// Input -class Foo { - #privateProp: number; -} - -// Prettier stable -class Foo { - privateProp: number; -} - -// Prettier master -class Foo { - #privateProp: number; -} -``` diff --git a/changelog_unreleased/graphql/pr-7305.md b/changelog_unreleased/graphql/pr-7305.md deleted file mode 100644 index b4457930457b..000000000000 --- a/changelog_unreleased/graphql/pr-7305.md +++ /dev/null @@ -1,33 +0,0 @@ -#### Improve detection of separator between interfaces ([#7305](https://github.com/prettier/prettier/pull/7305) by [@fisker](https://github.com/fisker)) - -Even though using a comma to separate multiple implemented interfaces is deprecated syntax, in order to support legacy use cases, Prettier keeps the original separator and doesn't wilfully replace commas with ampersands. Previously, however, this logic contained a bug, so the wrong separator could end up in the output. This is fixed now. - - -```graphql -# Input -type Type1 implements A, B -# { & <-- Removing this comment changes the separator in stable -{a: a} - -type Type2 implements A, B & C{a: a} - -# Prettier stable -type Type1 implements A & B { - # { & <-- Removing this comment changes the separator in stable - a: a -} - -type Type2 implements A & B & C { - a: a -} - -# Prettier master -type Type1 implements A, B { - # { & <-- Removing this comment changes the separator in stable - a: a -} - -type Type2 implements A, B & C { - a: a -} -``` diff --git a/changelog_unreleased/handlebars/pr-7051.md b/changelog_unreleased/handlebars/pr-7051.md deleted file mode 100644 index ce55c9f68f2b..000000000000 --- a/changelog_unreleased/handlebars/pr-7051.md +++ /dev/null @@ -1,58 +0,0 @@ -#### Fix superfluous line breaks in `ConcatStatement` ([#7051](https://github.com/prettier/prettier/pull/7051) by [@dcyriller](https://github.com/dcyriller)) - - -```hbs -{{!-- input --}} -Link - -{{!-- Prettier stable --}} - - Link - - -{{!-- Prettier master --}} - - Link - -``` - -and - -```hbs -{{!-- input --}} -
- Hello -
- -{{!-- Prettier stable --}} -
- Hello -
- -{{!-- Prettier master --}} -
- Hello -
-``` diff --git a/changelog_unreleased/handlebars/pr-7052.md b/changelog_unreleased/handlebars/pr-7052.md deleted file mode 100644 index 7111bc6786e8..000000000000 --- a/changelog_unreleased/handlebars/pr-7052.md +++ /dev/null @@ -1,18 +0,0 @@ -#### Fix a falling mustache issue ([#7052](https://github.com/prettier/prettier/pull/7052) by [@dcyriller](https://github.com/dcyriller)) - - -```hbs -{{!-- input --}} - - -{{!-- stable --}} - - -{{!-- master --}} - -``` diff --git a/changelog_unreleased/handlebars/pr-7157.md b/changelog_unreleased/handlebars/pr-7157.md deleted file mode 100644 index b49f82cada13..000000000000 --- a/changelog_unreleased/handlebars/pr-7157.md +++ /dev/null @@ -1,20 +0,0 @@ -#### Improve `MustacheStatement` printing ([#7157](https://github.com/prettier/prettier/pull/7157) by [@dcyriller](https://github.com/dcyriller)) - - -```hbs -{{!-- input --}} -

Hi here is your name, as it will be displayed {{firstName}} {{lastName}} , welcome!

- -{{!-- stable --}} -

- Hi here is your name, as it will be displayed {{firstName}} {{lastName - }} , welcome! -

- -{{!-- master --}} -

- Hi here is your name, as it will be displayed {{firstName}} {{ - lastName - }} , welcome! -

-``` diff --git a/changelog_unreleased/handlebars/pr-7275.md b/changelog_unreleased/handlebars/pr-7275.md deleted file mode 100644 index e4b50c9e4ff0..000000000000 --- a/changelog_unreleased/handlebars/pr-7275.md +++ /dev/null @@ -1,49 +0,0 @@ -#### Add support for `prettier-ignore` ([#7275](https://github.com/prettier/prettier/pull/7275) by [@chadian](https://github.com/chadian)) - - -```hbs -{{! Input}} -{{! prettier-ignore }} -
- "hello! my parent was ignored" - {{#my-crazy-component "shall" be="preserved"}} - - {{/my-crazy-component}} -
- -{{#a-normal-component isRestoredTo = "order" }} - -{{/a-normal-component}} - -{{! Prettier stable}} -{{! prettier-ignore }} -
- "hello! my parent was ignored" - {{#my-crazy-component "shall" be="preserved"}} - - {{/my-crazy-component}} -
- -{{#a-normal-component isRestoredTo="order"}} - -{{/a-normal-component}} - -{{! Prettier master}} -{{! prettier-ignore }} -
- "hello! my parent was ignored" - {{#my-crazy-component "shall" be="preserved"}} - - {{/my-crazy-component}} -
- -{{#a-normal-component isRestoredTo='order'}} - -{{/a-normal-component}} -``` diff --git a/changelog_unreleased/handlebars/pr-7306.md b/changelog_unreleased/handlebars/pr-7306.md deleted file mode 100644 index 4a742faa54a4..000000000000 --- a/changelog_unreleased/handlebars/pr-7306.md +++ /dev/null @@ -1,24 +0,0 @@ -#### Support printing inline Handlebars in HTML ([#7306](https://github.com/prettier/prettier/pull/7306) by [@dcyriller](https://github.com/dcyriller)) - - -``` - - - - - - - - -``` diff --git a/changelog_unreleased/handlebars/pr-7552.md b/changelog_unreleased/handlebars/pr-7552.md deleted file mode 100644 index 8bc48484012e..000000000000 --- a/changelog_unreleased/handlebars/pr-7552.md +++ /dev/null @@ -1,17 +0,0 @@ -#### Fix stripped value from AttrNode ([#7552](https://github.com/prettier/prettier/pull/7552) by [@bantic](https://github.com/bantic)) - - -```hbs -{{!-- input --}} -
    -
- -{{!-- Prettier stable --}} -
    - -{{!-- Prettier master --}} -
      -
    -``` diff --git a/changelog_unreleased/handlebars/pr-7575.md b/changelog_unreleased/handlebars/pr-7575.md deleted file mode 100644 index 16d8f9738703..000000000000 --- a/changelog_unreleased/handlebars/pr-7575.md +++ /dev/null @@ -1,25 +0,0 @@ -#### Preserve whitespace control characters ([#7575](https://github.com/prettier/prettier/pull/7575) by [@mahirshah](https://github.com/mahirshah)) - - -```hbs -{{!-- input --}} -{{~#if bar}} - if1 -{{~else~}} - else -{{~/if~}} - -{{!-- stable --}} -{{#if bar}} - if1 -{{else}} - else -{{/if}} - -{{!-- master --}} -{{~#if bar}} - if1 -{{~else~}} - else -{{~/if~}} -``` diff --git a/changelog_unreleased/html/pr-5959.md b/changelog_unreleased/html/pr-5959.md deleted file mode 100644 index 0abea196e6d3..000000000000 --- a/changelog_unreleased/html/pr-5959.md +++ /dev/null @@ -1,24 +0,0 @@ -#### Comments in `pre` tags caused bad formatting of following closing tag ([#5959](https://github.com/prettier/prettier/pull/5959) by [@selvazhagan](https://github.com/selvazhagan)) - - -```html - -
    -
    -    
    -  
    - - -
    -
    -    
    -  
    - - -
    -
    -    
    -  
    -
    -``` diff --git a/changelog_unreleased/html/pr-7273.md b/changelog_unreleased/html/pr-7273.md deleted file mode 100644 index e9ef5fdda638..000000000000 --- a/changelog_unreleased/html/pr-7273.md +++ /dev/null @@ -1,59 +0,0 @@ -#### Don't treat colons as namespace prefix delimiters in tag names ([#7273](https://github.com/prettier/prettier/pull/7273) by [@fisker](https://github.com/fisker)) - -In HTML5, colons don't have any special meaning in tag names. Previously, Prettier treated them the XML way, as namespace prefix delimiters, but no more. In practice, this means that tags whose ancestors have colons in their names are now treated as usual HTML tags: if they're known standard tags, their names can be lowercased and assumptions can be made about their whitespace sensitivity; custom elements whose names are unknown to Prettier retain the casing of their names and, if `--html-whitespace-sensitivity` is set to `css`, are treated as inline. - - -```html - - -
    looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block
    -
    block
    block
    block
    block
    block
    -
     pre pr
    -e
    - - looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline - inline inline inline inline -
    - - - -
    - looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block -
    -
    block
    block
    block
    block
    block
    -
     pre pr e
    - - - looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline - - inline inline inline inline -
    - - - -
    - looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block -
    -
    block
    -
    block
    -
    block
    -
    block
    -
    block
    -
    - pre pr
    -e
    - - - looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline - - inline inline inline inline -
    -``` diff --git a/changelog_unreleased/html/pr-7293.md b/changelog_unreleased/html/pr-7293.md deleted file mode 100644 index 6a90e9870673..000000000000 --- a/changelog_unreleased/html/pr-7293.md +++ /dev/null @@ -1,14 +0,0 @@ -#### Do not throw on broken HTML ([#7293](https://github.com/prettier/prettier/pull/7293) by [@fisker](https://github.com/fisker)) - - -```html - -
    -< - - -TypeError: Cannot read property 'start' of null - - -
    <
    -``` diff --git a/changelog_unreleased/html/pr-7295.md b/changelog_unreleased/html/pr-7295.md deleted file mode 100644 index 679499a0b48c..000000000000 --- a/changelog_unreleased/html/pr-7295.md +++ /dev/null @@ -1,17 +0,0 @@ -#### Fix srcset parse error ([#7295](https://github.com/prettier/prettier/pull/7295) by [@fisker](https://github.com/fisker)) - - -```html - - - - -Error: Mixed descriptor in srcset is not supported - - - -``` diff --git a/changelog_unreleased/html/pr-7392.md b/changelog_unreleased/html/pr-7392.md deleted file mode 100644 index a01048586296..000000000000 --- a/changelog_unreleased/html/pr-7392.md +++ /dev/null @@ -1,15 +0,0 @@ -#### Fix error thrown on unclosed tag in `pre` tag ([#7392](https://github.com/prettier/prettier/pull/7392) by [@fisker](https://github.com/fisker)) - - -```html - -

    -

    - - -TypeError: Cannot read property 'start' of null - - -

    -

    -``` diff --git a/changelog_unreleased/html/pr-7395.md b/changelog_unreleased/html/pr-7395.md deleted file mode 100644 index c17c68468901..000000000000 --- a/changelog_unreleased/html/pr-7395.md +++ /dev/null @@ -1,23 +0,0 @@ -#### Fix inconsistent formatting of self-closing tags ([#7395](https://github.com/prettier/prettier/pull/7395) by [@fisker](https://github.com/fisker)) - - -```html - - - - - - - - - - - - - - -``` diff --git a/changelog_unreleased/html/pr-7461.md b/changelog_unreleased/html/pr-7461.md deleted file mode 100644 index 8085d31c4781..000000000000 --- a/changelog_unreleased/html/pr-7461.md +++ /dev/null @@ -1,22 +0,0 @@ -#### Fix empty lines unexpectedly added after `table` tags ([#7461](https://github.com/prettier/prettier/pull/7461) by [@ikatyang](https://github.com/ikatyang)) - - -```html - - - -
    Should not insert empty line before this div
    - - - - -
    - -
    Should not insert empty line before this div
    - - - - -
    -
    Should not insert empty line before this div
    -``` diff --git a/changelog_unreleased/html/pr-7555.md b/changelog_unreleased/html/pr-7555.md deleted file mode 100644 index 2b841f1660e7..000000000000 --- a/changelog_unreleased/html/pr-7555.md +++ /dev/null @@ -1,32 +0,0 @@ -#### Format value of HTML `class` attribute ([#7555](https://github.com/prettier/prettier/pull/7555) by [@fisker](https://github.com/fisker)) - - -```html - -
    -
    - - -
    -
    - - -
    -
    -``` diff --git a/changelog_unreleased/html/pr-7556.md b/changelog_unreleased/html/pr-7556.md deleted file mode 100644 index 0e56fb55f2e1..000000000000 --- a/changelog_unreleased/html/pr-7556.md +++ /dev/null @@ -1,48 +0,0 @@ -#### Format value of HTML `style` attribute ([#7556](https://github.com/prettier/prettier/pull/7556) by [@fisker](https://github.com/fisker)) - - -```html - -
    -
    -
    -
    - - -
    -
    - - - -
    -
    -``` diff --git a/changelog_unreleased/html/pr-7654.md b/changelog_unreleased/html/pr-7654.md deleted file mode 100644 index fc60a96954e7..000000000000 --- a/changelog_unreleased/html/pr-7654.md +++ /dev/null @@ -1,40 +0,0 @@ -#### Support `` for text ([#7654](https://github.com/prettier/prettier/pull/7654) by [@graemeworthy](https://github.com/graemeworthy)) - -Previously, it worked only for tags. Useful for protecting various macros and pre-processor commands from being corrupted by formatting. - - -```html - - -A super long string that has been marked as ignore because it was probably generated by some script. - - - -A super long string that has been marked as ignore because it was probably -generated by some script. - - - -A super long string that has been marked as ignore because it was probably generated by some script. -``` - - -```html - - -| Dogs | Cats | Weasels | Bats | Pigs | Mice | Hedgehogs | Capybaras | Rats | Tigers | -| ---- | ---- | ------- | ---- | ---- | ---- | --------- | --------- | ---- | ------ | -| 1 | 1 | 0 | 0 | 1 | 1 | 5 | 16 | 4 | 0 | - - - -| Dogs | Cats | Weasels | Bats | Pigs | Mice | Hedgehogs | Capybaras | Rats | -Tigers | | ---- | ---- | ------- | ---- | ---- | ---- | --------- | --------- | ----- | ------ | | 1 | 1 | 0 | 0 | 1 | 1 | 5 | 16 | 4 | 0 | - - - -| Dogs | Cats | Weasels | Bats | Pigs | Mice | Hedgehogs | Capybaras | Rats | Tigers | -| ---- | ---- | ------- | ---- | ---- | ---- | --------- | --------- | ---- | ------ | -| 1 | 1 | 0 | 0 | 1 | 1 | 5 | 16 | 4 | 0 | -``` diff --git a/changelog_unreleased/javascript/pr-3903.md b/changelog_unreleased/javascript/pr-3903.md deleted file mode 100644 index 76427d503e58..000000000000 --- a/changelog_unreleased/javascript/pr-3903.md +++ /dev/null @@ -1,26 +0,0 @@ -#### Always add a space after the `function` keyword ([#3903](https://github.com/prettier/prettier/pull/3903) by [@j-f1](https://github.com/j-f1), [@josephfrazier](https://github.com/josephfrazier), [@sosukesuzuki](https://github.com/sosukesuzuki), [@thorn0](https://github.com/thorn0); [#7516](https://github.com/prettier/prettier/pull/7516) by [@bakkot](https://github.com/bakkot)) - -Previously, a space would be added after the `function` keyword in function declarations, but not in function expressions. Now, for consistency, a space is always added after the `function` keyword. The only exception is generator declarations where `function*` is treated as a whole word. - - -```ts -// Prettier stable -const identity = function(value) { - return value; -}; -function identity(value) { - return value; -} -const f = function(value: T) {}; -const g = function*() {}; - -// Prettier master -const identity = function (value) { - return value; -}; -function identity(value) { - return value; -} -const f = function (value: T) {}; -const g = function* () {}; -``` diff --git a/changelog_unreleased/javascript/pr-6685.md b/changelog_unreleased/javascript/pr-6685.md deleted file mode 100644 index 6a002873dec3..000000000000 --- a/changelog_unreleased/javascript/pr-6685.md +++ /dev/null @@ -1,25 +0,0 @@ -#### [HIGHLIGHT] Improved method chain breaking heuristic ([#6685](https://github.com/prettier/prettier/pull/6685) by [@mmkal](https://github.com/mmkal)) - -Previously, any method call chain of length three or longer would be automatically broken into multiple lines. The new heuristic is based on the complexity of the call arguments in the chain, rather than simply on the chain's length. Now, if chained method calls have arguments which aren't easy to understand at a glance (e.g. functions or deeply-nested objects), the chain is broken. Otherwise, they're allowed to remain on one line. See prior issues [#3197](https://github.com/prettier/prettier/issues/3107), [#4765](https://github.com/prettier/prettier/pull/4765), [#1565](https://github.com/prettier/prettier/issues/1565) and [#4125](https://github.com/prettier/prettier/pull/4125) for context and examples. - - -```javascript -// Output (Prettier stable) -if ( - foo - .one() - .two() - .three() === - bar - .four() - .five() - .six() -) { - // ... -} - -// Output (Prettier master) -if (foo.one().two().three() === bar.four().five().six()) { - // ... -} -``` diff --git a/changelog_unreleased/javascript/pr-6984.md b/changelog_unreleased/javascript/pr-6984.md deleted file mode 100644 index 902455029368..000000000000 --- a/changelog_unreleased/javascript/pr-6984.md +++ /dev/null @@ -1,21 +0,0 @@ -#### Fix unstable formatting of labeled statements with comments ([#6984](https://github.com/prettier/prettier/pull/6984) by [@clement26695](https://github.com/clement26695)) - - -```jsx -// Input -loop1: -//test -const i = 3; - -// Prettier stable (first output) -loop1: //test -const i = 3; - -// Prettier stable (second output) -//test -loop1: const i = 3; - -// Prettier master (first output) -//test -loop1: const i = 3; -``` diff --git a/changelog_unreleased/javascript/pr-7010.md b/changelog_unreleased/javascript/pr-7010.md deleted file mode 100644 index 73563471a0c4..000000000000 --- a/changelog_unreleased/javascript/pr-7010.md +++ /dev/null @@ -1,28 +0,0 @@ -#### Fix formatting of logical, binary and sequence expressions in template literals ([#7010](https://github.com/prettier/prettier/pull/7010) by [@evilebottnawi](https://github.com/evilebottnawi)) - - -```js -// Input -`111111111 222222222 333333333 444444444 555555555 666666666 777777777 ${foo || bar}`; -`111111111 222222222 333333333 444444444 555555555 666666666 777777777 ${foo | bar}`; -`111111111 222222222 333333333 444444444 555555555 666666666 777777777 ${(foo, bar)}`; - -// Prettier stable -`111111111 222222222 333333333 444444444 555555555 666666666 777777777 ${foo || - bar}`; -`111111111 222222222 333333333 444444444 555555555 666666666 777777777 ${foo | - bar}`; -`111111111 222222222 333333333 444444444 555555555 666666666 777777777 ${(foo, -bar)}`; - -// Prettier master -`111111111 222222222 333333333 444444444 555555555 666666666 777777777 ${ - foo || bar -}`; -`111111111 222222222 333333333 444444444 555555555 666666666 777777777 ${ - foo | bar -}`; -`111111111 222222222 333333333 444444444 555555555 666666666 777777777 ${ - (foo, bar) -}`; -``` diff --git a/changelog_unreleased/javascript/pr-7026.md b/changelog_unreleased/javascript/pr-7026.md deleted file mode 100644 index 0d29dbe3f4d7..000000000000 --- a/changelog_unreleased/javascript/pr-7026.md +++ /dev/null @@ -1,26 +0,0 @@ -#### Fix unstable formatting of logical expressions ([#7026](https://github.com/prettier/prettier/pull/7026) by [@thorn0](https://github.com/thorn0)) - - -```jsx -// Input -const averredBathersBoxroomBuggyNurl = - bifornCringerMoshedPerplexSawder === 1 || - (askTrovenaBeenaDependsRowans === 2 || glimseGlyphsHazardNoopsTieTie === 3); - -// Prettier stable (first output) -const averredBathersBoxroomBuggyNurl = - bifornCringerMoshedPerplexSawder === 1 || - askTrovenaBeenaDependsRowans === 2 || glimseGlyphsHazardNoopsTieTie === 3; - -// Prettier stable (second output) -const averredBathersBoxroomBuggyNurl = - bifornCringerMoshedPerplexSawder === 1 || - askTrovenaBeenaDependsRowans === 2 || - glimseGlyphsHazardNoopsTieTie === 3; - -// Prettier master (first and second outputs) -const averredBathersBoxroomBuggyNurl = - bifornCringerMoshedPerplexSawder === 1 || - askTrovenaBeenaDependsRowans === 2 || - glimseGlyphsHazardNoopsTieTie === 3; -``` diff --git a/changelog_unreleased/javascript/pr-7070.md b/changelog_unreleased/javascript/pr-7070.md deleted file mode 100644 index 96d3aa80c448..000000000000 --- a/changelog_unreleased/javascript/pr-7070.md +++ /dev/null @@ -1,24 +0,0 @@ -#### Format `throw` like `return` ([#7070](https://github.com/prettier/prettier/pull/7070) by [@sosukesuzuki](https://github.com/sosukesuzuki)) - - -```js -// Input -function foo() { - throw this.hasPlugin("dynamicImports") && this.lookahead().type === tt.parenLeft.right; -} - -// Prettier stable -function foo() { - throw this.hasPlugin("dynamicImports") && - this.lookahead().type === tt.parenLeft.right; -} - - -// Prettier master -function foo() { - throw ( - this.hasPlugin("dynamicImports") && - this.lookahead().type === tt.parenLeft.right - ); -} -``` diff --git a/changelog_unreleased/javascript/pr-7087.md b/changelog_unreleased/javascript/pr-7087.md deleted file mode 100644 index 3b77cf511d7c..000000000000 --- a/changelog_unreleased/javascript/pr-7087.md +++ /dev/null @@ -1,25 +0,0 @@ -#### Fix indentation in ternaries nested in conditions of other ternaries ([#7087](https://github.com/prettier/prettier/pull/7087) by [@thorn0](https://github.com/thorn0)) - - -```jsx -// Input -const foo = (number % 10 >= 2 && (number % 100 < 10 || number % 100 >= 20) ? -kochabCooieGameOnOboleUnweave : annularCooeedSplicesWalksWayWay) -? anodyneCondosMalateOverateRetinol : averredBathersBoxroomBuggyNurl; - -// Prettier stable -const foo = (number % 10 >= 2 && (number % 100 < 10 || number % 100 >= 20) -? kochabCooieGameOnOboleUnweave -: annularCooeedSplicesWalksWayWay) - ? anodyneCondosMalateOverateRetinol - : averredBathersBoxroomBuggyNurl; - -// Prettier master -const foo = ( - number % 10 >= 2 && (number % 100 < 10 || number % 100 >= 20) - ? kochabCooieGameOnOboleUnweave - : annularCooeedSplicesWalksWayWay -) - ? anodyneCondosMalateOverateRetinol - : averredBathersBoxroomBuggyNurl; -``` diff --git a/changelog_unreleased/javascript/pr-7138.md b/changelog_unreleased/javascript/pr-7138.md deleted file mode 100644 index 596d3ef593f3..000000000000 --- a/changelog_unreleased/javascript/pr-7138.md +++ /dev/null @@ -1,31 +0,0 @@ -#### Tweak function composition logic for decorators ([#7138](https://github.com/prettier/prettier/pull/7138) by [@brainkim](https://github.com/brainkim)) - -Because decorators modify the line following, splitting a decorator call’s -arguments onto multiple lines can obscure the relationship between the -decorator and its intended target, producing less-readable code. Therefore, the -function composition logic introduced in [#6033](https://github.com/prettier/prettier/pull/6033) has been changed to exclude -decorator calls. - - -```jsx -// Input -export class Item { - @OneToOne(() => Thing, x => x.item) - thing!: Thing; -} - -// Output (Prettier stable) -export class Item { - @OneToOne( - () => Thing, - x => x.item, - ) - thing!: Thing; -} - -// Output (Prettier master) -export class Item { - @OneToOne(() => Thing, x => x.item) - thing!: Thing; -} -``` diff --git a/changelog_unreleased/javascript/pr-7140.md b/changelog_unreleased/javascript/pr-7140.md deleted file mode 100644 index 32a3eae0afcc..000000000000 --- a/changelog_unreleased/javascript/pr-7140.md +++ /dev/null @@ -1,14 +0,0 @@ -#### Correct semicolon placement in empty `return` statement with comment ([#7140](https://github.com/prettier/prettier/pull/7140) by [@sosukesuzuki](https://github.com/sosukesuzuki)) - - -```js -// Input -return // comment -; - -// Prettier stable -return // comment; - -// Prettier master -return; // comment -``` diff --git a/changelog_unreleased/javascript/pr-7208.md b/changelog_unreleased/javascript/pr-7208.md deleted file mode 100644 index a59e38f23c95..000000000000 --- a/changelog_unreleased/javascript/pr-7208.md +++ /dev/null @@ -1,23 +0,0 @@ -#### Respect whitespace significance in HTML template literals ([#7208](https://github.com/prettier/prettier/pull/7208) by [@saschanaz](https://github.com/saschanaz)) - -Prettier had been adding newlines for every HTML template string, which could lead to unexpected whitespace in rendered HTML. -This doesn't happen anymore unless `--html-whitespace-sensitivity ignore` option is given. - - -```jsx -// Input -html`
    `; -html` TEXT `; - -// Prettier stable -html` -
    -`; -html` - TEXT -`; - -// Prettier master -html`
    `; -html` TEXT `; -``` diff --git a/changelog_unreleased/javascript/pr-7367.md b/changelog_unreleased/javascript/pr-7367.md deleted file mode 100644 index 58eaa4e94faf..000000000000 --- a/changelog_unreleased/javascript/pr-7367.md +++ /dev/null @@ -1,19 +0,0 @@ -#### Remove unnecessary parens when yielding JSX ([#7367](https://github.com/prettier/prettier/pull/7367) by [@cola119](https://github.com/cola119)) - - -```jsx -// Input -function* f() { - yield
    generator
    ; -} - -// Prettier stable -function* f() { - yield (
    generator
    ); -} - -// Prettier master -function* f() { - yield
    generator
    ; -} -``` diff --git a/changelog_unreleased/javascript/pr-7491.md b/changelog_unreleased/javascript/pr-7491.md deleted file mode 100644 index be71edf1bb44..000000000000 --- a/changelog_unreleased/javascript/pr-7491.md +++ /dev/null @@ -1,15 +0,0 @@ -#### Keep parentheses around comma expressions in default export declarations ([#7491](https://github.com/prettier/prettier/pull/7491) by [@fisker](https://github.com/fisker)) - -Omitting these parentheses makes the code invalid. - - -```jsx -// Input -export default (1, 2); - -// Prettier stable -export default 1, 2; - -// Prettier master -export default (1, 2); -``` diff --git a/changelog_unreleased/javascript/pr-7500.md b/changelog_unreleased/javascript/pr-7500.md deleted file mode 100644 index bc6540344c1a..000000000000 --- a/changelog_unreleased/javascript/pr-7500.md +++ /dev/null @@ -1,16 +0,0 @@ -#### Fix edge cases with parentheses around optional chaining ([#7500](https://github.com/prettier/prettier/pull/7500) by [@thorn0](https://github.com/thorn0)) - - -```jsx -// Input -(foo?.bar)(); -new (foo?.bar)(); - -// Prettier stable -foo?.bar(); -new foo?.bar(); - -// Prettier master -(foo?.bar)(); -new (foo?.bar)(); -``` diff --git a/changelog_unreleased/javascript/pr-7504.md b/changelog_unreleased/javascript/pr-7504.md deleted file mode 100644 index fdd3f38e1a37..000000000000 --- a/changelog_unreleased/javascript/pr-7504.md +++ /dev/null @@ -1,38 +0,0 @@ -#### Don't wrap `undefined` in parentheses in conditional expressions within JSX ([#7504](https://github.com/prettier/prettier/pull/7504) by [@fisker](https://github.com/fisker)) - -Previously, parentheses were added around any expression except `null`. Now, `undefined` is excluded too. - - -```js -// Input -foo ? loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong jsx : -undefined -foo ? loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong jsx : -null - -// Prettier stable -foo ? ( - - loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong jsx - -) : ( - undefined -); -foo ? ( - - loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong jsx - -) : null; - -// Prettier master -foo ? ( - - loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong jsx - -) : undefined; -foo ? ( - - loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong jsx - -) : null; -``` diff --git a/changelog_unreleased/javascript/pr-7709.md b/changelog_unreleased/javascript/pr-7709.md deleted file mode 100644 index 9ffff8eec026..000000000000 --- a/changelog_unreleased/javascript/pr-7709.md +++ /dev/null @@ -1,14 +0,0 @@ -#### Keep comments position for assignments/variables ([#7709](https://github.com/prettier/prettier/pull/7709) by [@sosukesuzuki](https://github.com/sosukesuzuki)) - - -```jsx -// Input -const foo = /* comments */ - bar; - -// Prettier stable -const foo /* comments */ = bar; - -// Prettier master -const foo = /* comments */ bar; -``` diff --git a/changelog_unreleased/javascript/pr-7791.md b/changelog_unreleased/javascript/pr-7791.md deleted file mode 100644 index 37779583051a..000000000000 --- a/changelog_unreleased/javascript/pr-7791.md +++ /dev/null @@ -1,23 +0,0 @@ -#### [HIGHLIGHT] Ultimate fix for Closure-style type casts ([#7791](https://github.com/prettier/prettier/pull/7791) by [@thorn0](https://github.com/thorn0), [#7011](https://github.com/prettier/prettier/pull/7011) by [@evilebottnawi](https://github.com/evilebottnawi)) - -Prettier has been trying not to corrupt these JSDoc type assertions since [v1.6.0](https://prettier.io/blog/2017/08/29/1.6.0.html#handle-closure-compiler-type-cast-syntax-correctly-2484httpsgithubcomprettierprettierpull2484-by-yangsuhttpsgithubcomyangsu), with mixed results. As type checking based on JSDoc becomes increasingly common, we've been getting new bug reports about this syntax. The bugs were tricky because the required parentheses around the expression weren't part of the AST, so Prettier didn't have a good way to detect their presence. - -Finally, we used the `createParenthesizedExpressions` option of the Babel parser to represent parentheses in the AST using non-standard nodes. This helped fix all the reported bugs. - -Consequently, Prettier won't recognize JSDoc type casts if the `flow` or `typescript` parser is used, but this is reasonable as this syntax makes little sense in Flow and TypeScript files. - - -```jsx -// Input -const nestedAssertions = /** @type {MyType} */ - (/** @type {unknown} */ - (x)); - -// Prettier stable -const nestedAssertions /** @type {MyType} */ /** @type {unknown} */ = x; - -// Prettier master -const nestedAssertions = /** @type {MyType} */ (/** @type {unknown} */ (x)); -``` - -Reference documentation for this syntax: [Closure Compiler](https://github.com/google/closure-compiler/wiki/Annotating-JavaScript-for-the-Closure-Compiler#type-type), [TypeScript (with `--checkJs`)](https://www.typescriptlang.org/docs/handbook/type-checking-javascript-files.html#casts). diff --git a/changelog_unreleased/less/pr-6981.md b/changelog_unreleased/less/pr-6981.md deleted file mode 100644 index 40d0c3d83fea..000000000000 --- a/changelog_unreleased/less/pr-6981.md +++ /dev/null @@ -1,6 +0,0 @@ -#### Fix multiple long-standing issues by updating `postcss-less` ([#6981](https://github.com/prettier/prettier/pull/6981) by [@fisker](https://github.com/fisker), [#7021](https://github.com/prettier/prettier/pull/7021) by [@evilebottnawi](https://github.com/evilebottnawi), [@thorn0](https://github.com/thorn0)) - -- [`each`](http://lesscss.org/functions/#list-functions-each) is supported now ([#5653](https://github.com/prettier/prettier/issues/5653)). -- `!important` was being moved out of mixin call parameters ([#3544](https://github.com/prettier/prettier/issues/3544)). -- Comments in rulesets passed to mixin calls caused duplicate semicolons ([#3096](https://github.com/prettier/prettier/issues/3096)). -- `::before` was broken in mixin call parameters ([#5791](https://github.com/prettier/prettier/issues/5791)). diff --git a/changelog_unreleased/markdown/pr-6852.md b/changelog_unreleased/markdown/pr-6852.md deleted file mode 100644 index 05c1136e928b..000000000000 --- a/changelog_unreleased/markdown/pr-6852.md +++ /dev/null @@ -1,19 +0,0 @@ -#### Handle zero-based lists correctly ([#6852](https://github.com/prettier/prettier/pull/6852) by [@evilebottnawi](https://github.com/evilebottnawi)) - - -```md - -0. List -1. List -2. List - - -0. List -1. List -1. List - - -0. List -1. List -2. List -``` diff --git a/changelog_unreleased/markdown/pr-7178.md b/changelog_unreleased/markdown/pr-7178.md deleted file mode 100644 index 6da36e619828..000000000000 --- a/changelog_unreleased/markdown/pr-7178.md +++ /dev/null @@ -1,79 +0,0 @@ -#### Fix redundant leading spaces in lists ([#7178](https://github.com/prettier/prettier/pull/7178) by [@sasurau4](https://github.com/sasurau4)) - - -```md - -- a - b - c - d - e - -- a - b - c - d - e - -1. a - b - c - d - e - -1. a - b - c - d - e - - -- a - b - c - d - e - -- a - b - c - d - e - -1. a - b - c - d - e - -1. a - b - c - d - e - - -- a - b - c - d - e - -- a - b - c - d - e - -1. a - b - c - d - e - -1. a - b - c - d - e -``` diff --git a/changelog_unreleased/markdown/pr-7181.md b/changelog_unreleased/markdown/pr-7181.md deleted file mode 100644 index 04b9ed2c5635..000000000000 --- a/changelog_unreleased/markdown/pr-7181.md +++ /dev/null @@ -1,46 +0,0 @@ -#### Fix HTML formatting broken if the beginning tag starts after a list item ([#7181](https://github.com/prettier/prettier/pull/7181) and [#7220](https://github.com/prettier/prettier/pull/7220) by [@sasurau4](https://github.com/sasurau4)) - -Previously, when Prettier formatted an HTML tag placed just after a list item, it would insert indent and break the relationship of open and close tag. Now, Prettier no longer changes anything. - - -```md - -- A list item. -
    Summary -

    - -- A list item. - -

    -
    - -- A list item -
    asdf
    - - -- A list item. - -
    Summary -

    - -- A list item. - -

    -
    - -- A list item -
    asdf
    - - -- A list item. -
    Summary -

    - -- A list item. - -

    -
    - -- A list item -
    asdf
    -``` diff --git a/changelog_unreleased/markdown/pr-7203.md b/changelog_unreleased/markdown/pr-7203.md deleted file mode 100644 index 41c36d0bb44a..000000000000 --- a/changelog_unreleased/markdown/pr-7203.md +++ /dev/null @@ -1,26 +0,0 @@ -#### Fix formatting of multi-line footnote ([#7203](https://github.com/prettier/prettier/pull/7203) by [@sasurau4](https://github.com/sasurau4)) - - -```md - -Here's a statement[^footnote]. - -[^footnote]: - Here's a multi-line footnote walking back the above statement, and showing - how it's all totally bollocks. - - -Here's a statement[^footnote]. - -[^footnote]: - - Here's a multi-line footnote walking back the above statement, and showing - how it's all totally bollocks. - - -Here's a statement[^footnote]. - -[^footnote]: - Here's a multi-line footnote walking back the above statement, and showing - how it's all totally bollocks. -``` diff --git a/changelog_unreleased/mdx/pr-6398.md b/changelog_unreleased/mdx/pr-6398.md deleted file mode 100644 index f6b15cceef8b..000000000000 --- a/changelog_unreleased/mdx/pr-6398.md +++ /dev/null @@ -1,19 +0,0 @@ -#### Add support for JSX fragments ([#6398](https://github.com/prettier/prettier/pull/6398) by [@JounQin](https://github.com/JounQin)) - - -```md - -<> - test test - 123 - - -<> -test test - 123 - - -<> - test test - 123 -``` diff --git a/changelog_unreleased/mdx/pr-6949.md b/changelog_unreleased/mdx/pr-6949.md deleted file mode 100644 index c122da7027f7..000000000000 --- a/changelog_unreleased/mdx/pr-6949.md +++ /dev/null @@ -1,37 +0,0 @@ -#### Fix JSX parsing bugs introduced in Prettier 1.19 ([#6949](https://github.com/prettier/prettier/pull/6949) by [@Tigge](https://github.com/Tigge) & [@thorn0](https://github.com/thorn0)) - -MDX parsing for JSX failed when encountering JSX elements that where not -parsable as HTML, such as `test` - - -```md - - -test - - -
    - hi - { hello } - { /* another comment */} -
    -
    - - - -SyntaxError: Unexpected closing tag "Tag". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags (1:35) -> 1 | test - - - -test - - -
    - hi - {hello} - {/* another comment */} -
    -
    - -``` diff --git a/changelog_unreleased/scss/pr-6918.md b/changelog_unreleased/scss/pr-6918.md deleted file mode 100644 index 20a8ebc9147c..000000000000 --- a/changelog_unreleased/scss/pr-6918.md +++ /dev/null @@ -1,28 +0,0 @@ -#### Don't add extra comma after last comment in map ([#6918](https://github.com/prettier/prettier/pull/6918) by [@fisker](https://github.com/fisker)) - -Previously, when `trailingComma` set to `es5`, an extra comma was added after last comment in an SCSS map. - - -```scss -// Input -$my-map: ( - 'foo': 1, // Comment - 'bar': 2, // Comment -); - -// Prettier stable -$my-map: ( - "foo": 1, - // Comment - "bar": 2, - // Comment, -); - -// Prettier master -$my-map: ( - "foo": 1, - // Comment - "bar": 2, - // Comment -); -``` diff --git a/changelog_unreleased/scss/pr-7211.md b/changelog_unreleased/scss/pr-7211.md deleted file mode 100644 index 6331e7c088a1..000000000000 --- a/changelog_unreleased/scss/pr-7211.md +++ /dev/null @@ -1,19 +0,0 @@ -#### Fix whitespace in SCSS concatenation ([#7211](https://github.com/prettier/prettier/pull/7211) by [@sasurau4](https://github.com/sasurau4)) - - -```scss -// Input -a { - background-image: url($test-path + 'static/test.jpg'); -} - -// Prettier stable -a { - background-image: url($test-path+"static/test.jpg"); -} - -// Prettier master -a { - background-image: url($test-path + "static/test.jpg"); -} -``` diff --git a/changelog_unreleased/typescript/pr-6400.md b/changelog_unreleased/typescript/pr-6400.md deleted file mode 100644 index 407af44e1371..000000000000 --- a/changelog_unreleased/typescript/pr-6400.md +++ /dev/null @@ -1,3 +0,0 @@ -#### Babel as an alternative parser for TypeScript ([#6400](https://github.com/prettier/prettier/pull/6400) by [@JounQin](https://github.com/JounQin) & [@thorn0](https://github.com/thorn0)) - -A new value for the `parser` option has been added: `babel-ts`, which makes use of Babel’s TypeScript plugin. The `babel-ts` parser supports JavaScript features not yet supported by TypeScript (ECMAScript proposals, e.g. [private methods and accessors](https://github.com/tc39/proposal-private-methods)), but it's less permissive when it comes to error recovery and less battle-tested than the `typescript` parser. While Babel’s TypeScript plugin is quite mature, ASTs produced by the two parsers aren't 100% compatible. We tried to take the discrepancies into account, but there are most likely still cases where code gets formatted differently or even incorrectly. We call upon you, our users, to help us find such cases. If you see them, please raise issues. In the long run, this will help with [unifying the AST format](https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/typescript-estree#ast-alignment-tests) in future versions of the parsers and thus contribute to a better, more solid JavaScript parser ecosystem. diff --git a/changelog_unreleased/typescript/pr-6901.md b/changelog_unreleased/typescript/pr-6901.md deleted file mode 100644 index 64269dff4ee9..000000000000 --- a/changelog_unreleased/typescript/pr-6901.md +++ /dev/null @@ -1,24 +0,0 @@ -#### Fix formatting of complex types in arrow function return type annotations ([#6901](https://github.com/prettier/prettier/pull/6901) by [@sosukesuzuki](https://github.com/sosukesuzuki)) - - -```ts -// Input -export const getVehicleDescriptor = async ( - vehicleId: string -): Promise< - Collections.Parts.PrintedCircuitBoardAssembly["attributes"] & undefined -> => {}; - -// Prettier stable -export const getVehicleDescriptor = async ( - vehicleId: string -): Promise => {}; - -// Prettier master -export const getVehicleDescriptor = async ( - vehicleId: string -): Promise< - Collections.Parts.PrintedCircuitBoardAssembly["attributes"] & undefined -> => {}; -``` diff --git a/changelog_unreleased/typescript/pr-7020.md b/changelog_unreleased/typescript/pr-7020.md deleted file mode 100644 index 114d5e9ac6eb..000000000000 --- a/changelog_unreleased/typescript/pr-7020.md +++ /dev/null @@ -1,15 +0,0 @@ -#### Print JSDoc-only types as is instead of throwing errors ([#7020](https://github.com/prettier/prettier/pull/7020) by [@thorn0](https://github.com/thorn0)) - -Another fix related to error recovery. Should come in handy to those who migrate from Flow to TypeScript. - - -```jsx -// Input -function fromFlow(arg: ?Maybe) {} - -// Prettier stable -Error: unknown type: "TSJSDocNullableType" - -// Prettier master -function fromFlow(arg: ?Maybe) {} -``` diff --git a/changelog_unreleased/typescript/pr-7075.md b/changelog_unreleased/typescript/pr-7075.md deleted file mode 100644 index 9d8351dc8843..000000000000 --- a/changelog_unreleased/typescript/pr-7075.md +++ /dev/null @@ -1,35 +0,0 @@ -#### Don't print trailing commas after rest elements in tuples ([#7075](https://github.com/prettier/prettier/pull/7075) by [@thorn0](https://github.com/thorn0)) - -- A rest element is always the last element of a tuple type. Nothing can be added after it. -- While TS is okay with this comma, [Babel doesn't parse it](https://github.com/babel/babel/issues/10769) -- In function parameters and array destructuring, such a comma is a syntax error. Keeping it in tuples is inconsistent. - - -```jsx -// Input -type ValidateArgs = [ - { - [key: string]: any; - }, - string, - ...string[], -]; - -// Prettier stable -type ValidateArgs = [ - { - [key: string]: any; - }, - string, - ...string[], -]; - -// Prettier master -type ValidateArgs = [ - { - [key: string]: any; - }, - string, - ...string[] -]; -``` diff --git a/changelog_unreleased/typescript/pr-7094.md b/changelog_unreleased/typescript/pr-7094.md deleted file mode 100644 index 3cea8d7f7063..000000000000 --- a/changelog_unreleased/typescript/pr-7094.md +++ /dev/null @@ -1,30 +0,0 @@ -#### Fix indentation of arrow functions in variable declarations followed by comments ([#7094](https://github.com/prettier/prettier/pull/7094) by [@sosukesuzuki](https://github.com/sosukesuzuki)) - -This could happen with code written in the no-semicolon style if the statement after the variable declaration was prefixed with a semicolon to avoid ASI issues. - - -```ts -// Input -const foo = () => { - return -} - -// foo -;[1,2,3].forEach(bar) - -// Prettier stable -const foo = () => { - return; - }; - - // foo -[1, 2, 3].forEach(bar); - -// Prettier master -const foo = () => { - return; -}; - -// foo -[1, 2, 3].forEach(bar); -``` diff --git a/changelog_unreleased/typescript/pr-7104.md b/changelog_unreleased/typescript/pr-7104.md deleted file mode 100644 index 07f5f2115153..000000000000 --- a/changelog_unreleased/typescript/pr-7104.md +++ /dev/null @@ -1,22 +0,0 @@ -#### Fix printing of comments in function types ([#7104](https://github.com/prettier/prettier/pull/7104) by [@thorn0](https://github.com/thorn0)) - - -```ts -// Input -type f1 = ( - currentRequest: {a: number}, - // TODO this is a very very very very long comment that makes it go > 80 columns -) => number; - -// Prettier stable -type f1 = (currentRequest: { - a: number; -}) => // TODO this is a very very very very long comment that makes it go > 80 columns -number; - -// Prettier master -type f1 = ( - currentRequest: { a: number } - // TODO this is a very very very very long comment that makes it go > 80 columns -) => number; -``` diff --git a/changelog_unreleased/typescript/pr-7144.md b/changelog_unreleased/typescript/pr-7144.md deleted file mode 100644 index 5782581c0c87..000000000000 --- a/changelog_unreleased/typescript/pr-7144.md +++ /dev/null @@ -1,73 +0,0 @@ -#### Fix formatting of comments for function-like nodes ([#7144](https://github.com/prettier/prettier/pull/7144) by [@armano2](https://github.com/armano2)) - - -```ts -// Input -interface foo1 { - bar1/* foo */ (/* baz */) // bat - bar2/* foo */ ? /* bar */ (/* baz */) /* bat */; - bar3/* foo */ (/* baz */) /* bat */ - bar4/* foo */ ? /* bar */ (bar: /* baz */ string): /* bat */ string; - /* foo */ (/* bar */): /* baz */ string; - /* foo */ (bar: /* bar */ string): /* baz */ string; - /* foo */ new /* bar */ (a: /* baz */ string): /* bat */ string - /* foo */ new /* bar */ (/* baz */): /* bat */ string -} - -type foo7 = /* foo */ (/* bar */) /* baz */ => void -type foo8 = /* foo */ (a: /* bar */ string) /* baz */ => void -let foo9: new /* foo */ (/* bar */) /* baz */ => string; -let foo10: new /* foo */ (a: /* bar */ string) /* baz */ => string; - -// Prettier stable -interface foo1 { - bar1 /* foo */ /* baz */(); // bat - bar2 /* foo */ /* bar */ /* baz */ /* bat */?(); - bar3 /* foo */ /* baz */() /* bat */; - bar4 /* foo */?(/* bar */ bar: /* baz */ string): /* bat */ string; - /* foo */ (): /* bar */ /* baz */ string; - /* foo */ (bar: /* bar */ string): /* baz */ string; - /* foo */ new (/* bar */ a: /* baz */ string): /* bat */ string; - /* foo */ new (): /* bar */ /* baz */ /* bat */ string; -} - -type foo7 = /* foo */ () => /* bar */ /* baz */ void; -type foo8 = /* foo */ (a: /* bar */ string) => /* baz */ void; -let foo9: new () => /* foo */ /* bar */ /* baz */ string; -let foo10: new (/* foo */ a: /* bar */ string) => /* baz */ string; - -// Prettier master -interface foo1 { - bar1 /* foo */(/* baz */); // bat - bar2 /* foo */ /* bar */?(/* baz */) /* bat */; - bar3 /* foo */(/* baz */) /* bat */; - bar4 /* foo */?(/* bar */ bar: /* baz */ string): /* bat */ string; - /* foo */ (/* bar */): /* baz */ string; - /* foo */ (bar: /* bar */ string): /* baz */ string; - /* foo */ new (/* bar */ a: /* baz */ string): /* bat */ string; - /* foo */ new (/* baz */): /* bar */ /* bat */ string; -} - -type foo7 = /* foo */ (/* bar */) => /* baz */ void; -type foo8 = /* foo */ (a: /* bar */ string) => /* baz */ void; -let foo9: new (/* bar */) => /* foo */ /* baz */ string; -let foo10: new (/* foo */ a: /* bar */ string) => /* baz */ string; -``` - - -```ts -// Input -abstract class Test { - abstract foo12 /* foo */ (a: /* bar */ string): /* baz */ void - abstract foo13 /* foo */ (/* bar */) /* baz */ -} - -// Prettier stable -Error: Comment "foo" was not printed. Please report this error! - -// Prettier master -abstract class Test { - abstract foo12 /* foo */(a: /* bar */ string): /* baz */ void; - abstract foo13 /* foo */(/* bar */); /* baz */ -} -``` diff --git a/changelog_unreleased/typescript/pr-7221.md b/changelog_unreleased/typescript/pr-7221.md deleted file mode 100644 index 225335abca92..000000000000 --- a/changelog_unreleased/typescript/pr-7221.md +++ /dev/null @@ -1,13 +0,0 @@ -#### Fix printing of mapped types with the template type omitted ([#7221](https://github.com/prettier/prettier/pull/7221) by [@cola119](https://github.com/cola119)) - - -```ts -// Input -type A = { [key in B] }; - -// Prettier stable -type A = { [key in B]: }; - -// Prettier master -type A = { [key in B] }; -``` diff --git a/changelog_unreleased/typescript/pr-7228.md b/changelog_unreleased/typescript/pr-7228.md deleted file mode 100644 index 10139ec1ca30..000000000000 --- a/changelog_unreleased/typescript/pr-7228.md +++ /dev/null @@ -1,18 +0,0 @@ -#### Fix edge cases of printing index signatures ([#7228](https://github.com/prettier/prettier/pull/7228) by [@cola119](https://github.com/cola119)) - -Even though index signatures without type annotations or with multiple parameters aren't valid TypeScript, the TypeScript parser supports this syntax. In line with the [previous error recovery efforts](https://prettier.io/blog/2019/11/09/1.19.0.html#enable-formatting-even-if-there-are-parse-errors-in-some-cases-6816-by-thorn0-and-the-babel-team), Prettier now makes sure its output still can be parsed in these cases. Previous versions produced unparseable code. - - -```ts -// Input -type A = { [key: string] }; -type B = { [a: string, b: string]: string; }; - -// Prettier stable -type A = { [key: string]: }; -type B = { [a: stringb: string]: string }; - -// Prettier master -type A = { [key: string] }; -type B = { [a: string, b: string]: string }; -``` diff --git a/changelog_unreleased/typescript/pr-7631.md b/changelog_unreleased/typescript/pr-7631.md deleted file mode 100644 index a9f544625569..000000000000 --- a/changelog_unreleased/typescript/pr-7631.md +++ /dev/null @@ -1,7 +0,0 @@ -#### [HIGHLIGHT] TypeScript 3.8 ([#7631](https://github.com/prettier/prettier/pull/7631) by [@thorn0](https://github.com/thorn0), [#7764](https://github.com/prettier/prettier/pull/7764) by [@sosukesuzuki](https://github.com/sosukesuzuki), [#7804](https://github.com/prettier/prettier/pull/7804) by [@sosukesuzuki](https://github.com/sosukesuzuki)) - -Prettier now supports the new syntax added in TypeScript 3.8: - -- [Type-Only Imports and Exports](https://devblogs.microsoft.com/typescript/announcing-typescript-3-8/#type-only-imports-exports) -- [ECMAScript Private Fields](https://devblogs.microsoft.com/typescript/announcing-typescript-3-8/#ecmascript-private-fields) -- [`export * as ns`](https://devblogs.microsoft.com/typescript/announcing-typescript-3-8/#export-star-as-namespace-syntax) diff --git a/changelog_unreleased/typescript/pr-7729.md b/changelog_unreleased/typescript/pr-7729.md deleted file mode 100644 index 6a5f7f97dbb4..000000000000 --- a/changelog_unreleased/typescript/pr-7729.md +++ /dev/null @@ -1,13 +0,0 @@ -#### Fix printing of comments in empty type parameters ([#7729](https://github.com/prettier/prettier/pull/7729) by [@sosukesuzuki](https://github.com/sosukesuzuki)) - - -```ts -// Input -const a: T = 1; - -// Prettier stable -Error: Comment "comment" was not printed. Please report this error! - -// Prettier master -const a: T = 1; -``` diff --git a/changelog_unreleased/vue/pr-7180.md b/changelog_unreleased/vue/pr-7180.md deleted file mode 100644 index cbd3958c437b..000000000000 --- a/changelog_unreleased/vue/pr-7180.md +++ /dev/null @@ -1,46 +0,0 @@ -#### format vue SFC containing JSX script ([#7180](https://github.com/prettier/prettier/pull/7180) by [@sosukesuzuki](https://github.com/sosukesuzuki)) - - -```html - - - - - - - - -``` diff --git a/changelog_unreleased/vue/pr-7479.md b/changelog_unreleased/vue/pr-7479.md deleted file mode 100644 index 709f659a2ea4..000000000000 --- a/changelog_unreleased/vue/pr-7479.md +++ /dev/null @@ -1,31 +0,0 @@ -#### Don't print sole string literals in attributes on a new line ([#7479](https://github.com/prettier/prettier/pull/7479) by [@fisker](https://github.com/fisker)) - - -```vue - - - - - - - - -``` diff --git a/changelog_unreleased/vue/pr-7781.md b/changelog_unreleased/vue/pr-7781.md deleted file mode 100644 index db8336c693c0..000000000000 --- a/changelog_unreleased/vue/pr-7781.md +++ /dev/null @@ -1,51 +0,0 @@ -#### Fix indentation of Vue expressions ([#7781](https://github.com/prettier/prettier/pull/7781) by [@fisker](https://github.com/fisker)) - - -```vue - - - - - - - - - -```