repo stringclasses 21
values | pull_number float64 45 194k | instance_id stringlengths 16 34 | issue_numbers stringlengths 6 27 | base_commit stringlengths 40 40 | patch stringlengths 263 270k | test_patch stringlengths 312 408k | problem_statement stringlengths 38 47.6k | hints_text stringlengths 1 257k ⌀ | created_at stringdate 2016-01-11 17:37:29 2024-10-18 14:52:41 | language stringclasses 4
values | Dockerfile stringclasses 279
values | P2P stringlengths 2 10.2M | F2P stringlengths 11 38.9k | F2F stringclasses 86
values | test_command stringlengths 27 11.4k | task_category stringclasses 5
values | is_no_nodes bool 2
classes | is_func_only bool 2
classes | is_class_only bool 2
classes | is_mixed bool 2
classes | num_func_changes int64 0 238 | num_class_changes int64 0 70 | num_nodes int64 0 264 | is_single_func bool 2
classes | is_single_class bool 2
classes | modified_nodes stringlengths 2 42.2k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
prettier/prettier | 14,163 | prettier__prettier-14163 | ['13986'] | d0eb185980a7909cf00667218a6e4bb5450f16da | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5f3b3a55ccd0..1eb365cf9890 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -663,7 +663,7 @@ Error: Comment "comment" was not printed. Please report this error!
<Same as input>
```
-#### Fix formatting for comments inside JSX attribute ([#14082](https://github.com/prett... | diff --git a/tests/format/jsx/cursor/__snapshots__/jsfmt.spec.js.snap b/tests/format/jsx/cursor/__snapshots__/jsfmt.spec.js.snap
new file mode 100644
index 000000000000..496e57842171
--- /dev/null
+++ b/tests/format/jsx/cursor/__snapshots__/jsfmt.spec.js.snap
@@ -0,0 +1,20 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP... | Wrong cursorOffset with formatted JSX text
In a similar vein to #12491 (which I am still intending to fix), I found a misplaced cursorOffset issue with code like this
```jsx
<>a•
<div>hi</div>
</>
```
(where `•` denotes the given cursor position)
When passed into prettier we get:
```jsx
<>•
a<div>hi</... | null | 2023-01-12 10:15:59+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/format/jsx/cursor/jsfmt.spec.js->[flow] format', '/testbed/tests/format/jsx/cursor/jsfmt.spec.js->[espree] format', '/testbed/tests/format/jsx/cursor/jsfmt.spec.js->[acorn] format', '/testbed/tests/format/jsx/cursor/jsfmt.spec.js->[__babel_estree] format', '/testbed/tests/format/jsx/cursor/jsfmt.spec.j... | ['/testbed/tests/format/jsx/cursor/jsfmt.spec.js->format'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/format/jsx/cursor/__snapshots__/jsfmt.spec.js.snap tests/format/jsx/cursor/in-jsx-text.js tests/format/jsx/cursor/jsfmt.spec.js --json | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/language-js/print/jsx.js->program->function_declaration:printJsxElementInternal"] |
prettier/prettier | 14,109 | prettier__prettier-14109 | ['11340'] | 2f72344944384d28c6d00523febf03f294108e2c | diff --git a/changelog_unreleased/less/14109.md b/changelog_unreleased/less/14109.md
new file mode 100644
index 000000000000..cae76dc4ecb8
--- /dev/null
+++ b/changelog_unreleased/less/14109.md
@@ -0,0 +1,27 @@
+#### Keep inline JavaScript code as it is (#14109 by @fisker)
+
+<!-- prettier-ignore -->
+```less
+// Input... | diff --git a/tests/format/less/inline-javascript/__snapshots__/jsfmt.spec.js.snap b/tests/format/less/inline-javascript/__snapshots__/jsfmt.spec.js.snap
new file mode 100644
index 000000000000..1c360caf2768
--- /dev/null
+++ b/tests/format/less/inline-javascript/__snapshots__/jsfmt.spec.js.snap
@@ -0,0 +1,35 @@
+// Jes... | less format problem
**Prettier 2.3.2**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEA6MBDANmACgDwFkBLfYqACgEoACYAHShpoAEAzAVyjBmOgGckNAH4ADCp269o1Oo2bNIUfjBoATOP2IBzKAHViamAAsaAXhoBmABwAWAAzyFSlTQw8O2A0dMWArADsAGyOTAomxPzo2Hj45jSSPHyUAPq0DGEKNABOcDAc2UwpNABUbh5ehiY0APTqmjr6VaYA1DQA5AAO+O1OzAC+Tv... | The next branch seems fixed the parse error, but not formatting as JavaScript code.
**Prettier pr-9583**
[Playground link](https://deploy-preview-9583--prettier.netlify.app/playground/#N4Igxg9gdgLgprEAuEA6MBDANmACgDwFkBLfYqACgEoACYAHShpoAEAzAVyjBmOgGckNAH4ADCp269o1Oo2bNIUfjBoATOP2IBzKAHViamAAsaAXhoBmABwAWAAzyFSlTQw... | 2023-01-04 09:46:00+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| [] | ['/testbed/tests/format/less/inline-javascript/jsfmt.spec.js->format'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/format/less/inline-javascript/jsfmt.spec.js tests/format/less/inline-javascript/__snapshots__/jsfmt.spec.js.snap tests/format/less/inline-javascript/inline-javascript.less --json | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/language-css/parser-postcss.js->program->function_declaration:parseValue"] |
prettier/prettier | 14,108 | prettier__prettier-14108 | ['8581'] | 2f72344944384d28c6d00523febf03f294108e2c | diff --git a/changelog_unreleased/api/14108.md b/changelog_unreleased/api/14108.md
new file mode 100644
index 000000000000..4e19695a73ec
--- /dev/null
+++ b/changelog_unreleased/api/14108.md
@@ -0,0 +1,3 @@
+#### [BREAKING] `getFileInfo()` resolves config by default (#14108 by @fisker)
+
+`options.resolveConfig` defaul... | diff --git a/tests/integration/__tests__/file-info.js b/tests/integration/__tests__/file-info.js
index 6b517d216f04..8d08f7058546 100644
--- a/tests/integration/__tests__/file-info.js
+++ b/tests/integration/__tests__/file-info.js
@@ -159,11 +159,11 @@ describe("API getFileInfo resolveConfig", () => {
test("{resolve... | `getFileInfo()` should try to resolve config by default
[`getFileInfo()`](https://prettier.io/docs/en/api.html#prettiergetfileinfofilepath--options) returns `ignored` and `inferredParser`, it accepts a `resolveConfig` option, it's default to `false`, I think it's more reasonable to set default to `true`, or even remove... | Agreed. I set this to true always in the VS Code extension. https://github.com/prettier/prettier-vscode/blob/main/src/PrettierEditService.ts#L262
Should we consider this bugfix or breaking change?
The current default value is in the [docs](https://prettier.io/docs/en/api.html#prettiergetfileinfofilepath--options):
>... | 2023-01-04 09:28:07+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/integration/__tests__/file-info.js->API getFileInfo with plugins loaded using pluginSearchDir', '/testbed/tests/integration/__tests__/file-info.js->(status)', '/testbed/tests/integration/__tests__/file-info.js->extracts file-info for a JS file with no extension but a standard shebang', '/testbed/tests/... | ['/testbed/tests/integration/__tests__/file-info.js->{resolveConfig: undefined}'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/integration/__tests__/file-info.js --json | Feature | false | true | false | false | 1 | 0 | 1 | true | false | ["src/common/get-file-info.js->program->function_declaration:getParser"] |
prettier/prettier | 14,085 | prettier__prettier-14085 | ['3722', '6198'] | be84156d43805a281369c934ae28148065d6316e | diff --git a/changelog_unreleased/flow/14085.md b/changelog_unreleased/flow/14085.md
new file mode 100644
index 000000000000..70f83764f5cd
--- /dev/null
+++ b/changelog_unreleased/flow/14085.md
@@ -0,0 +1,40 @@
+#### [BREAKING] Print trailing comma in type parameters and tuple types when `--trailing-comma=es5` (#14086,... | diff --git a/tests/format/flow/function-parentheses/__snapshots__/jsfmt.spec.js.snap b/tests/format/flow/function-parentheses/__snapshots__/jsfmt.spec.js.snap
index 43344fd3b686..2c5515a4e049 100644
--- a/tests/format/flow/function-parentheses/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/format/flow/function-parenthese... | Trailing commas for type parameters in Flow with --trailing-comma=es5
I'm not sure if this is the correct behavior or not, but I just moved from `trailingComma: "all"` to `trailingComma: "es5"` in our codebase at work, and was surprised to see these ones disappear.
**Prettier 1.9.2**
[Playground link](https://prett... | Related: https://github.com/prettier/prettier/issues/3662 https://github.com/prettier/prettier/pull/3313
Following that logic we could consider that `"es5" == "all"` since it's valid in TS anyway, not ES :joy:
Yeah I guess that's kinda weird... I'm looking at it from the flow perspective, though.
@suchipi looks like a... | 2022-12-30 09:14:16+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/format/typescript/typeparams/trailing-comma/jsfmt.spec.js->format', '/testbed/tests/format/flow/type-parameters/trailing-comma/jsfmt.spec.js->format', '/testbed/tests/format/typescript/interface2/break/jsfmt.spec.js->[babel-ts] format', '/testbed/tests/format/flow/interface-types/break/jsfmt.spec.js->[... | ['/testbed/tests/format/flow/interface-types/break/jsfmt.spec.js->format', '/testbed/tests/format/flow/type-parameters/trailing-comma/jsfmt.spec.js->format'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/format/flow/generic/__snapshots__/jsfmt.spec.js.snap tests/format/flow/type-parameters/trailing-comma/jsfmt.spec.js tests/format/typescript/interface2/break/jsfmt.spec.js tests/format/flow/type-parameters/trailing-comm... | Feature | false | true | false | false | 1 | 0 | 1 | true | false | ["src/language-js/print/type-parameters.js->program->function_declaration:printTypeParameters"] |
prettier/prettier | 14,081 | prettier__prettier-14081 | ['14080'] | ef707da0a2cafa56b46a94b865069a3cf401835d | diff --git a/changelog_unreleased/javascript/14081.md b/changelog_unreleased/javascript/14081.md
new file mode 100644
index 000000000000..92a794cbc73d
--- /dev/null
+++ b/changelog_unreleased/javascript/14081.md
@@ -0,0 +1,13 @@
+#### Fix comments after directive (#14081 by @fisker)
+
+<!-- prettier-ignore -->
+```jsx
... | diff --git a/tests/format/js/directives/comments/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/directives/comments/__snapshots__/jsfmt.spec.js.snap
new file mode 100644
index 000000000000..62f891b2ff16
--- /dev/null
+++ b/tests/format/js/directives/comments/__snapshots__/jsfmt.spec.js.snap
@@ -0,0 +1,569 @@
+// Je... | Can't print comment after directive
**Prettier 2.8.1**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEByArgZzgAkzAJwEswZUBuAHSmoHoAqHSAW2YRh3tuoG0BdAHQAzCAQCiAQzAALABQBKciAA0ICAAcYRaJmSgJBAhADuABQMJdKCQBtjEgJ67VAIwJSA1nBgBlCWwAZIig4ZCFbbFd3MC9fdSlggHNkQnQ4VThmFzgAExzcgIkoRPQJRLgAMVFmCRgtYuQQCXQYCB... | null | 2022-12-29 10:43:25+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/format/js/directives/comments/jsfmt.spec.js->snippet: #9 [espree] format', '/testbed/tests/format/markdown/auto-link/jsfmt.spec.js->snippet: _http://www.example.com:80/_a*b* format', '/testbed/tests/format/js/directives/comments/jsfmt.spec.js->snippet: #0 - {"semi":false} [meriyah] format', '/testbed/t... | ['/testbed/tests/format/js/directives/comments/jsfmt.spec.js->snippet: #3 - {"semi":false} [typescript] format', '/testbed/tests/format/js/directives/comments/jsfmt.spec.js->snippet: #2 [meriyah] format', '/testbed/tests/format/js/directives/comments/jsfmt.spec.js->snippet: #3 - {"semi":false} [espree] format', '/testb... | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/format/markdown/auto-link/jsfmt.spec.js tests/format/js/directives/comments/__snapshots__/jsfmt.spec.js.snap tests/format/js/directives/comments/jsfmt.spec.js --json | Bug Fix | false | true | false | false | 5 | 0 | 5 | false | false | ["src/language-js/print/misc.js->program->function_declaration:printDirective", "src/language-js/printer-estree.js->program->function_declaration:printPathNoParens", "src/language-js/printer-estree.js->program->function_declaration:printDirective", "src/language-js/print/literal.js->program->function_declaration:printL... |
prettier/prettier | 14,073 | prettier__prettier-14073 | ['13817'] | 948b3af232d9be1cf973a143382cad3ebe33725a | diff --git a/changelog_unreleased/flow/14073.md b/changelog_unreleased/flow/14073.md
new file mode 100644
index 000000000000..8e6f005711c9
--- /dev/null
+++ b/changelog_unreleased/flow/14073.md
@@ -0,0 +1,13 @@
+#### Fix formatting of empty type parameters (#14073 by @fisker)
+
+<!-- prettier-ignore -->
+```jsx
+// Inp... | diff --git a/tests/format/typescript/typeparams/empty-parameters-with-arrow-function/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/typeparams/empty-parameters-with-arrow-function/__snapshots__/jsfmt.spec.js.snap
new file mode 100644
index 000000000000..b3ba94b7dfa8
--- /dev/null
+++ b/tests/format/typescri... | [flow] broken code emitted for type annotation with empty type parameters when the value is an arrow function and `arrow-parens: 'avoid'`
**Prettier 2.7.1**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuc0DOMAEAPXf8GFHGFI4kW4A8AfJgLwA6UmmAhgE4DmDdUArgBtBAbhAAaEBAAOMAJbpkoThwgB3AAqcEaZCDYA3CHIAmEkA... | It's worth noting that the same code emits correctly [for `typescript`](https://prettier.io/playground/#N4Igxg9gdgLgprEAuc0DOMAEAPXf8GFHGFI4kW4A8AfJgLwA6UmmAhgE4DmDdUArgBtBAbhAAaEBAAOMAJbpkoThwgB3AAqcEaZCDYA3CHIAmEkACMObMAGs4MAMpsAtnAAycqHGQAzNoJocJJWNvZO0jZeXMgwHPzBIHAuFnAmJmnubFBc-GxccABiEBwubDDyOXps-DAQ5gAWMC6CAOoNc... | 2022-12-28 11:59:30+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| [] | ['/testbed/tests/format/typescript/typeparams/empty-parameters-with-arrow-function/jsfmt.spec.js->issue-13817.ts - {"arrowParens":"avoid","trailingComma":"all"} [babel-flow] format', '/testbed/tests/format/typescript/typeparams/empty-parameters-with-arrow-function/jsfmt.spec.js->issue-13817.ts - {"arrowParens":"avoid",... | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/format/typescript/typeparams/empty-parameters-with-arrow-function/__snapshots__/jsfmt.spec.js.snap tests/format/typescript/typeparams/empty-parameters-with-arrow-function/jsfmt.spec.js tests/format/typescript/typeparam... | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/language-js/print/type-parameters.js->program->function_declaration:printTypeParameters"] |
prettier/prettier | 14,044 | prettier__prettier-14044 | ['10828'] | 20fad630fab9f62ad37220ffdc7fbff1faf0f2af | diff --git a/changelog_unreleased/javascript/14000.md b/changelog_unreleased/javascript/14000.md
index a8388fda0f1a..914800969a96 100644
--- a/changelog_unreleased/javascript/14000.md
+++ b/changelog_unreleased/javascript/14000.md
@@ -1,4 +1,4 @@
-#### Fix missing parentheses when an expression statement starts with `l... | diff --git a/tests/format/js/identifier/for-of/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/identifier/for-of/__snapshots__/jsfmt.spec.js.snap
new file mode 100644
index 000000000000..1ccc4806b684
--- /dev/null
+++ b/tests/format/js/identifier/for-of/__snapshots__/jsfmt.spec.js.snap
@@ -0,0 +1,57 @@
+// Jest Snap... | Missing parentheses `for ((let) of []);`
**Prettier 2.2.1**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEAzCAnABAChwGzhgEosJUsBtAXWIG4QAaECABxgEtoBnZUAQwwYIAdwAKghLxT98I-gE9ezAEYZ+YANZEAyqw0coAc2QwMAVzjM4AWxVwAJg8cAZfsfP8jcAGKYb-DCcxsgg-OYwEEwgABYwNvgA6jEc8Nz6YHA6UqkcAG6pCqFg3MoghtxwGDBi6kYByKiy... | ## summary
according to spec
**for in:**
```js
for (expression1 in expression2) {}
```
If `expressin1` starts with `let[`, it should be wrapped by parens.
**for of:**
```js
for (expression1 of expression2) {}
```
If `expression1` starts with `let` or `async of`, it should be wrapped by parens.
... | 2022-12-22 02:17:04+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/format/js/identifier/for-of/jsfmt.spec.js->let.js [babel-ts] format', '/testbed/tests/format/js/identifier/for-of/jsfmt.spec.js->await.js [babel-ts] format', '/testbed/tests/format/js/identifier/for-of/jsfmt.spec.js->let.js [__babel_estree] format', '/testbed/tests/format/js/identifier/for-of/jsfmt.spe... | ['/testbed/tests/format/js/identifier/for-of/jsfmt.spec.js->await.js format', '/testbed/tests/format/js/identifier/for-of/jsfmt.spec.js->let.js format'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/format/js/identifier/for-of/jsfmt.spec.js tests/format/js/identifier/for-of/let.js tests/format/js/identifier/for-of/__snapshots__/jsfmt.spec.js.snap tests/format/js/identifier/for-of/await.js --json | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/language-js/needs-parens.js->program->function_declaration:needsParens"] |
prettier/prettier | 14,038 | prettier__prettier-14038 | ['14036'] | 985b895c47d1b9da25cde0c0b56376606b9c1559 | diff --git a/changelog_unreleased/javascript/14038.md b/changelog_unreleased/javascript/14038.md
new file mode 100644
index 000000000000..b52a5aa34d96
--- /dev/null
+++ b/changelog_unreleased/javascript/14038.md
@@ -0,0 +1,32 @@
+#### Fix formatting for auto-accessors with comments (#14038 by @fisker)
+
+<!-- prettier-... | diff --git a/tests/config/format-test.js b/tests/config/format-test.js
index 3574fddf1e40..90a11e752bbe 100644
--- a/tests/config/format-test.js
+++ b/tests/config/format-test.js
@@ -72,6 +72,7 @@ const meriyahDisabledTests = new Set([
"static.js",
"with-semicolon-1.js",
"with-semicolon-2.js",
+ "comm... | Incorrect formatting for auto-accessors with comments
<!--
BEFORE SUBMITTING AN ISSUE:
1. Search for your issue on GitHub: https://github.com/prettier/prettier/issues
A large number of opened issues are duplicates of existing issues.
If someone has already opened an issue for what you are experiencing,... | This is actually bug in TypeScript https://github.com/microsoft/TypeScript/issues/51707
But I think here the issue has nothing todo with that bug in TypeScript.
My input is `accessor b` with no line terminators. The prettier formatted that into separated lines, which according to the spec draft, is not matching with... | 2022-12-19 10:39:42+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/format/js/decorator-auto-accessors/jsfmt.spec.js->with-semicolon-1.js [babel-flow] format', '/testbed/tests/format/js/decorator-auto-accessors/jsfmt.spec.js->static.js [babel-ts] format', '/testbed/tests/format/js/decorator-auto-accessors/jsfmt.spec.js->static-computed.js - {"semi":false} [typescript] ... | ['/testbed/tests/format/js/decorator-auto-accessors/jsfmt.spec.js->comments.js format', '/testbed/tests/format/js/decorator-auto-accessors/jsfmt.spec.js->comments.js - {"semi":false} format'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/config/format-test.js tests/format/js/decorator-auto-accessors/comments.js tests/format/js/decorator-auto-accessors/jsfmt.spec.js tests/format/js/decorator-auto-accessors/__snapshots__/jsfmt.spec.js.snap --json | Bug Fix | true | false | false | false | 0 | 0 | 0 | false | false | [] |
prettier/prettier | 14,000 | prettier__prettier-14000 | ['13999'] | b50dfd1974d33abb980e9b4df949913932eeb478 | diff --git a/changelog_unreleased/javascript/14000.md b/changelog_unreleased/javascript/14000.md
new file mode 100644
index 000000000000..a8388fda0f1a
--- /dev/null
+++ b/changelog_unreleased/javascript/14000.md
@@ -0,0 +1,19 @@
+#### Fix missing parentheses when an expression statement starts with `let[` (#14000 by @f... | diff --git a/tests/config/format-test.js b/tests/config/format-test.js
index 3574fddf1e40..c4e6710b3953 100644
--- a/tests/config/format-test.js
+++ b/tests/config/format-test.js
@@ -41,6 +41,10 @@ const unstableTests = new Map(
"js/comments/html-like/comment.js",
"js/for/continue-and-break-comment-without-bl... | Brackets around property accessor on `let` are removed; changes program syntax
**Prettier 2.8.1**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEA3AhgJwAQBs4zYC82A2gIwC6A3ADpQAU+MpADJcdgEwCUdUIADQgIABxgBLaAGdkoLJggB3AApYEslOlxL0AT1nCARpnRgA1gQDK6ALZwAMhKhxkAM23S4x0xeuizZwBzZBhMAFdvEDhbIzgAE3iEh3Qo... | Which style do you think we should use?
`(let[a][1] = 2);`
or
`(let)[a][1] = 2;`
I prefer the second one.
I don't have strong opinions, and I can't think of other similar cases that I can follow. I'd say the second one, since that seems like less work in terms of emitting. Grouping `let` also makes it obvio... | 2022-12-16 02:50:15+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/format/misc/errors/js/assignment/jsfmt.spec.js->snippet: #0 [babel-ts] format', '/testbed/tests/format/misc/errors/js/assignment/jsfmt.spec.js->snippet: #1 [acorn] format', '/testbed/tests/format/misc/errors/js/assignment/jsfmt.spec.js->snippet: #1 [babel] format', '/testbed/tests/format/js/identifier/... | ['/testbed/tests/format/js/identifier/parentheses/jsfmt.spec.js->let.js format', '/testbed/tests/format/js/identifier/parentheses/jsfmt.spec.js->let.js - {"semi":false} format'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/format/js/identifier/parentheses/__snapshots__/jsfmt.spec.js.snap tests/format/misc/errors/js/assignment/__snapshots__/jsfmt.spec.js.snap tests/config/format-test.js tests/format/js/identifier/parentheses/let.js tests/... | Bug Fix | false | true | false | false | 4 | 0 | 4 | false | false | ["src/language-js/utils/index.js->program->function_declaration:startsWithNoLookaheadToken", "src/language-js/print/function.js->program->function_declaration:printArrowFunction", "src/language-js/needs-parens.js->program->function_declaration:needsParens", "src/language-js/utils/index.js->program->function_declaration... |
prettier/prettier | 13,402 | prettier__prettier-13402 | ['13202'] | 26ea4c42fd3718f4dc9ff600171f4a64ffd54802 | diff --git a/changelog_unreleased/css/13402.md b/changelog_unreleased/css/13402.md
new file mode 100644
index 000000000000..c50ac315c49e
--- /dev/null
+++ b/changelog_unreleased/css/13402.md
@@ -0,0 +1,19 @@
+#### Keep trailing-comma for `var` function (#13402 by @sosukesuzuki)
+
+<!-- prettier-ignore -->
+```css
+/* I... | diff --git a/tests/format/css/trailing-comma/__snapshots__/jsfmt.spec.js.snap b/tests/format/css/trailing-comma/__snapshots__/jsfmt.spec.js.snap
new file mode 100644
index 000000000000..867f8c99505c
--- /dev/null
+++ b/tests/format/css/trailing-comma/__snapshots__/jsfmt.spec.js.snap
@@ -0,0 +1,27 @@
+// Jest Snapshot v... | [CSS] Prettier removes trailing comma inside `var` function
**Prettier 2.7.1**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEA6AZhCACYAdKbbAWmICMBDAJyWwDdqAKUygLwBoBKAbgIF8Q7EBAAOMAJbQAzslDUqEAO4AFaghkoKAG0UUAnjKFkqFMAGs4MAMoUAtnAAy4qHGTptUuEZPnLVkabOAObIMFQArl4gcLZkcAAm8QkOFFBB4RRBcABiEFS2FDASa... | null | 2022-08-30 14:33:51+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| [] | ['/testbed/tests/format/css/trailing-comma/jsfmt.spec.js->format'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/format/css/trailing-comma/var-func.css tests/format/css/trailing-comma/__snapshots__/jsfmt.spec.js.snap tests/format/css/trailing-comma/jsfmt.spec.js --json | Bug Fix | false | true | false | false | 2 | 0 | 2 | false | false | ["src/language-css/printer-postcss.js->program->function_declaration:genericPrint", "src/language-css/utils/index.js->program->function_declaration:isVarFunctionNode"] |
prettier/prettier | 13,315 | prettier__prettier-13315 | ['16493'] | fa94c3099c4199208abac8a2af0c5716f4cfbb61 | diff --git a/changelog_unreleased/api/13315.md b/changelog_unreleased/api/13315.md
new file mode 100644
index 000000000000..cc593ea5cff3
--- /dev/null
+++ b/changelog_unreleased/api/13315.md
@@ -0,0 +1,3 @@
+#### Stop doc mutation in `prettier.doc.printDocToString` (#13315 by @fisker)
+
+For performance reason, `pretti... | diff --git a/tests/format/js/template-literals/__snapshots__/format.test.js.snap b/tests/format/js/template-literals/__snapshots__/format.test.js.snap
index b635df2fd63b..d4470d98754e 100644
--- a/tests/format/js/template-literals/__snapshots__/format.test.js.snap
+++ b/tests/format/js/template-literals/__snapshots__/f... | Modification of nested arrays inside format string
<!--
BEFORE SUBMITTING AN ISSUE:
1. Search for your issue on GitHub: https://github.com/prettier/prettier/issues
A large number of opened issues are duplicates of existing issues.
If someone has already opened an issue for what you are experiencing,
... | null | 2022-08-19 08:46:18+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| [] | ['/testbed/tests/unit/doc-printer.js->`printDocToString` should not manipulate docs'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/format/js/template-literals/expressions.js tests/format/js/template-literals/__snapshots__/format.test.js.snap tests/unit/doc-printer.js --json | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/document/printer.js->program->function_declaration:printDocToString"] |
prettier/prettier | 13,268 | prettier__prettier-13268 | ['10156'] | 503045c050ab7e31e3e361fbd8debd6059dc5e61 | diff --git a/changelog_unreleased/api/11830.md b/changelog_unreleased/api/11830.md
index 40e361aed582..a79b80c1cf3d 100644
--- a/changelog_unreleased/api/11830.md
+++ b/changelog_unreleased/api/11830.md
@@ -1,3 +1,3 @@
-#### [Breaking] Drop support for Node.js 10 and 12 (#11830 by @fisker, #13118 by @sosukesuzuki)
+###... | diff --git a/tests/integration/__tests__/parser-api.js b/tests/integration/__tests__/parser-api.js
new file mode 100644
index 000000000000..dbf17c8f7aac
--- /dev/null
+++ b/tests/integration/__tests__/parser-api.js
@@ -0,0 +1,51 @@
+import prettier from "../../config/prettier-entry.js";
+
+const createParsePlugin = (na... | Remove 2nd argument pass to `Plugin.parse` function
https://github.com/prettier/prettier/blob/9786ce2fb628ac4ad3ed5088fd8f7c66a93d9c17/src/language-js/parser-babel.js#L110
The 2nd parameter, seems not very useful, but I'm not sure if plugins uses it, but plugin can always load other plugin by themself.
I think w... | Any thought on this?
If we still want keep it, maybe we should change it to a Proxy?
https://github.com/prettier/prettier/blob/e096ea7552c2aaec1883c7fdde4bd9f5283301bd/src/main/parser.js#L61-L74
@thorn0 @sosukesuzuki In case you missed.
Why make it a proxy?
Cheaper? We don't need map all keys.
I think we can remov... | 2022-08-10 12:32:03+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/unit/resolve-parser.js->resolveParser should not trigger the plugin.parsers getters'] | ['/testbed/tests/integration/__tests__/parser-api.js->parsers should allow omit optional arguments'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/integration/__tests__/parser-api.js tests/unit/resolve-parser.js --json | Refactoring | false | true | false | false | 20 | 0 | 20 | false | false | ["src/language-html/parser-html.js->program->function_declaration:createParser", "src/language-css/parser-postcss.js->program->function_declaration:parseNestedCSS", "src/language-graphql/parser-graphql.js->program->function_declaration:parse", "src/language-js/parse/espree.js->program->function_declaration:parse", "src... |
prettier/prettier | 13,019 | prettier__prettier-13019 | ['13010'] | 89f90fc01363c31e4c9b21f34e3f1942994b1565 | diff --git a/changelog_unreleased/cli/13019.md b/changelog_unreleased/cli/13019.md
new file mode 100644
index 000000000000..bb4f81b2bab8
--- /dev/null
+++ b/changelog_unreleased/cli/13019.md
@@ -0,0 +1,9 @@
+#### Add `--cache-location` option (#13019 by @sosukesuzuki)
+
+Path to the cache file location used by `--cache... | diff --git a/tests/integration/__tests__/__snapshots__/early-exit.js.snap b/tests/integration/__tests__/__snapshots__/early-exit.js.snap
index 63f00b025ee6..d7886195e236 100644
--- a/tests/integration/__tests__/__snapshots__/early-exit.js.snap
+++ b/tests/integration/__tests__/__snapshots__/early-exit.js.snap
@@ -141,6... | Better cache handling of multiple (but different) prettier calls
**Environments:**
- Prettier Version: 2.7.0
- Running Prettier via: CLI
- Operating System: Windows
After discussion https://github.com/prettier/prettier/pull/12800#discussion_r867309015 you moved from default cache location `.prettiercache` (eslint... | I think `--cache-location` is good | 2022-06-18 14:26:08+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/integration/__tests__/cache.js->--cache option --cache-strategy metadata re-formats when timestamp has been updated', "/testbed/tests/integration/__tests__/cache.js->--cache option --cache-strategy metadata does'nt format when cache is available", '/testbed/tests/integration/__tests__/cache.js->--cache... | ['/testbed/tests/integration/__tests__/cache.js->--cache option throws error when `--cache-location` is a directory.', '/testbed/tests/integration/__tests__/cache.js->--cache option --cache-location throws error for invalid JSON file', "/testbed/tests/integration/__tests__/cache.js->--cache option --cache-location does... | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/integration/__tests__/__snapshots__/early-exit.js.snap tests/integration/__tests__/cache.js tests/integration/__tests__/__snapshots__/help-options.js.snap tests/integration/cli/cache/dir/.gitkeep --json | Feature | false | true | false | false | 5 | 0 | 5 | false | false | ["src/cli/find-cache-file.js->program->function_declaration:findCacheFileFromOption", "src/cli/find-cache-file.js->program->function_declaration:findCacheFile", "src/cli/utils.js->program->function_declaration:isJson", "src/cli/find-cache-file.js->program->function_declaration:findDefaultCacheFile", "src/cli/format.js-... |
prettier/prettier | 12,930 | prettier__prettier-12930 | ['12926'] | 3147244f55e6e0aafd2cc6fa5875f7c8cfa8e4e3 | diff --git a/changelog_unreleased/typescript/12930.md b/changelog_unreleased/typescript/12930.md
new file mode 100644
index 000000000000..9c6fde5af05a
--- /dev/null
+++ b/changelog_unreleased/typescript/12930.md
@@ -0,0 +1,19 @@
+#### fix formatting for typescript Enum with computed members (#12930 by @HosokawaR)
+
+<!... | diff --git a/tests/format/typescript/enum/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/enum/__snapshots__/jsfmt.spec.js.snap
index 82de64f80d39..0a37faedb892 100644
--- a/tests/format/typescript/enum/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/format/typescript/enum/__snapshots__/jsfmt.spec.js.snap
@@ -1... | Syntax error after formatting when using computed key in TypeScript enum
**Prettier 2.6.2**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuECCuBbABAQS8AHSiywG0BLAakoF0iBfEAGhAgAcZzoBnZUAQwBOgiAHcACkIS8U-ADaj+AT14sARoP5gA1nBgBlfhjgAZclDjIAZvO5x1mnXv1st5gObIYgtPdQY1OAATIOCTfih3NH53OAAxCEEMfhhOSOQQfjQ... | null | 2022-05-27 08:36:59+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/format/typescript/enum/jsfmt.spec.js->multiline.ts format', '/testbed/tests/format/typescript/enum/jsfmt.spec.js->enum.ts [babel-ts] format', '/testbed/tests/format/typescript/enum/jsfmt.spec.js->enum.ts format', '/testbed/tests/format/typescript/enum/jsfmt.spec.js->computed-members.ts [babel-ts] forma... | ['/testbed/tests/format/typescript/enum/jsfmt.spec.js->computed-members.ts format'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/format/typescript/enum/computed-members.ts tests/format/typescript/enum/__snapshots__/jsfmt.spec.js.snap tests/format/typescript/enum/jsfmt.spec.js --json | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/language-js/print/typescript.js->program->function_declaration:printTypescript"] |
prettier/prettier | 12,584 | prettier__prettier-12584 | ['12414'] | c50f2bbe3075757840bbd7ed941647a9bde84266 | diff --git a/changelog_unreleased/vue/12584.md b/changelog_unreleased/vue/12584.md
new file mode 100644
index 000000000000..1bada237fd3f
--- /dev/null
+++ b/changelog_unreleased/vue/12584.md
@@ -0,0 +1,31 @@
+#### Allow formatting for Vue template expression written in TypeScript (#12584 by @sosukesuzuki)
+
+<!-- prett... | diff --git a/tests/format/vue/ts-event-binding/__snapshots__/jsfmt.spec.js.snap b/tests/format/vue/ts-event-binding/__snapshots__/jsfmt.spec.js.snap
new file mode 100644
index 000000000000..d5c6398483e4
--- /dev/null
+++ b/tests/format/vue/ts-event-binding/__snapshots__/jsfmt.spec.js.snap
@@ -0,0 +1,43 @@
+// Jest Snap... | "as" TypeScript keyword yields error within Vue template
<!--
BEFORE SUBMITTING AN ISSUE:
1. Search for your issue on GitHub: https://github.com/prettier/prettier/issues
A large number of opened issues are duplicates of existing issues.
If someone has already opened an issue for what you are experienci... | Any reference that this is allowed in Vue SFC?
@fisker I don't know about any Vue doc covering this specific use case, so official support on this is unknown to me. However, AFAIK Vue 3 fully supports TypeScript and the `as` keyword is part of the language. Furthermore, my app runs just fine with a bunch of `as` keywor... | 2022-04-02 18:06:41+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/format/vue/ts-expression/jsfmt.spec.js->not-working-with-non-ts-script.vue format'] | ['/testbed/tests/format/vue/ts-expression/jsfmt.spec.js->basic.vue format', '/testbed/tests/format/vue/ts-event-binding/jsfmt.spec.js->basic.vue format'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/format/vue/ts-expression/not-working-with-non-ts-script.vue tests/format/vue/ts-event-binding/__snapshots__/jsfmt.spec.js.snap tests/format/vue/ts-event-binding/jsfmt.spec.js tests/format/vue/ts-expression/jsfmt.spec.j... | Bug Fix | false | true | false | false | 9 | 0 | 9 | false | false | ["src/language-js/printer-estree.js->program->function_declaration:printPathNoParens", "src/language-js/parse/parsers.js->program->method_definition:__vue_ts_expression", "src/language-html/embed.js->program->function_declaration:embed", "src/main/comments.js->program->function_declaration:attach", "src/language-html/e... |
prettier/prettier | 12,362 | prettier__prettier-12362 | ['12352'] | 896970a18518bc31f1f15233b5ec612394453624 | diff --git a/changelog_unreleased/api/12362.md b/changelog_unreleased/api/12362.md
new file mode 100644
index 000000000000..3bd000439297
--- /dev/null
+++ b/changelog_unreleased/api/12362.md
@@ -0,0 +1,19 @@
+#### Fix doc printer issue when using `ifBreak` inside `group` (#12362 by @fisker)
+
+<!-- prettier-ignore -->
... | diff --git a/tests/format/js/arrays/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/arrays/__snapshots__/jsfmt.spec.js.snap
index a5e5d3eac8d4..c1d523ae81c2 100644
--- a/tests/format/js/arrays/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/format/js/arrays/__snapshots__/jsfmt.spec.js.snap
@@ -56,9 +56,7 @@ printWidth:... | Unnecessary line breaks caused by `ifBreak` with group id nested in `group` with the same id
**Prettier 2.5.1**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEwA6UAEmBmEBOmAFJFAM4yZn5gAKAhjABaYQ6YDaAjAEwDMAGky8+AfRHj+QiTP7jpYiXyVdRAFj48AugEpM6LJgC+GIyAEgIABxgBLaGWSh6+fBADuDfAkcp6AG3d6AE9HCwAjfHowA... | It's known: #10159
I'll close that issue in favor of this one because you have a better description here.
The root cause is described here: https://github.com/prettier/prettier/pull/10160#issuecomment-768668404
Sorry, totally forgot about that.
After debugging with your doc [here](https://github.com/prettier/prettier... | 2022-02-24 10:35:18+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/format/typescript/interface/long-type-parameters/jsfmt.spec.js->long-type-parameters.ts - {"printWidth":110} [babel-ts] format', '/testbed/tests/format/typescript/interface/long-type-parameters/jsfmt.spec.js->long-type-parameters.ts - {"printWidth":109} format', '/testbed/tests/format/typescript/interf... | ['/testbed/tests/integration/__tests__/doc-printer.js->`ifBreak` inside `group`', '/testbed/tests/format/typescript/interface/long-type-parameters/jsfmt.spec.js->long-type-parameters.ts - {"printWidth":110} format'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/format/typescript/interface/long-type-parameters/jsfmt.spec.js tests/format/typescript/interface/long-type-parameters/long-type-parameters.ts tests/integration/__tests__/doc-printer.js tests/format/js/arrays/__snapshot... | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/document/doc-printer.js->program->function_declaration:fits"] |
prettier/prettier | 12,305 | prettier__prettier-12305 | ['12304'] | 8c49fd0f6f49aca95e5004ff96f5c9fe9f95f3f8 | diff --git a/changelog_unreleased/yaml/12305.md b/changelog_unreleased/yaml/12305.md
new file mode 100644
index 000000000000..f989c615755e
--- /dev/null
+++ b/changelog_unreleased/yaml/12305.md
@@ -0,0 +1,15 @@
+#### Fix unexpected deletion of block-literal lines which starts with U+3000 (#12305 by @Quramy)
+
+<!-- pre... | diff --git a/tests/format/yaml/block-literal/jsfmt.spec.js b/tests/format/yaml/block-literal/jsfmt.spec.js
index bedc8dbb953c..0c58d76174eb 100644
--- a/tests/format/yaml/block-literal/jsfmt.spec.js
+++ b/tests/format/yaml/block-literal/jsfmt.spec.js
@@ -1,2 +1,17 @@
-run_spec(__dirname, ["yaml"]);
-run_spec(__dirname,... | Lines are unexpectedly deleted when all indented lines in block start with full-width space
**Prettier 2.5.1**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEBDJACAPgHShjQAAYAPPAwgTxABoQIAHGAS2gGdlRUAnLiAdwAK3BOxSoANn1QV2tAEZdUYANZwYAZVQBbOABkmUOMgBmE1nHmKVa9fSUGA5shhcArhZBwtcuABNffrqoUA6uqA5wAGIQ... | null | 2022-02-14 15:06:20+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/format/yaml/block-literal/jsfmt.spec.js->indent.yml format', '/testbed/tests/format/yaml/block-literal/jsfmt.spec.js->middle-comments.yml format', '/testbed/tests/format/yaml/block-literal/jsfmt.spec.js->props.yml format', '/testbed/tests/format/yaml/block-literal/jsfmt.spec.js->seq.yml format', '/test... | ['/testbed/tests/format/yaml/block-literal/jsfmt.spec.js->snippet: #0 - {"proseWrap":"always"} format', '/testbed/tests/format/yaml/block-literal/jsfmt.spec.js->snippet: #0 format'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/format/yaml/block-literal/jsfmt.spec.js --json | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/language-yaml/utils.js->program->function_declaration:getBlockValueLineContents"] |
prettier/prettier | 12,260 | prettier__prettier-12260 | ['12257'] | b1645073b897bfc4318186bc42936bf91e86538b | diff --git a/changelog_unreleased/javascript/12260.md b/changelog_unreleased/javascript/12260.md
new file mode 100644
index 000000000000..423c052e87e8
--- /dev/null
+++ b/changelog_unreleased/javascript/12260.md
@@ -0,0 +1,24 @@
+#### Add parens to `ClassExpression` with decorators (#12260 by @fisker)
+
+<!-- prettier-... | diff --git a/tests/format/js/decorators/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/decorators/__snapshots__/jsfmt.spec.js.snap
index 473c24d21702..091a9620b563 100644
--- a/tests/format/js/decorators/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/format/js/decorators/__snapshots__/jsfmt.spec.js.snap
@@ -51,16 +51... | Missing parens for `ClassExpression` with decorators
**Prettier 2.5.1**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEAKAAgM1QSgARgA2AhgM6l7AC+OA3CADQgQAOMAltKcqMQE58IAdwAK-BNxTFCQ4gE9uTAEZ9iYANZwYAZWIBbOABl2UOMkzTScZao1btLNSYDmyGHwCu1kHD1K4ACYBgYbEUM4exM5wAGIQfHrEMBzhyCDEHjAQjCAAFjB6hADquezwpI5g... | null | 2022-02-07 08:38:33+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/format/js/decorators/class-expression/jsfmt.spec.js->super-class.js [typescript] format', '/testbed/tests/format/typescript/type-arguments-bit-shift-left-like/jsfmt.spec.js->6.ts format', '/testbed/tests/format/js/decorators/class-expression/jsfmt.spec.js->super-class.js - {"semi":false} [acorn] format... | ['/testbed/tests/format/js/decorators/class-expression/jsfmt.spec.js->member-expression.js format', '/testbed/tests/format/js/decorators/class-expression/jsfmt.spec.js->super-class.js format', '/testbed/tests/format/typescript/type-arguments-bit-shift-left-like/jsfmt.spec.js->4.ts [babel-ts] format', '/testbed/tests/fo... | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/format/typescript/type-arguments-bit-shift-left-like/4.ts tests/format/typescript/type-arguments-bit-shift-left-like/__snapshots__/jsfmt.spec.js.snap tests/format/js/decorators/class-expression/__snapshots__/jsfmt.spec... | Bug Fix | false | true | false | false | 2 | 0 | 2 | false | false | ["src/language-js/printer-estree.js->program->function_declaration:genericPrint", "src/language-js/needs-parens.js->program->function_declaration:needsParens"] |
prettier/prettier | 12,113 | prettier__prettier-12113 | ['12114'] | 53da86c34dd1c1e1241e85c57469100f2467fcec | diff --git a/changelog_unreleased/vue/12113.md b/changelog_unreleased/vue/12113.md
new file mode 100644
index 000000000000..314b5db6da0c
--- /dev/null
+++ b/changelog_unreleased/vue/12113.md
@@ -0,0 +1,21 @@
+#### Fix hangs on invalid `v-for` (#12113 by @fisker)
+
+<!-- prettier-ignore -->
+```jsx
+// Input
+<template>... | diff --git a/tests/format/vue/invalid/__snapshots__/jsfmt.spec.js.snap b/tests/format/vue/invalid/__snapshots__/jsfmt.spec.js.snap
new file mode 100644
index 000000000000..cda9412cdec3
--- /dev/null
+++ b/tests/format/vue/invalid/__snapshots__/jsfmt.spec.js.snap
@@ -0,0 +1,52 @@
+// Jest Snapshot v1, https://goo.gl/fbA... | [vue] v-for incorrectly removing commas from left hand side
**Prettier 2.5.1**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEAeeBbADgGwIbwB8AOlAARmoAmAlgG5l0C0AZhAE4C8xIAFADR5+AIwCUZCCzJgehVAHpadElAWZcBOCpD8QELDBrQAzslB527CAHcAChYSmUeHNbwBPU7uHs8YANZwMADKeBhwADI0UHDILC7GcN6+AUHBWH7RAObIMOwArkkgcB... | null | 2022-01-18 13:11:35+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| [] | ['/testbed/tests/format/vue/invalid/jsfmt.spec.js->v-for.vue format'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/format/vue/invalid/__snapshots__/jsfmt.spec.js.snap tests/format/vue/invalid/v-for.vue tests/format/vue/invalid/jsfmt.spec.js --json | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/language-html/syntax-vue.js->program->function_declaration:parseVueFor"] |
prettier/prettier | 11,941 | prettier__prettier-11941 | ['11939'] | db0604eddd203031328b1ff88044dfdd0caf3c60 | diff --git a/src/language-js/loc.js b/src/language-js/loc.js
index 969025b5a760..7c94dab011c2 100644
--- a/src/language-js/loc.js
+++ b/src/language-js/loc.js
@@ -32,7 +32,8 @@ function locEnd(node) {
* @returns {boolean}
*/
function hasSameLocStart(nodeA, nodeB) {
- return locStart(nodeA) === locStart(nodeB);
+ ... | diff --git a/tests/integration/__tests__/__snapshots__/format-ast.js.snap b/tests/integration/__tests__/__snapshots__/format-ast.js.snap
new file mode 100644
index 000000000000..422eaeb0b421
--- /dev/null
+++ b/tests/integration/__tests__/__snapshots__/format-ast.js.snap
@@ -0,0 +1,21 @@
+// Jest Snapshot v1, https://g... | Invalid shorthand for ExportSpecifier
Sorry for not following the usual issue formatting but this issue is only available via the API:
```js
// Actual: export {specifier1};
// Expected: export {specifier1 as specifier2};
console.log(require("prettier").format(".", {
parser: () => ({
type: "Program",
... | Location info is required to use Prettier.
But we can check specifier name first | 2021-12-09 12:29:50+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| [] | ['/testbed/tests/integration/__tests__/format-ast.js->formatAST Shorthand specifier', '/testbed/tests/integration/__tests__/format-ast.js->formatAST Shorthand specifier 2', '/testbed/tests/integration/__tests__/format-ast.js->formatAST Shorthand specifier 4', '/testbed/tests/integration/__tests__/format-ast.js->formatA... | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/integration/__tests__/__snapshots__/format-ast.js.snap tests/integration/__tests__/format-ast.js --json | Bug Fix | false | true | false | false | 4 | 0 | 4 | false | false | ["src/language-js/print/module.js->program->function_declaration:printModuleSpecifier", "src/language-js/loc.js->program->function_declaration:hasSameLocEnd", "src/language-js/print/module.js->program->function_declaration:isShorthandSpecifier", "src/language-js/loc.js->program->function_declaration:hasSameLocStart"] |
prettier/prettier | 11,920 | prettier__prettier-11920 | ['11918'] | a42d6f934e856533b77fb577f9cb9fd83641f336 | diff --git a/changelog_unreleased/scss/11920.md b/changelog_unreleased/scss/11920.md
new file mode 100644
index 000000000000..e7d220ae42a3
--- /dev/null
+++ b/changelog_unreleased/scss/11920.md
@@ -0,0 +1,36 @@
+#### Fix comments inside map (#11920 by @fisker)
+
+<!-- prettier-ignore -->
+```scss
+// Input
+.ag-theme-b... | diff --git a/tests/format/scss/at-rule/__snapshots__/jsfmt.spec.js.snap b/tests/format/scss/at-rule/__snapshots__/jsfmt.spec.js.snap
new file mode 100644
index 000000000000..6de356b0d5ce
--- /dev/null
+++ b/tests/format/scss/at-rule/__snapshots__/jsfmt.spec.js.snap
@@ -0,0 +1,30 @@
+// Jest Snapshot v1, https://goo.gl/... | [SCSS] comments in Map-value mixin arguments break the code
**Prettier 2.5.0**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEA6AhgcwLQwBZwC2c2ARugDZ7qEAEwAOlLS7QAICWUYFArgCZxaWXAWJlK1QgAomrebVnMFKgGYQATnEwaIvKP2yQKmpLQAkYXgGcYEQtnVadeg0YgmNAGjkqF-Dmt0Ugo4QydtXX1DY1NaKF4KCi9aAHpU2gAVAHkAEWzaa3shSE... | #8566 Seems the one breaks it. | 2021-12-03 12:55:11+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| [] | ['/testbed/tests/format/scss/at-rule/jsfmt.spec.js->at-rule-with-comments.scss format'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/format/scss/at-rule/jsfmt.spec.js tests/format/scss/at-rule/at-rule-with-comments.scss tests/format/scss/at-rule/__snapshots__/jsfmt.spec.js.snap tests/format/scss/scss/arbitrary-arguments-comment.scss tests/format/scs... | Bug Fix | false | true | false | false | 2 | 0 | 2 | false | false | ["src/language-css/clean.js->program->function_declaration:clean", "src/language-css/parser-postcss.js->program->function_declaration:parseNestedCSS"] |
prettier/prettier | 11,892 | prettier__prettier-11892 | ['11888'] | 2160e11061eac84c10d6b0200e29a6eb2408de8c | diff --git a/src/language-css/parser-postcss.js b/src/language-css/parser-postcss.js
index 38e96a495df6..69f687d2fd67 100644
--- a/src/language-css/parser-postcss.js
+++ b/src/language-css/parser-postcss.js
@@ -619,7 +619,7 @@ function parseWithParser(parse, text, options) {
}
// TODO: make this only work on css
-f... | diff --git a/tests/integration/__tests__/parser-api.js b/tests/integration/__tests__/parser-api.js
index 3d6920c31a3d..8f88a67a5e68 100644
--- a/tests/integration/__tests__/parser-api.js
+++ b/tests/integration/__tests__/parser-api.js
@@ -29,6 +29,33 @@ test("allows usage of prettier's supported parsers", () => {
ex... | "TypeError: Cannot set property 'originalText' of undefined" from TypeScript Jest inline snapshot
After upgrading from Prettier 2.4.x to 2.5.0, a Jest inline snapshot test in a TypeScript file throws the following error when Jest tries to update the snapshot:
```
TypeError: Cannot set property 'originalText' of... | Hi @joshkel, thanks for the bug report! Looks like it's a combination of two things.
First one is the fact that Jest calls our parsers directly, but never passed any options.
https://github.com/facebook/jest/blob/26abf9a2933f73ef0ae1f10e824c0f0dc0f93394/packages/jest-snapshot/src/InlineSnapshots.ts#L313
The ot... | 2021-12-01 04:41:31+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/integration/__tests__/parser-api.js->allows custom parser provided as object', '/testbed/tests/integration/__tests__/parser-api.js->allows passing a string to resolve a parser (stderr)', '/testbed/tests/integration/__tests__/parser-api.js->allows add empty `trailingComments` array', '/testbed/tests/int... | ['/testbed/tests/integration/__tests__/parser-api.js->parsers should allow omit optional arguments'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/integration/__tests__/parser-api.js --json | Bug Fix | false | true | false | false | 8 | 0 | 8 | false | false | ["src/language-css/parser-postcss.js->program->function_declaration:parseLess", "src/language-html/parser-html.js->program->function_declaration:createParser", "src/language-css/parser-postcss.js->program->function_declaration:parseCss", "src/language-js/parse/typescript.js->program->function_declaration:parse", "src/l... |
prettier/prettier | 11,637 | prettier__prettier-11637 | ['11635'] | 5909f5b3f191a0a32f759e1f4378477d3b90e28e | diff --git a/changelog_unreleased/scss/11637.md b/changelog_unreleased/scss/11637.md
new file mode 100644
index 000000000000..424a5534787b
--- /dev/null
+++ b/changelog_unreleased/scss/11637.md
@@ -0,0 +1,21 @@
+#### Improve `with (...)` formatting (#11637 by @sosukesuzuki)
+
+<!-- prettier-ignore -->
+```scss
+// Inpu... | diff --git a/tests/format/scss/configuration/__snapshots__/jsfmt.spec.js.snap b/tests/format/scss/configuration/__snapshots__/jsfmt.spec.js.snap
new file mode 100644
index 000000000000..2acdbfd02d9d
--- /dev/null
+++ b/tests/format/scss/configuration/__snapshots__/jsfmt.spec.js.snap
@@ -0,0 +1,94 @@
+// Jest Snapshot v... | Weird wrapping for SCSS @use rules
<!--
BEFORE SUBMITTING AN ISSUE:
1. Search for your issue on GitHub: https://github.com/prettier/prettier/issues
A large number of opened issues are duplicates of existing issues.
If someone has already opened an issue for what you are experiencing,
you do not ne... | hm, both looks good...
I think the indent should not be there @alexander-akait
But it is also inconsistent with the SCSS map wrapping which does not wrap the opening parentheses to the next line | 2021-10-08 14:58:13+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| [] | ['/testbed/tests/format/scss/configuration/jsfmt.spec.js->use.scss - {"trailingComma":"none"} format', '/testbed/tests/format/scss/configuration/jsfmt.spec.js->use.scss format'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/format/scss/configuration/jsfmt.spec.js tests/format/scss/configuration/__snapshots__/jsfmt.spec.js.snap tests/format/scss/quotes/__snapshots__/jsfmt.spec.js.snap tests/format/scss/configuration/use.scss --json | Bug Fix | false | true | false | false | 2 | 0 | 2 | false | false | ["src/language-css/printer-postcss.js->program->function_declaration:genericPrint", "src/language-css/utils.js->program->function_declaration:isConfigurationNode"] |
prettier/prettier | 11,479 | prettier__prettier-11479 | ['11465'] | 0fcac8afbfac0b9f1185855bb8938a1ab5edc91b | diff --git a/changelog_unreleased/javascript/13143.md b/changelog_unreleased/javascript/13143.md
new file mode 100644
index 000000000000..42b862e17b67
--- /dev/null
+++ b/changelog_unreleased/javascript/13143.md
@@ -0,0 +1,7 @@
+#### [BREAKING] Change the default value for `trailingComma` to `all` (#11479 by @fisker, #... | diff --git a/tests/format/angular/angular/__snapshots__/jsfmt.spec.js.snap b/tests/format/angular/angular/__snapshots__/jsfmt.spec.js.snap
index 2eb1950302b2..51c1e7785fb5 100644
--- a/tests/format/angular/angular/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/format/angular/angular/__snapshots__/jsfmt.spec.js.snap
@@ -1... | Change the default value for `trailingComma` to `"all"` in v3
Trailing commas in function syntax was introduced in ES2017, it's supported since Node.js 8.2.1, modern browsers supports it too.
I think it's time to change `trailingComma` to `"all"`.
| :+1:
Agree
`"trailingComma": "all"` is the only option in [my shared prettier config](https://github.com/kachkaev/routine-npm-packages/blob/02d91fa00501a3d0bc9a9c8ee5390e220a1b18e3/packages/prettier-config/index.js#L2), so a big 👍 from me too 😁 | 2021-09-09 08:57:56+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/format/js/strings/jsfmt.spec.js->[__babel_estree] format', '/testbed/tests/format/js/trailing-comma/jsfmt.spec.js->[meriyah] format', '/testbed/tests/format/flow/object-order/jsfmt.spec.js->format', '/testbed/tests/format/js/arrow-call/jsfmt.spec.js->[babel-ts] format', '/testbed/tests/format/angular/a... | ['/testbed/tests/format/js/arrow-call/jsfmt.spec.js->format', '/testbed/tests/format/flow/function-parentheses/jsfmt.spec.js->format'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/format/flow/object-order/jsfmt.spec.js tests/format/js/arrow-call/__snapshots__/jsfmt.spec.js.snap tests/format/js/class-extends/__snapshots__/jsfmt.spec.js.snap tests/integration/__tests__/__snapshots__/with-config-pr... | Feature | true | false | false | false | 0 | 0 | 0 | false | false | [] |
prettier/prettier | 11,461 | prettier__prettier-11461 | ['11053'] | ce1bb16c178691681fd6ebce16010b12e42ec6da | diff --git a/changelog_unreleased/scss/11461.md b/changelog_unreleased/scss/11461.md
new file mode 100644
index 000000000000..720248387efb
--- /dev/null
+++ b/changelog_unreleased/scss/11461.md
@@ -0,0 +1,16 @@
+#### Consistently quote Sass modules strings (#11461 by @niksy)
+
+<!-- prettier-ignore -->
+```scss
+// Inp... | diff --git a/tests/format/scss/quotes/__snapshots__/jsfmt.spec.js.snap b/tests/format/scss/quotes/__snapshots__/jsfmt.spec.js.snap
new file mode 100644
index 000000000000..042fdbb3bf79
--- /dev/null
+++ b/tests/format/scss/quotes/__snapshots__/jsfmt.spec.js.snap
@@ -0,0 +1,104 @@
+// Jest Snapshot v1, https://goo.gl/fb... | SCSS @use strings not quoted consistently
**Prettier 2.3.1**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEABArgZzgAgOTyYx4DcAOlBtjmSITLeVBagJYC2ADhAE4z4A6APT1SLDtz40Qw+owoUB9HMAo4ckWAhhJ89VlADmYqOs3xYu2vqPyoAXxAAaEBE4xW0TMlABDHjwQAO4ACv4I3ii+ADZBvgCe3i4ARjy+YADWcDAAypzpBobIMDzocC5w7MlwACY1tQAyvk... | It looks like `@import` has some special handling that might also be needed for `@use`?
https://github.com/prettier/prettier/blob/1aa188ecd1adc9ebd18cd8766172206cb916486f/src/language-css/parser-postcss.js#L528-L533
@apexskier Maybe yes! If you want to contribute to Prettier, you can create the PR to fix it. If not,... | 2021-09-07 10:02:30+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| [] | ['/testbed/tests/format/scss/quotes/jsfmt.spec.js->quotes.scss - {"singleQuote":true} format', '/testbed/tests/format/scss/quotes/jsfmt.spec.js->quotes.scss format'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/format/scss/quotes/jsfmt.spec.js tests/format/scss/quotes/__snapshots__/jsfmt.spec.js.snap tests/format/scss/quotes/quotes.scss --json | Bug Fix | false | true | false | false | 2 | 0 | 2 | false | false | ["src/language-css/utils.js->program->function_declaration:isModuleRuleName", "src/language-css/parser-postcss.js->program->function_declaration:parseNestedCSS"] |
prettier/prettier | 11,398 | prettier__prettier-11398 | ['11397'] | a547330ca97277037d10b60ff5e6b9c3c5cdca1f | diff --git a/changelog_unreleased/flow/11398.md b/changelog_unreleased/flow/11398.md
new file mode 100644
index 000000000000..02b564d6f8bb
--- /dev/null
+++ b/changelog_unreleased/flow/11398.md
@@ -0,0 +1,26 @@
+#### Print leading semi before Flow variance sigils (#11398 by @noppa)
+
+<!-- prettier-ignore -->
+```jsx
+... | diff --git a/tests/format/flow/no-semi/__snapshots__/jsfmt.spec.js.snap b/tests/format/flow/no-semi/__snapshots__/jsfmt.spec.js.snap
index 2a25e9c704b9..36cf0be3cf9f 100644
--- a/tests/format/flow/no-semi/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/format/flow/no-semi/__snapshots__/jsfmt.spec.js.snap
@@ -2,7 +2,7 @@
... | Flow variance sigil with no-semi leads to incorrect output
**Prettier 2.3.2**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAucAbAhgZ0wAgII7AA6UOOA1NHDgLw4Bu6qAFAJQDcJZ5MA7hLQZM2JAL4kQAGhAQADjACW0TMlDoATuoi8AChoQqUTXugCeK6QCN16MAGs4MAMqzbCqAHNkMdQFc40nAAtpZwACZh4QAy6J6+6B5wAGIQ6kHoMIqeyCDovjAQUiAAFj... | null | 2021-08-25 14:29:55+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/format/flow/no-semi/jsfmt.spec.js->no-semi.js [__babel_estree] format', '/testbed/tests/format/flow/no-semi/jsfmt.spec.js->comments.js format', '/testbed/tests/format/flow/no-semi/jsfmt.spec.js->comments.js - {"semi":false} [__babel_estree] format', '/testbed/tests/format/flow/no-semi/jsfmt.spec.js->fl... | ['/testbed/tests/format/flow/no-semi/jsfmt.spec.js->flow-class-properties.js - {"semi":false} format'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/format/flow/no-semi/jsfmt.spec.js tests/format/flow/no-semi/flow-class-properties.js tests/format/flow/no-semi/__snapshots__/jsfmt.spec.js.snap --json | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/language-js/print/statement.js->program->function_declaration:shouldPrintSemicolonAfterClassProperty"] |
prettier/prettier | 11,373 | prettier__prettier-11373 | ['11372'] | 29b116b4a12d145d1770ef62ed5d8785244551e8 | diff --git a/changelog_unreleased/markdown/11373.md b/changelog_unreleased/markdown/11373.md
new file mode 100644
index 000000000000..8eb18b15ed75
--- /dev/null
+++ b/changelog_unreleased/markdown/11373.md
@@ -0,0 +1,15 @@
+#### Preserve inline code line breaks if `--prose-wrap=preserve` (#11373 by @andersk)
+
+<!-- pr... | diff --git a/tests/format/markdown/prose-wrap-preserve/__snapshots__/jsfmt.spec.js.snap b/tests/format/markdown/prose-wrap-preserve/__snapshots__/jsfmt.spec.js.snap
new file mode 100644
index 000000000000..3e177ccb63b7
--- /dev/null
+++ b/tests/format/markdown/prose-wrap-preserve/__snapshots__/jsfmt.spec.js.snap
@@ -0,... | --prose-wrap=preserve should preserve line breaks in Markdown inline code spans
**Prettier 2.3.2**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEAZCAnOBbABASwAcBnAVzwBMIAbTXY-GXAQ2zhgBpdIpi4x4MUhhYUi+YmHxQA5rjjVGXPhVxV5+UsWwRVAA3jZCmADpRpUsRVKw9uUk2rMARpjjymVWllzZmMqGYWRQBHUmYAOlwAVSYEfDxmVWxpBNw... | null | 2021-08-21 07:51:20+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| [] | ['/testbed/tests/format/markdown/prose-wrap-preserve/jsfmt.spec.js->inline-code-newline.md - {"proseWrap":"preserve"} format'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/format/markdown/prose-wrap-preserve/jsfmt.spec.js tests/format/markdown/prose-wrap-preserve/__snapshots__/jsfmt.spec.js.snap tests/format/markdown/prose-wrap-preserve/inline-code-newline.md --json | Bug Fix | false | true | false | false | 2 | 0 | 2 | false | false | ["src/language-markdown/print-preprocess.js->program->function_declaration:transformInlineCode", "src/language-markdown/print-preprocess.js->program->function_declaration:preprocess"] |
prettier/prettier | 11,000 | prettier__prettier-11000 | ['10964'] | c8133f8afabbfa0b6a8f88da8a37c8e79d9f5671 | diff --git a/changelog_unreleased/cli/11000.md b/changelog_unreleased/cli/11000.md
new file mode 100644
index 000000000000..64e1d3d58f69
--- /dev/null
+++ b/changelog_unreleased/cli/11000.md
@@ -0,0 +1,17 @@
+#### Fix failure on dir with trailing slash (#11000 by @fisker)
+
+<!-- prettier-ignore -->
+```console
+$ ls
+... | diff --git a/tests/integration/__tests__/__snapshots__/patterns-dirs.js.snap b/tests/integration/__tests__/__snapshots__/patterns-dirs.js.snap
index 1ef92eb65958..8be8bd58f651 100644
--- a/tests/integration/__tests__/__snapshots__/patterns-dirs.js.snap
+++ b/tests/integration/__tests__/__snapshots__/patterns-dirs.js.sn... | CLI fails when passed a dir with trailing slash: `prettier dir/`
**Environments:**
- Prettier Version: 2.3.0
- Running Prettier via: CLI
- Runtime: Node.js v14
- Operating System: Linux (WSL 2 w/ Debian buster)
- Prettier plugins (if any): No plugins
**Steps to reproduce:**
Run `npx prettier code/` with a ... | null | 2021-06-01 01:43:09+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ["/testbed/tests/integration/__tests__/patterns-dirs.js->2: prettier dir1 'dir2/**/*' (write)", '/testbed/tests/integration/__tests__/patterns-dirs.js->Trailing slash 5: prettier .//dir2/..//./dir1// (write)', "/testbed/tests/integration/__tests__/patterns-dirs.js->2: prettier dir1 'dir2/**/*' (stdout)", "/testbed/test... | ['/testbed/tests/integration/__tests__/patterns-dirs.js->Trailing slash 1: prettier ./ (stdout)', '/testbed/tests/integration/__tests__/patterns-dirs.js->Trailing slash run in sub dir 2: prettier ../ (stdout)', '/testbed/tests/integration/__tests__/patterns-dirs.js->Trailing slash 5: prettier .//dir2/..//./dir1// (stde... | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/integration/__tests__/patterns-dirs.js tests/integration/__tests__/__snapshots__/patterns-dirs.js.snap --json | Bug Fix | true | false | false | false | 0 | 0 | 0 | false | false | [] |
prettier/prettier | 10,916 | prettier__prettier-10916 | ['10850'] | 8f17187bf7b8aed10b923396f112b896a0a2023a | diff --git a/changelog_unreleased/typescript/10916.md b/changelog_unreleased/typescript/10916.md
new file mode 100644
index 000000000000..68f41577b51f
--- /dev/null
+++ b/changelog_unreleased/typescript/10916.md
@@ -0,0 +1,21 @@
+#### Break the LHS of assignments that has complex type parameters (#10916 by @sosukesuzuk... | diff --git a/tests/format/flow/assignments/__snapshots__/jsfmt.spec.js.snap b/tests/format/flow/assignments/__snapshots__/jsfmt.spec.js.snap
new file mode 100644
index 000000000000..9d921c9cb686
--- /dev/null
+++ b/tests/format/flow/assignments/__snapshots__/jsfmt.spec.js.snap
@@ -0,0 +1,29 @@
+// Jest Snapshot v1, htt... | Ugly formatting for complex Map types in Flow and TS
**Prettier 2.3.0**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuc0DOMAEBbAhgByUwFkCAeAHSk0wDEBXKMGAS2gBoqbT8yMAnFlADmmAD6YAbhBYATdpmBTcAG3pwiAVSgqIuWXFkAROGjCD8MCP0wBfAHxV7mALyYocAO4kCACgCUANxUIOwgEJZsUGjIoLj8-BCeAArxCDEoqp64AJ4xYQBG-LhgANZwMAD... | null | 2021-05-19 20:55:28+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/format/flow/assignments/jsfmt.spec.js->issue-10850.js [flow] format'] | ['/testbed/tests/format/flow/assignments/jsfmt.spec.js->issue-10850.js format'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/format/flow/assignments/issue-10850.js tests/format/flow/assignments/__snapshots__/jsfmt.spec.js.snap tests/format/typescript/assignment/__snapshots__/jsfmt.spec.js.snap tests/format/typescript/assignment/issue-10850.t... | Bug Fix | false | true | false | false | 4 | 0 | 4 | false | false | ["src/language-js/print/assignment.js->program->function_declaration:getTypeParametersFromTypeReference", "src/language-js/print/assignment.js->program->function_declaration:chooseLayout", "src/language-js/print/assignment.js->program->function_declaration:hasComplexTypeAnnotation", "src/language-js/print/assignment.js... |
prettier/prettier | 10,910 | prettier__prettier-10910 | ['10406'] | a3466f771fbcc1838ff93dfd32d21d2a34061b9b | diff --git a/src/language-js/clean.js b/src/language-js/clean.js
index 903988eb6f72..cd67b0e35a22 100644
--- a/src/language-js/clean.js
+++ b/src/language-js/clean.js
@@ -46,6 +46,9 @@ function clean(ast, newObj, parent) {
if (ast.type === "DecimalLiteral") {
newObj.value = Number(newObj.value);
}
+ if (ast... | diff --git a/tests/config/format-test.js b/tests/config/format-test.js
index 492b150a4617..06b5204c2b21 100644
--- a/tests/config/format-test.js
+++ b/tests/config/format-test.js
@@ -186,6 +186,10 @@ function runSpec(fixtures, parsers, options) {
allParsers.push("meriyah");
}
}
+
+ if (parsers.i... | Proposal: Add `__babel-estree` parser
The [`@babel/eslint-parser`](https://github.com/babel/babel/tree/main/eslint/babel-eslint-parser) generate a different shape of AST.
I propose add this private parser to valid that we can also print this AST, so maybe we can really skip parsing in `eslint-plugin-pretter` someday... | null | 2021-05-18 07:56:52+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/format/js/tuple/jsfmt.spec.js->invalid-tuple-holes.js [meriyah] format', '/testbed/tests/format/typescript/typeparams/consistent/jsfmt.spec.js->flow-only.ts [flow] format', '/testbed/tests/format/flow/comments/jsfmt.spec.js->union.js format', '/testbed/tests/format/flow/comments/jsfmt.spec.js->arrow.js... | ['/testbed/tests/format/js/tuple/jsfmt.spec.js->invalid-tuple-holes.js [__babel_estree] format', '/testbed/tests/format/js/call/invalid/jsfmt.spec.js->null-arguments-item.js [__babel_estree] format'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/format/js/tuple/__snapshots__/jsfmt.spec.js.snap tests/format/typescript/typeparams/consistent/jsfmt.spec.js tests/format/js/call/invalid/jsfmt.spec.js tests/format/js/tuple/jsfmt.spec.js tests/format/flow/comments/__s... | Feature | false | true | false | false | 12 | 0 | 12 | false | false | ["src/language-js/clean.js->program->function_declaration:clean", "src/language-js/index.js->program->method_definition:__babel_estree", "src/language-js/utils.js->program->function_declaration:getCallArguments", "src/language-js/print/literal.js->program->function_declaration:printLiteral", "src/language-js/comments.j... |
prettier/prettier | 10,901 | prettier__prettier-10901 | ['10857'] | a3466f771fbcc1838ff93dfd32d21d2a34061b9b | diff --git a/changelog_unreleased/typescript/10901.md b/changelog_unreleased/typescript/10901.md
new file mode 100644
index 000000000000..4ab300e845e9
--- /dev/null
+++ b/changelog_unreleased/typescript/10901.md
@@ -0,0 +1,33 @@
+#### Break the LHS of type alias that has complex type parameters (#10901 by @sosukesusuzk... | diff --git a/tests/format/flow/type-alias/__snapshots__/jsfmt.spec.js.snap b/tests/format/flow/type-alias/__snapshots__/jsfmt.spec.js.snap
new file mode 100644
index 000000000000..34530f271b4f
--- /dev/null
+++ b/tests/format/flow/type-alias/__snapshots__/jsfmt.spec.js.snap
@@ -0,0 +1,76 @@
+// Jest Snapshot v1, https:... | Ugly formatting for complex type parameters
**Prettier 2.3.0**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEMCeAHOACAYgSzgBsATAGQEM0IBXGAdXxgAsAeAHSm2wBVs4AHvCgkAztlEwATvigBzADSduAZX5CEY7DSgBrKBADuXALzZg2Q-hIskE6bLnYAvpwB82M8GXZ0WOzwA3D6QJHB2kjLywVwS+ABe4dgqMc4xIAogEBgw+NCiyKAUUlJGAArFCAUoFESGVA... | null | 2021-05-16 15:13:38+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/format/flow/type-alias/jsfmt.spec.js->issue-100857.js [babel-flow] format'] | ['/testbed/tests/format/flow/type-alias/jsfmt.spec.js->issue-100857.js format'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/format/typescript/type-alias/issue-100857.ts tests/format/flow/type-alias/issue-100857.js tests/format/flow/type-alias/__snapshots__/jsfmt.spec.js.snap tests/format/flow/type-alias/jsfmt.spec.js tests/format/typescript... | Bug Fix | false | true | false | false | 4 | 0 | 4 | false | false | ["src/language-js/print/assignment.js->program->function_declaration:isTypeAlias", "src/language-js/print/assignment.js->program->function_declaration:isComplexTypeAliasParams", "src/language-js/print/assignment.js->program->function_declaration:chooseLayout", "src/language-js/print/assignment.js->program->function_dec... |
prettier/prettier | 10,781 | prettier__prettier-10781 | ['10777'] | 7a6af717de98952fec0d34950fdb097876a2c97d | diff --git a/changelog_unreleased/javascript/10781.md b/changelog_unreleased/javascript/10781.md
new file mode 100644
index 000000000000..eec318f35841
--- /dev/null
+++ b/changelog_unreleased/javascript/10781.md
@@ -0,0 +1,17 @@
+#### Fix missing parentheses on `async` inside `for..of` (#10781 by @fisker)
+
+<!-- prett... | diff --git a/tests/format/js/for-of/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/for-of/__snapshots__/jsfmt.spec.js.snap
new file mode 100644
index 000000000000..1dcc6d0b41a3
--- /dev/null
+++ b/tests/format/js/for-of/__snapshots__/jsfmt.spec.js.snap
@@ -0,0 +1,44 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
... | Missing parentheses `for ((async) of []);`
This is valid even in [main branch](https://deploy-preview-10775--prettier.netlify.app/playground/#N4Igxg9gdgLgprEAuEAzCAnABAChwQwGcBPKMASiwlSwG0BdcgbhABoQIAHGAS2kOSh8GDBADuABWEIBKfABsx+YgPYAjDPjABrODADKnLTygBzZDAwBXOOzgBbNXAAmzlwBl8Zq-lNwAYpj2+DC8Zsgg+FYwEGwgABYw9vIA6vE88IRGY... | null | 2021-04-29 07:39:47+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/format/misc/errors/js/for-of/jsfmt.spec.js->snippet: #1 [babel-flow] format', '/testbed/tests/format/js/for-of/jsfmt.spec.js->async-identifier.js [babel-ts] format', '/testbed/tests/format/misc/errors/js/for-of/jsfmt.spec.js->snippet: #0 [flow] format', '/testbed/tests/format/misc/errors/js/for-of/jsfm... | ['/testbed/tests/format/js/for-of/jsfmt.spec.js->async-identifier.js format'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/format/misc/errors/js/for-of/jsfmt.spec.js tests/format/js/for-of/__snapshots__/jsfmt.spec.js.snap tests/format/js/for-of/jsfmt.spec.js tests/format/js/for-of/async-identifier.js tests/format/misc/errors/js/for-of/__sn... | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/language-js/needs-parens.js->program->function_declaration:needsParens"] |
prettier/prettier | 10,714 | prettier__prettier-10714 | ['10709'] | f8fff81005881441ffd1f9982b2b525dea413ea9 | diff --git a/changelog_unreleased/javascript/10714.md b/changelog_unreleased/javascript/10714.md
new file mode 100644
index 000000000000..e186f02f989d
--- /dev/null
+++ b/changelog_unreleased/javascript/10714.md
@@ -0,0 +1,21 @@
+#### Support the "decorated function" pattern (#10714 by @thorn0)
+
+In this case the deve... | diff --git a/tests/format/flow/last-argument-expansion/__snapshots__/jsfmt.spec.js.snap b/tests/format/flow/last-argument-expansion/__snapshots__/jsfmt.spec.js.snap
new file mode 100644
index 000000000000..5563f0bf751b
--- /dev/null
+++ b/tests/format/flow/last-argument-expansion/__snapshots__/jsfmt.spec.js.snap
@@ -0,... | Suboptimal additional indentation for decorated functions
**Prettier 2.2.1**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEB6VACAvDjcAeAhgLYAOANnBgIzY70ONPMtMYA6U6GMAFlQDMIAJ2KEY8ACYYIAVxil5MgT14BLAM4yoVAO5ry5beQCeGchAgBrDAHNLkztzUrSwuBLVxhGAG4AmADog2k0MWQ04aQxCLTUYHndxLQFZKDAYNWgtPnEnTEJ3DCgSKI4... | Closely related: https://github.com/prettier/prettier/issues/6921
I don't believe there is a solution. In situations like this, the developer is willing to sacrifice the readability of a call to get less indentation. How can an algorithm guess this intention?
For `it`, `describe`, and co this was solved by hardcodin... | 2021-04-16 13:48:14+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/format/typescript/last-argument-expansion/jsfmt.spec.js->format', '/testbed/tests/format/flow/last-argument-expansion/jsfmt.spec.js->format', '/testbed/tests/format/typescript/last-argument-expansion/jsfmt.spec.js->[babel-ts] format'] | ['/testbed/tests/format/typescript/last-argument-expansion/jsfmt.spec.js->format', '/testbed/tests/format/flow/last-argument-expansion/jsfmt.spec.js->format'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/format/flow/last-argument-expansion/break.js tests/format/typescript/last-argument-expansion/__snapshots__/jsfmt.spec.js.snap tests/format/typescript/last-argument-expansion/jsfmt.spec.js tests/format/flow/last-argumen... | Feature | false | true | false | false | 2 | 0 | 2 | false | false | ["src/language-js/print/function-parameters.js->program->function_declaration:isDecoratedFunction", "src/language-js/print/function-parameters.js->program->function_declaration:printFunctionParameters"] |
prettier/prettier | 10,497 | prettier__prettier-10497 | ['7116'] | 02f803ac8d4163e7ae657483b84d295eee4976ed | diff --git a/changelog_unreleased/json/10497.md b/changelog_unreleased/json/10497.md
new file mode 100644
index 000000000000..10e7b5dc7f6b
--- /dev/null
+++ b/changelog_unreleased/json/10497.md
@@ -0,0 +1,16 @@
+#### Fix syntax error on JSON range formatting (#10497 by @fisker)
+
+<!-- prettier-ignore -->
+```js
+// In... | diff --git a/tests/json/range/__snapshots__/jsfmt.spec.js.snap b/tests/json/range/__snapshots__/jsfmt.spec.js.snap
index dcdef5f998b6..53213d9c2049 100644
--- a/tests/json/range/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/json/range/__snapshots__/jsfmt.spec.js.snap
@@ -1,5 +1,115 @@
// Jest Snapshot v1, https://goo.g... | JSON range formatting throws syntax error
**Prettier 1.19.1**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEwAEAdEAjLS0BMaAviADQgQAOMAltAM7KgCGATmxAO4AK7CTFCwBuEWgBNyONizABrODADKVWbSgBzZDDYBXOBQAWMALYAbAOqHa8BqrBwlAm7WE2AnsnAMmFdQzg2GB4ZDRMWZAAzFjMAigArBgAPACEZeUUlFhM4ABl1OCiYuJBEpKV1DTM4AEVdCHgi... | Also ran into the same issue. Not a blocker since I can format the whole file for my use case, but was hoping to get a performance boost by only formatting part of the file that changed. | 2021-03-09 10:57:42+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| [] | ['/testbed/tests/json/range/json-stringify/jsfmt.spec.js->template-literal.json format', '/testbed/tests/json/range/json5/jsfmt.spec.js->inside-array.json format'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/json/range/cross-object.json tests/json/range/json-stringify/template-literal.json tests/json/range/json5/__snapshots__/jsfmt.spec.js.snap tests/json/range/cross-array2.json tests/json/range/__snapshots__/jsfmt.spec.js... | Bug Fix | false | true | false | false | 3 | 0 | 3 | false | false | ["src/main/range-util.js->program->function_declaration:isSourceElement", "src/main/range-util.js->program->function_declaration:findCommonAncestor", "src/main/range-util.js->program->function_declaration:calculateRange"] |
prettier/prettier | 10,346 | prettier__prettier-10346 | ['10333'] | f858f5519fb07806ad60c8e8a29763c003c9588c | diff --git a/changelog_unreleased/json/10346.md b/changelog_unreleased/json/10346.md
new file mode 100644
index 000000000000..1bbccf9d59b6
--- /dev/null
+++ b/changelog_unreleased/json/10346.md
@@ -0,0 +1,17 @@
+#### Stricter JSON parser (#10346 by @fisker)
+
+Previously we allow all kinds of JavaScript expressions in ... | diff --git a/tests/markdown/multiparser-json/__snapshots__/jsfmt.spec.js.snap b/tests/markdown/multiparser-json/__snapshots__/jsfmt.spec.js.snap
index b3f00746c3ae..c6ab38824553 100644
--- a/tests/markdown/multiparser-json/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/markdown/multiparser-json/__snapshots__/jsfmt.spec.j... | Markdown code-block with wrong language yields garbage
<!--
BEFORE SUBMITTING AN ISSUE:
1. Search for your issue on GitHub: https://github.com/prettier/prettier/issues
A large number of opened issues are duplicates of existing issues.
If someone has already opened an issue for what you are experiencing... | > If the content cannot be parsed as the requested language, throw.
I'd caution against relying on such expectations. Prettier guarantees (well, strives to guarantee) only that correct code stays correct. It makes no promises about invalid code. That's why handling this case better would be an enhancement, not a fix... | 2021-02-19 02:07:25+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/misc/errors/json/jsfmt.spec.js->snippet: #2 [json-stringify] format', '/testbed/tests/misc/errors/json/jsfmt.spec.js->snippet: #0 [json] format', '/testbed/tests/misc/errors/json/jsfmt.spec.js->snippet: #4 [json-stringify] format', '/testbed/tests/misc/errors/json/jsfmt.spec.js->snippet: #1 [json-strin... | ['/testbed/tests/misc/errors/json/jsfmt.spec.js->snippet: #1 [json] format'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/markdown/multiparser-json/invalid-json.md tests/markdown/multiparser-json/__snapshots__/jsfmt.spec.js.snap tests/misc/errors/json/__snapshots__/jsfmt.spec.js.snap tests/misc/errors/json/jsfmt.spec.js --json | Bug Fix | false | true | false | false | 2 | 0 | 2 | false | false | ["src/language-js/parser-babel.js->program->function_declaration:createJsonParse", "src/language-js/parser-babel.js->program->function_declaration:parseJson"] |
prettier/prettier | 10,334 | prettier__prettier-10334 | ['10332'] | 9a2dc517ada0cbbfa111e897a32ef0d2b7edcf51 | diff --git a/changelog_unreleased/javascript/10334.md b/changelog_unreleased/javascript/10334.md
new file mode 100644
index 000000000000..8d41c6fe8421
--- /dev/null
+++ b/changelog_unreleased/javascript/10334.md
@@ -0,0 +1,22 @@
+#### Fix ASI protection for private fields (#10334 by @thorn0)
+
+<!-- prettier-ignore -->... | diff --git a/tests/js/no-semi/__snapshots__/jsfmt.spec.js.snap b/tests/js/no-semi/__snapshots__/jsfmt.spec.js.snap
index 609486589aa0..5435656fc172 100644
--- a/tests/js/no-semi/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/js/no-semi/__snapshots__/jsfmt.spec.js.snap
@@ -1007,3 +1007,64 @@ aReallyLongLine012345678901234... | Bug with no-semi, private fields and computed method
<!--
BEFORE SUBMITTING AN ISSUE:
1. Search for your issue on GitHub: https://github.com/prettier/prettier/issues
A large number of opened issues are duplicates of existing issues.
If someone has already opened an issue for what you are experiencing,
... | null | 2021-02-16 14:25:05+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/js/no-semi/jsfmt.spec.js->comments.js - {"semi":false} format', '/testbed/tests/js/no-semi/jsfmt.spec.js->issue2006.js - {"semi":false} [meriyah] format', '/testbed/tests/js/no-semi/jsfmt.spec.js->private-field.js - {"semi":false} [flow] format', '/testbed/tests/js/no-semi/jsfmt.spec.js->comments.js fo... | ['/testbed/tests/js/no-semi/jsfmt.spec.js->private-field.js - {"semi":false} [meriyah] format', '/testbed/tests/js/no-semi/jsfmt.spec.js->private-field.js - {"semi":false} format'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/js/no-semi/jsfmt.spec.js tests/js/no-semi/private-field.js tests/js/no-semi/__snapshots__/jsfmt.spec.js.snap --json | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/language-js/print/statement.js->program->function_declaration:printStatementSequence"] |
prettier/prettier | 10,323 | prettier__prettier-10323 | ['5708'] | 152b723caaf96a16c0ccbef15a809135fb4d0b3b | diff --git a/changelog_unreleased/json/10323.md b/changelog_unreleased/json/10323.md
new file mode 100644
index 000000000000..eab0505f60b0
--- /dev/null
+++ b/changelog_unreleased/json/10323.md
@@ -0,0 +1,21 @@
+#### Don't use smart quotes for JSON5 with `--quote-props=preserve` (#10323 by @thorn0)
+
+With the `quotePr... | diff --git a/tests/json/json5-as-json-with-trailing-commas/__snapshots__/jsfmt.spec.js.snap b/tests/json/json5-as-json-with-trailing-commas/__snapshots__/jsfmt.spec.js.snap
new file mode 100644
index 000000000000..fa8d48528a7b
--- /dev/null
+++ b/tests/json/json5-as-json-with-trailing-commas/__snapshots__/jsfmt.spec.js... | Allow JSON with trailing commas
I'm looking for a way to support the following style:
- JSON-based
- Always quote keys
- Always include trailing commas
This would typically be not a problem -- I should be able to set `parser: json` and `trailingComma: all`. However, #2308\* disables this specific combination and ... | `--parser json-vscode` :shudder:
wow, they [made their own JSON parser](https://github.com/Microsoft/vscode/blob/8700c2e4290968f5dfa3cc2c7f78ec0c54500394/src/vs/base/common/json.ts) in the first commit, and still use it.
@lydell the problem isn't the prettier `json` parser, it parses trailing commas just fine. The prob... | 2021-02-15 12:47:17+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| [] | ['/testbed/tests/json/json5-as-json-with-trailing-commas/jsfmt.spec.js->nested-quotes.json - {"quoteProps":"preserve"} format'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/json/json5-as-json-with-trailing-commas/__snapshots__/jsfmt.spec.js.snap tests/json/json5-as-json-with-trailing-commas/jsfmt.spec.js tests/json/json5-as-json-with-trailing-commas/nested-quotes.json --json | Feature | false | true | false | false | 1 | 0 | 1 | true | false | ["src/common/util.js->program->function_declaration:printString"] |
prettier/prettier | 10,316 | prettier__prettier-10316 | ['7542'] | c3d08c943e08ae791cd702bcf8fcd95a20fed38b | diff --git a/changelog_unreleased/typescript/10316.md b/changelog_unreleased/typescript/10316.md
new file mode 100644
index 000000000000..4ceeae64dfed
--- /dev/null
+++ b/changelog_unreleased/typescript/10316.md
@@ -0,0 +1,21 @@
+#### Allow hugging arguments that are non-concise arrow functions with return type annotat... | diff --git a/tests/typescript/typeparams/print-width-120/__snapshots__/jsfmt.spec.js.snap b/tests/typescript/typeparams/print-width-120/__snapshots__/jsfmt.spec.js.snap
new file mode 100644
index 000000000000..666c9bb037c4
--- /dev/null
+++ b/tests/typescript/typeparams/print-width-120/__snapshots__/jsfmt.spec.js.snap
... | Unnecessary new lines injected by typescript parser.
**Prettier 1.19.1**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEcAeAHCAnGACSKAZ3wDEII8BePAMxwHcBDbAEwCU5aAKbjbCBiJI85CAAUBQgDR5sXEZ1oAeABIAVALIAZAKIAbOAFsEMAHwBKEQCkAygA0AdAeOnqZvMAA6UPHLgwAK7YvsqsAJYAbngA9GYA3D4AvhaJUD7oWLgE0CR4AEIs1HSMLBxcv... | I'm not sure if this is a bug. But, it is strange that there is difference between normal return type and union return type.
If this is considered a bug, I would be happy to work on a fix
@whitneyit are you still interested in picking this one up, if no i can take it as its annoying me in my codebase
~I'm keen to work ... | 2021-02-15 03:58:03+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/typescript/typeparams/print-width-120/jsfmt.spec.js->issue-7542.ts - {"printWidth":120} [babel-ts] format'] | ['/testbed/tests/typescript/typeparams/print-width-120/jsfmt.spec.js->issue-7542.ts - {"printWidth":120} format'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/typescript/typeparams/print-width-120/jsfmt.spec.js tests/typescript/typeparams/print-width-120/__snapshots__/jsfmt.spec.js.snap tests/typescript/typeparams/print-width-120/issue-7542.ts --json | Bug Fix | false | true | false | false | 2 | 0 | 2 | false | false | ["src/language-js/print/call-arguments.js->program->function_declaration:isNonEmptyBlockStatement", "src/language-js/print/call-arguments.js->program->function_declaration:couldGroupArg"] |
prettier/prettier | 10,187 | prettier__prettier-10187 | ['4976'] | a8f35961c066de440ceb31c9b7414c88cf91e7af | diff --git a/changelog_unreleased/javascript/10187.md b/changelog_unreleased/javascript/10187.md
new file mode 100644
index 000000000000..30714a50e5d9
--- /dev/null
+++ b/changelog_unreleased/javascript/10187.md
@@ -0,0 +1,67 @@
+#### Consistent indentations for conditional operators (#10187 by @sosukesuzuki)
+
+<!-- p... | diff --git a/tests/js/ternaries/__snapshots__/jsfmt.spec.js.snap b/tests/js/ternaries/__snapshots__/jsfmt.spec.js.snap
index b8fd647e7ea1..27a6f6055478 100644
--- a/tests/js/ternaries/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/js/ternaries/__snapshots__/jsfmt.spec.js.snap
@@ -1608,6 +1608,2146 @@ a
=================... | Invalid indentation: `return (foo ? bar1 : bar2).baz()`
**Prettier 1.14.2**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEACVkoGcaoCZyQBOAhvHqgLyoAUNJRA5gDSoCWjUERcASnAEcArnBwBRIkW4BKKgD5UwADpR0a1DxhCiqmivUHUMAJ4AHOBABmqBoyqVqAchxE2URo9QAfL-sNr6JlQAMmCbJgA6ADcSABsRAHlrUKMzC2tbaLjEyxpZBycXNw9pP38D... | null | 2021-01-31 19:19:57+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/typescript/ternaries/jsfmt.spec.js->indent.ts [babel-ts] format'] | ['/testbed/tests/typescript/ternaries/jsfmt.spec.js->indent.ts format'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/js/ternaries/indent-after-paren.js tests/typescript/as/__snapshots__/jsfmt.spec.js.snap tests/typescript/ternaries/jsfmt.spec.js tests/js/ternaries/__snapshots__/jsfmt.spec.js.snap tests/typescript/as/ternary.ts tests/... | Bug Fix | false | true | false | false | 3 | 0 | 3 | false | false | ["src/language-js/utils.js->program->function_declaration:isChainElement", "src/language-js/print/ternary.js->program->function_declaration:printTernary", "src/language-js/print/ternary.js->program->function_declaration:shouldExtraIndentForConditionalExpression"] |
prettier/prettier | 10,109 | prettier__prettier-10109 | ['3662'] | 63a771db55bcf5d81478e1cd593964118cb26f69 | diff --git a/changelog_unreleased/typescript/10109.md b/changelog_unreleased/typescript/10109.md
new file mode 100644
index 000000000000..1a54cb3b3ee0
--- /dev/null
+++ b/changelog_unreleased/typescript/10109.md
@@ -0,0 +1,43 @@
+#### Print trailing commas for TS type parameters (#10109 by @sosukesuzuki)
+
+Initially, ... | diff --git a/tests/typescript/trailing-comma/__snapshots__/jsfmt.spec.js.snap b/tests/typescript/trailing-comma/__snapshots__/jsfmt.spec.js.snap
index 2728bc25f3df..3fe0b32a0ee9 100644
--- a/tests/typescript/trailing-comma/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/typescript/trailing-comma/__snapshots__/jsfmt.spec.j... | Trailing commas for type parameters in TypeScript
**Prettier 1.9.2**
~~I would paste a playground link but no TypeScript support ;)~~ I'm silly: [Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEMCeAHOACAKnAWwwBsBDeAIQEsoATGgc2wF4AdKbT7AH2wEEMJOPiJlKNelAbsuPbBVJRFpESXJxqdRjK68AwqQBOhiDFVi4AOQi047AN... | Prettier rolls in it's own copy of the TypeScript parser, and we don't detect the version of TypeScript at all. Does trailing commas in the case even add any value? It's not like you ever have a large list of type parameters where diffing is a problem?
It's not a problem, just a convenience. I would prefer having them ... | 2021-01-23 04:38:24+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/typescript/trailing-comma/jsfmt.spec.js->arrow-functions.tsx - {"trailingComma":"none"} format', '/testbed/tests/typescript/trailing-comma/jsfmt.spec.js->arrow-functions.tsx - {"trailingComma":"all"} format', '/testbed/tests/typescript/trailing-comma/jsfmt.spec.js->arrow-functions.tsx - {"trailingComma... | ['/testbed/tests/typescript/trailing-comma/jsfmt.spec.js->trailing.ts - {"trailingComma":"all"} format', '/testbed/tests/typescript/trailing-comma/jsfmt.spec.js->type-parameters.ts - {"trailingComma":"all"} format'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/typescript/trailing-comma/arrow-functions.tsx tests/typescript/trailing-comma/type-parameters.ts tests/typescript/trailing-comma/jsfmt.spec.js tests/typescript/trailing-comma/__snapshots__/jsfmt.spec.js.snap --json | Feature | false | true | false | false | 2 | 0 | 2 | false | false | ["src/language-js/print/type-parameters.js->program->function_declaration:printTypeParameters", "src/language-js/print/type-parameters.js->program->function_declaration:printTypeParameter"] |
prettier/prettier | 10,065 | prettier__prettier-10065 | ['10047'] | c5300fa0ca071e6a9b3038efdb9d1ed26671ecba | diff --git a/changelog_unreleased/javascript/9787.md b/changelog_unreleased/javascript/9787.md
index 8a8c45ee4537..e24fb76a2fe9 100644
--- a/changelog_unreleased/javascript/9787.md
+++ b/changelog_unreleased/javascript/9787.md
@@ -1,4 +1,4 @@
-#### Print null items in arguments (#9787 by @sosukesuzuki)
+#### Disable Ba... | diff --git a/tests/js/call/invalid/__snapshots__/jsfmt.spec.js.snap b/tests/js/call/invalid/__snapshots__/jsfmt.spec.js.snap
new file mode 100644
index 000000000000..23947f3ac266
--- /dev/null
+++ b/tests/js/call/invalid/__snapshots__/jsfmt.spec.js.snap
@@ -0,0 +1,28 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+ex... | incorrect handling of function calls with missing arguments
<!--
BEFORE SUBMITTING AN ISSUE:
1. Search for your issue on GitHub: https://github.com/prettier/prettier/issues
A large number of opened issues are duplicates of existing issues.
If someone has already opened an issue for what you are experie... | Supporting these cases of error recovery seems to be useless maintenance burden. Let's just rethrow Babel's errors in these cases and call it a day.
My apologies for the confusion, I reported multiple cases that I think we should take a look at. I have now updated the description to be hopefully more clear.
Case 1a ... | 2021-01-16 14:22:35+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/js/call/invalid/jsfmt.spec.js->null-arguments-item.js [meriyah] format', '/testbed/tests/js/call/invalid/jsfmt.spec.js->null-arguments-item.js [espree] format'] | ['/testbed/tests/js/call/invalid/jsfmt.spec.js->null-arguments-item.js [babel] format'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/js/call/invalid/null-arguments-item.js /dev/null tests/js/call/invalid/jsfmt.spec.js --json | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/language-js/utils.js->program->function_declaration:isFunctionCompositionArgs"] |
prettier/prettier | 9,866 | prettier__prettier-9866 | ['7029'] | 892a70e0d3011349155d2f82d56a99532f23fd19 | diff --git a/changelog_unreleased/javascript/9866.md b/changelog_unreleased/javascript/9866.md
new file mode 100644
index 000000000000..72ebe84c41cd
--- /dev/null
+++ b/changelog_unreleased/javascript/9866.md
@@ -0,0 +1,29 @@
+#### Fix unstable JSX formatting with U+3000 (#9866 by @fisker)
+
+<!-- prettier-ignore -->
+... | diff --git a/tests/jsx/whitespace/jsfmt.spec.js b/tests/jsx/whitespace/jsfmt.spec.js
index 9d5fc32cf19e..e3e838ef6a4e 100644
--- a/tests/jsx/whitespace/jsfmt.spec.js
+++ b/tests/jsx/whitespace/jsfmt.spec.js
@@ -70,6 +70,18 @@ run_spec(
);
`,
},
+ {
+ code: outdent`
+ <p>
... | Unstable JSX formatting with \u3000
**Prettier 1.19.1**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuc0DOMAE8OYLyYAUAlPgHybAA6UmmATnDAK722E110A8ADmZy480vAIa0A9GUAADMBgALAJZoAdL3oReqgCaiYolTEUwANnAC+07iPGYpgnhP6DiAbhrnXIADQhNR9GRQUXoNAHcABRCENGQQUQA3CEVtHxAAI3pRMABrJgBlMTBFKABzZBh6ZjhfeRgAWxMAdSUc... | null | 2020-12-10 11:35:59+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/jsx/whitespace/jsfmt.spec.js->snippet: #4 [babel-ts] format', '/testbed/tests/jsx/whitespace/jsfmt.spec.js->snippet: #3 [babel-ts] format', '/testbed/tests/jsx/whitespace/jsfmt.spec.js->snippet: #1 format', '/testbed/tests/jsx/whitespace/jsfmt.spec.js->snippet: #12 [typescript] format', '/testbed/tests... | ['/testbed/tests/jsx/whitespace/jsfmt.spec.js->snippet: #12 format'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/jsx/whitespace/jsfmt.spec.js --json | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/language-js/print/jsx.js->program->function_declaration:printJSXChildren"] |
prettier/prettier | 9,850 | prettier__prettier-9850 | ['3009'] | 19a8df2f572f1bc4504cebe0614f45f868b786fa | diff --git a/changelog_unreleased/javascript/9850.md b/changelog_unreleased/javascript/9850.md
new file mode 100644
index 000000000000..313a6c192eaf
--- /dev/null
+++ b/changelog_unreleased/javascript/9850.md
@@ -0,0 +1,31 @@
+#### Fix extra semicolon added to ignored directives (#9850 by @fisker)
+
+<!-- prettier-igno... | diff --git a/tests/js/ignore/semi/__snapshots__/jsfmt.spec.js.snap b/tests/js/ignore/semi/__snapshots__/jsfmt.spec.js.snap
new file mode 100644
index 000000000000..e836b8979c5e
--- /dev/null
+++ b/tests/js/ignore/semi/__snapshots__/jsfmt.spec.js.snap
@@ -0,0 +1,62 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+expor... | prettier-ignore causes an extra semicolon
**Prettier 1.12.1**
[Playground link](https://prettier.io/playground/#%7B%22content%22%3A%22%2F%2F%20prettier-ignore%5Cn%5Ct'some%20text'%3B%22%2C%22options%22%3A%7B%22ast%22%3Afalse%2C%22bracketSpacing%22%3Atrue%2C%22doc%22%3Afalse%2C%22jsxBracketSameLine%22%3Afalse%2C%22outp... | The indentation isn't supposed to be preserved, but the extra semicolon is a bug. | 2020-12-09 03:22:04+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/js/ignore/semi/jsfmt.spec.js->directive.js - {"semi":false} [flow] format', '/testbed/tests/js/ignore/semi/jsfmt.spec.js->directive.js - {"semi":false} [meriyah] format', '/testbed/tests/js/ignore/semi/jsfmt.spec.js->directive.js - {"semi":false} [espree] format', '/testbed/tests/js/ignore/semi/jsfmt.s... | ['/testbed/tests/js/ignore/semi/jsfmt.spec.js->directive.js [flow] format', '/testbed/tests/js/ignore/semi/jsfmt.spec.js->directive.js [typescript] format', '/testbed/tests/js/ignore/semi/jsfmt.spec.js->directive.js [meriyah] format', '/testbed/tests/js/ignore/semi/jsfmt.spec.js->directive.js format', '/testbed/tests/j... | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/js/ignore/semi/__snapshots__/jsfmt.spec.js.snap tests/js/ignore/semi/jsfmt.spec.js tests/js/ignore/semi/directive.js --json | Bug Fix | false | true | false | false | 2 | 0 | 2 | false | false | ["src/language-js/printer-estree.js->program->function_declaration:printPathNoParens", "src/language-js/print/block.js->program->function_declaration:printBlock"] |
prettier/prettier | 9,743 | prettier__prettier-9743 | ['9727'] | d8e40cd978ffe5dae04b63d4901f6e425b6ad29a | diff --git a/changelog_unreleased/javascript/9743.md b/changelog_unreleased/javascript/9743.md
new file mode 100644
index 000000000000..376d20e92616
--- /dev/null
+++ b/changelog_unreleased/javascript/9743.md
@@ -0,0 +1,19 @@
+#### Fix inconsistent language comment detection (#9743 by @fisker)
+
+<!-- prettier-ignore -... | diff --git a/tests/js/multiparser-html/language-comment/__snapshots__/jsfmt.spec.js.snap b/tests/js/multiparser-html/language-comment/__snapshots__/jsfmt.spec.js.snap
new file mode 100644
index 000000000000..025e71c48160
--- /dev/null
+++ b/tests/js/multiparser-html/language-comment/__snapshots__/jsfmt.spec.js.snap
@@ ... | Inconsistency language comment detect
**Prettier 2.1.2**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEAzCEAEB6AVJgCQBUBZAGU120wF5MADAHgBEBJANQD5Hs2v7MIADQgIABxgBLaAGdkoAIYAnJRADuABWUI5KBQBs1CgJ5yRAIyUKwAazgwAymOuSoAc2QwlAVzgi4ALbmcAAmIaFkCu7eCm5wAGIQSgEKMFLuyCAK3jAQwiAAFjAB+gDqBZLwMs5gcA46lZIAbp... | null | 2020-11-21 18:15:59+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/js/multiparser-html/language-comment/jsfmt.spec.js->not-language-comment.js [babel-ts] format'] | ['/testbed/tests/js/multiparser-html/language-comment/jsfmt.spec.js->not-language-comment.js format', '/testbed/tests/js/multiparser-html/language-comment/jsfmt.spec.js->not-language-comment.js [typescript] format', '/testbed/tests/js/multiparser-html/language-comment/jsfmt.spec.js->not-language-comment.js [meriyah] fo... | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/js/multiparser-html/language-comment/not-language-comment.js tests/js/multiparser-html/language-comment/__snapshots__/jsfmt.spec.js.snap tests/js/multiparser-html/language-comment/jsfmt.spec.js --json | Bug Fix | false | true | false | false | 2 | 0 | 2 | false | false | ["src/language-js/embed.js->program->function_declaration:hasLanguageComment", "src/language-js/comments.js->program->function_declaration:hasLeadingComment"] |
prettier/prettier | 9,736 | prettier__prettier-9736 | ['9734'] | 11ac80f64eb1466f5a4a11d2cfa0facc8a30d53c | diff --git a/changelog_unreleased/markdown/9736.md b/changelog_unreleased/markdown/9736.md
new file mode 100644
index 000000000000..d60d806790b3
--- /dev/null
+++ b/changelog_unreleased/markdown/9736.md
@@ -0,0 +1,26 @@
+#### Fix extra newline at the end of JavaScript fenced code block with string literal (#9736 by @fi... | diff --git a/tests/markdown/multiparser-js/9734.md b/tests/markdown/multiparser-js/9734.md
new file mode 100644
index 000000000000..d57da526ca89
--- /dev/null
+++ b/tests/markdown/multiparser-js/9734.md
@@ -0,0 +1,49 @@
+Markdown
+
+```js
+"test"
+```
+
+```js
+'test'
+```
+
+```js
+`test`
+```
+
+```js
+false
+```
+
+... | Extra newline at the end of JavaScript fenced code block with string literal
**Prettier 2.2.0**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEBZAhgJwNYBMIDuUAOiVAAaUBWAzqcSAO0AEDpl5IANCBAA4wAltBrJQWTIQAKWBKJToANgXQBPUTwBGmdGGxwYAZT67BUAObIYmAK5wecALaa4uXK4Ay6CzfTm4AGIQmI7oMEIWyCDoNjAQ3CAAFjCOigD... | null | 2020-11-20 17:07:49+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| [] | ['/testbed/tests_integration/__tests__/doc-utils-clean-doc.js->cleanDoc removes empty align/indent/line-suffix', '/testbed/tests_integration/__tests__/doc-utils-clean-doc.js->cleanDoc concat string & flat concat', '/testbed/tests_integration/__tests__/doc-utils-clean-doc.js->cleanDoc nested group', '/testbed/tests_inte... | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/markdown/multiparser-js/9734.md tests/markdown/multiparser-js/__snapshots__/jsfmt.spec.js.snap tests_integration/__tests__/doc-utils-clean-doc.js --json | Bug Fix | false | true | false | false | 7 | 0 | 7 | false | false | ["src/main/multiparser.js->program->function_declaration:textToDoc", "src/document/doc-utils.js->program->function_declaration:stripDocTrailingHardlineFromDoc", "src/document/doc-utils.js->program->function_declaration:cleanDocFn", "src/language-js/embed/css.js->program->function_declaration:replacePlaceholders", "src/... |
prettier/prettier | 9,711 | prettier__prettier-9711 | ['8030'] | 2381f5aedb47dbc3ab005ac82d4ea08f1ba6dce0 | diff --git a/changelog_unreleased/javascript/9711.md b/changelog_unreleased/javascript/9711.md
new file mode 100644
index 000000000000..3793f3c308a1
--- /dev/null
+++ b/changelog_unreleased/javascript/9711.md
@@ -0,0 +1,18 @@
+#### Fix comments inside JSX end tag (#9711 by @fisker)
+
+<!-- prettier-ignore -->
+```jsx
+... | diff --git a/tests/jsx/comments/__snapshots__/jsfmt.spec.js.snap b/tests/jsx/comments/__snapshots__/jsfmt.spec.js.snap
index a67f885374e6..cd3f81c5dd7c 100644
--- a/tests/jsx/comments/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/jsx/comments/__snapshots__/jsfmt.spec.js.snap
@@ -27,6 +27,134 @@ const render = (items) =>... | Output of comment before slash in JSX end tag fails to parse
**Prettier 2.0.4**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEAeAhgPlQehwHShy0JABoQIAHGAS2gGdlR0AnViAdwAU2EmU6ADad0ATyYUARq3RgA1nBgBlKnNpQA5shisArnAoALGAFshAdSO14DNWDjL+N2gDcbY5OAaSQGhnCsMNyymqboyABmwgEUAFYMAB4AQrIKSsropnAAMhpwUTGGIA... | Also happens for `/**/` comment.
**Prettier 2.0.4**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEAeAhgPlQegFR44A6UOWJIANCBAA4wCW0AzsqOgE4cQDuACpwSsU6ADY90AT1bUARh3RgA1nBgBlWooZQA5shgcArnGoALGAFtRAdVMN4zTWDhqh9hgDd7k5OGYyQbWY4Dhg+BR0LdGQAMzFg6gArZgAPACEFZVU1dAs4ABltOFj4kxBklLVtHVE4AEVDCHgS0QSQ... | 2020-11-18 10:00:19+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/jsx/comments/jsfmt.spec.js->in-end-tag.js - {"jsxBracketSameLine":true} [typescript] format', '/testbed/tests/jsx/comments/jsfmt.spec.js->in-tags.js - {"jsxBracketSameLine":true} [babel-ts] format', '/testbed/tests/jsx/comments/jsfmt.spec.js->in-tags.js - {"jsxBracketSameLine":true} format', '/testbed/... | ['/testbed/tests/jsx/comments/jsfmt.spec.js->in-end-tag.js - {"jsxBracketSameLine":true} format'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/jsx/comments/in-end-tag.js tests/jsx/comments/__snapshots__/jsfmt.spec.js.snap tests/jsx/comments/jsfmt.spec.js --json | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/language-js/print/jsx.js->program->function_declaration:printJsxClosingElement"] |
prettier/prettier | 9,703 | prettier__prettier-9703 | ['9702'] | 85e5cfaf2fcd6477fcee77e5290d3f8fb2f91ac0 | diff --git a/src/document/doc-printer.js b/src/document/doc-printer.js
index 1886571aa30e..541063c4927f 100644
--- a/src/document/doc-printer.js
+++ b/src/document/doc-printer.js
@@ -526,6 +526,13 @@ function printDocToString(doc, options) {
default:
}
}
+
+ // Flush remaining line-suffix conten... | diff --git a/tests_integration/__tests__/plugin-flush-line-suffix.js b/tests_integration/__tests__/plugin-flush-line-suffix.js
new file mode 100644
index 000000000000..e60ab5adb25c
--- /dev/null
+++ b/tests_integration/__tests__/plugin-flush-line-suffix.js
@@ -0,0 +1,14 @@
+"use strict";
+
+const runPrettier = require(... | Plugin cannot print trailing comments without newline at end of file
<!--
BEFORE SUBMITTING AN ISSUE:
1. Search for your issue on GitHub: https://github.com/prettier/prettier/issues
A large number of opened issues are duplicates of existing issues.
If someone has already opened an issue for what you ar... | You can try adding the [`lineSuffixBoundary`](https://github.com/prettier/prettier/blob/master/commands.md#linesuffixboundary) command to the end of your doc.
Hey @thorn0 thanks for chiming in, it is actually one of the things I tried, but as you can see [here](https://github.com/prettier/prettier/blob/31e7c1d04e00a5b1... | 2020-11-17 21:37:40+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests_integration/__tests__/plugin-flush-line-suffix.js->flush all line-suffix content (write)', '/testbed/tests_integration/__tests__/plugin-flush-line-suffix.js->flush all line-suffix content (status)', '/testbed/tests_integration/__tests__/plugin-flush-line-suffix.js->flush all line-suffix content (stderr... | ['/testbed/tests_integration/__tests__/plugin-flush-line-suffix.js->flush all line-suffix content (stdout)'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests_integration/plugins/flushLineSuffix/file.foo tests_integration/plugins/flushLineSuffix/plugin.js tests_integration/__tests__/plugin-flush-line-suffix.js --json | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/document/doc-printer.js->program->function_declaration:printDocToString"] |
prettier/prettier | 9,665 | prettier__prettier-9665 | ['9582'] | 85e5cfaf2fcd6477fcee77e5290d3f8fb2f91ac0 | diff --git a/changelog_unreleased/yaml/pr-9665.md b/changelog_unreleased/yaml/pr-9665.md
new file mode 100644
index 000000000000..5e99902031ee
--- /dev/null
+++ b/changelog_unreleased/yaml/pr-9665.md
@@ -0,0 +1,46 @@
+#### Apply `trailingComma` option (#9665 by @fisker)
+
+When `--trailing-comma=none`, should not add t... | diff --git a/tests/yaml/flow-mapping/trailing-comma/__snapshots__/jsfmt.spec.js.snap b/tests/yaml/flow-mapping/trailing-comma/__snapshots__/jsfmt.spec.js.snap
new file mode 100644
index 000000000000..2a5515d0428b
--- /dev/null
+++ b/tests/yaml/flow-mapping/trailing-comma/__snapshots__/jsfmt.spec.js.snap
@@ -0,0 +1,184 ... | Trailing-comma config ignored in YAML
**Prettier 2.1.2**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEAzAhgSwDaagcyQAIAdKIo4MiikkCAIwCs4wYBaAEwjgGd2oEDqkwcA7qIAWedgAcATnnGZOMSXWJ122nXQA01GnQAqAUQDKxjaXAQAtnfREAkuaLpOnOJyKS48uDpDAF8yMjgAD1lWeE4kQypyI3pmGPYRGH4JNRkFJXYJVXVkG31DWhAzS2s6SAcnADkAeWNf... | null | 2020-11-14 04:17:50+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/yaml/flow-sequence/trailing-comma/jsfmt.spec.js->flow-sequence.yml - {"trailingComma":"es5"} format', '/testbed/tests/yaml/json/trailing-comma/jsfmt.spec.js->json.yml - {"trailingComma":"es5"} format', '/testbed/tests/yaml/flow-mapping/trailing-comma/jsfmt.spec.js->flow-mapping.yml - {"trailingComma":"... | ['/testbed/tests/yaml/flow-sequence/trailing-comma/jsfmt.spec.js->flow-sequence.yml - {"trailingComma":"none"} format', '/testbed/tests/yaml/flow-mapping/trailing-comma/jsfmt.spec.js->flow-mapping.yml - {"trailingComma":"none"} format', '/testbed/tests/yaml/json/trailing-comma/jsfmt.spec.js->json.yml - {"trailingComma"... | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/yaml/flow-sequence/trailing-comma/flow-sequence.yml tests/yaml/json/trailing-comma/json.yml tests/yaml/flow-sequence/trailing-comma/jsfmt.spec.js tests/yaml/json/trailing-comma/jsfmt.spec.js tests/yaml/flow-mapping/tra... | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/language-yaml/printer-yaml.js->program->function_declaration:_print"] |
prettier/prettier | 9,654 | prettier__prettier-9654 | ['9649'] | 9b206b56056406f7d7281826c7ac67ac18e763f3 | diff --git a/changelog_unreleased/markdown/pr-9654.md b/changelog_unreleased/markdown/pr-9654.md
new file mode 100644
index 000000000000..5028ba8b99fb
--- /dev/null
+++ b/changelog_unreleased/markdown/pr-9654.md
@@ -0,0 +1,29 @@
+#### Fix extra empty line added after empty table (#9654 by @fisker)
+
+<!-- prettier-igno... | diff --git a/tests/markdown/table/empty-table/__snapshots__/jsfmt.spec.js.snap b/tests/markdown/table/empty-table/__snapshots__/jsfmt.spec.js.snap
new file mode 100644
index 000000000000..747deca3fd2a
--- /dev/null
+++ b/tests/markdown/table/empty-table/__snapshots__/jsfmt.spec.js.snap
@@ -0,0 +1,140 @@
+// Jest Snapsh... | Extra empty line added after tables without data rows
<!--
BEFORE SUBMITTING AN ISSUE:
1. Search for your issue on GitHub: https://github.com/prettier/prettier/issues
A large number of opened issues are duplicates of existing issues.
If someone has already opened an issue for what you are experiencing,... | null | 2020-11-13 04:33:23+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| [] | ['/testbed/tests/markdown/table/empty-table/jsfmt.spec.js->empty-table.md - {"proseWrap":"never"} format', '/testbed/tests/markdown/table/empty-table/jsfmt.spec.js->empty-table.md - {"proseWrap":"always"} format', '/testbed/tests/markdown/table/empty-table/jsfmt.spec.js->empty-table.md format', '/testbed/tests/markdown... | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/markdown/table/empty-table/__snapshots__/jsfmt.spec.js.snap tests/markdown/table/empty-table/empty-table.md tests/markdown/table/empty-table/jsfmt.spec.js --json | Bug Fix | false | true | false | false | 2 | 0 | 2 | false | false | ["src/language-markdown/printer-markdown.js->program->function_declaration:printTable", "src/language-markdown/printer-markdown.js->program->function_declaration:printTable->function_declaration:printTableContents"] |
prettier/prettier | 9,563 | prettier__prettier-9563 | ['9062'] | bbd1f5d1d568db72e4d2e74b377fa894d29dd210 | diff --git a/changelog_unreleased/flow/pr-9563.md b/changelog_unreleased/flow/pr-9563.md
new file mode 100644
index 000000000000..8260bb391b9f
--- /dev/null
+++ b/changelog_unreleased/flow/pr-9563.md
@@ -0,0 +1,22 @@
+#### Improve comment types detection (#9563 by @fisker)
+
+<!-- prettier-ignore -->
+```jsx
+// Input
... | diff --git a/tests/flow/comments/__snapshots__/jsfmt.spec.js.snap b/tests/flow/comments/__snapshots__/jsfmt.spec.js.snap
index c1523e352541..77210f6a8be9 100644
--- a/tests/flow/comments/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/flow/comments/__snapshots__/jsfmt.spec.js.snap
@@ -293,6 +293,25 @@ const x = (input /*:... | Mixing Flow comment will cause generic syntax to be wrapped with Flow comment
**Prettier 2.1.0**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEBLAtgBwgJxgAhgE9M59h8B5KOAFRLIF98AzHCdfAcgDoB6aHABiqADZweAKwDOXADpQ+AKiRIFGbHkINy+ABJxRoiPVL5mbDt34QYACzg4R4qbIVK+ChcTMAFdpimcNL4ALzkAD4K+Pi0wTAAwhzYNLBI+... | /cc @prettier/core regression
I'll work on this
Note: with `--parser=flow`
**Prettier 2.1.1**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEBLAtgBwgJxgAhgE9M59h8B5KOAFRLIF98AzHCdfAcgDoB6aHABiqADZweAKwDOXADpQ+AKiRIFGbHkINy+ABJxRoiPVL5mbDt34QYACzg4R4qbIVK+ChcTMAFdpimcNL4ALzkAD4K+Pi0wTAAwhzYNLBI+AB... | 2020-11-02 01:54:46+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| [] | ['/testbed/tests/flow/comments/babel-only/jsfmt.spec.js->type_annotations-3.js format'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/flow/comments/__snapshots__/jsfmt.spec.js.snap tests/flow/comments/type_annotations-2.js tests/flow/comments/babel-only/type_annotations-3.js tests/flow/comments/babel-only/jsfmt.spec.js tests/flow/comments/babel-only/... | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/language-js/printer-estree.js->program->function_declaration:printPathNoParens"] |
prettier/prettier | 9,551 | prettier__prettier-9551 | ['9550'] | 9e9cc85072218048c823c9ab5d93d1eef822dfed | diff --git a/changelog_unreleased/typescript/pr-9551.md b/changelog_unreleased/typescript/pr-9551.md
new file mode 100644
index 000000000000..77ffc2676f6f
--- /dev/null
+++ b/changelog_unreleased/typescript/pr-9551.md
@@ -0,0 +1,22 @@
+#### Fix `prettier-ignore`d mapped types (#9551 by @fisker)
+
+<!-- prettier-ignore ... | diff --git a/tests/typescript/prettier-ignore/__snapshots__/jsfmt.spec.js.snap b/tests/typescript/prettier-ignore/__snapshots__/jsfmt.spec.js.snap
new file mode 100644
index 000000000000..60bdf3b3f3d5
--- /dev/null
+++ b/tests/typescript/prettier-ignore/__snapshots__/jsfmt.spec.js.snap
@@ -0,0 +1,140 @@
+// Jest Snapsh... | prettier-ignore breaks mapped types
**Prettier 2.1.2**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEMCeAHOACAhgXm2AB0ptzsB6S7DAJzhhgEs46BaZgcyggdIrYA2gEFszMgCEAukmwBhcgB9yAEQHYAviAA0ICBhbQAzslC46dCAHcAChYSmUuADbXcaU3oBGdXGABrRgBlDH8JLmQYOgBXOD04AFtvOAATVLSAGVwoLhjcLjgAMT5E3CYI5BBcGJgIXRAACxhElwB... | null | 2020-10-31 15:33:57+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/typescript/prettier-ignore/jsfmt.spec.js->mapped-types.ts [babel-ts] format'] | ['/testbed/tests/typescript/prettier-ignore/jsfmt.spec.js->mapped-types.ts format'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests_config/run_spec.js tests/typescript/prettier-ignore/mapped-types.ts tests/typescript/prettier-ignore/jsfmt.spec.js tests/typescript/prettier-ignore/__snapshots__/jsfmt.spec.js.snap --json | Bug Fix | false | true | false | false | 3 | 0 | 3 | false | false | ["src/language-js/comments.js->program->function_declaration:handleRemainingComment", "src/language-js/comments.js->program->function_declaration:handleIgnoreComments", "src/language-js/comments.js->program->function_declaration:handleOwnLineComment"] |
prettier/prettier | 9,521 | prettier__prettier-9521 | ['9501'] | 95bf0ab7d3d9801539dda770bb6e523510aa6bb7 | diff --git a/changelog_unreleased/typescript/pr-9521.md b/changelog_unreleased/typescript/pr-9521.md
new file mode 100644
index 000000000000..48ff062d2ddb
--- /dev/null
+++ b/changelog_unreleased/typescript/pr-9521.md
@@ -0,0 +1,25 @@
+#### Fix inconsistent type format between `typescript` and `flow` (#9521 by @fisker)... | diff --git a/tests/typescript/comments/__snapshots__/jsfmt.spec.js.snap b/tests/typescript/comments/__snapshots__/jsfmt.spec.js.snap
index f0088c2dbb28..b20ab8598bb3 100644
--- a/tests/typescript/comments/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/typescript/comments/__snapshots__/jsfmt.spec.js.snap
@@ -702,9 +702,7 ... | Generic is formatted differently between babel and typescript
**Prettier 2.1.2**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuc0DOMAEUCGBbOJTAZQgIHEE4AnASzAB4AdKTTABXoGsGBhaAGa0A5gBpMTEAHkAcgFEA+gBlZ5BewBKU9pMwAfCSACCMqQBUAEnI3LV6rTpAA+Fk8wBebAFcANj4DcLCCiIBAADjC06MigONTUEADu7HEIaMggOD6JOACe6SEAR... | null | 2020-10-28 08:23:31+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/typescript/typeparams/consistent/jsfmt.spec.js->issue-9501.ts [babel-ts] format', '/testbed/tests/typescript/typeparams/consistent/jsfmt.spec.js->simple-types.ts [babel-ts] format'] | ['/testbed/tests/typescript/typeparams/consistent/jsfmt.spec.js->simple-types.ts format', '/testbed/tests/typescript/typeparams/consistent/jsfmt.spec.js->issue-9501.ts [babel-flow] format', '/testbed/tests/typescript/typeparams/consistent/jsfmt.spec.js->simple-types.ts [flow] format', '/testbed/tests/typescript/typepar... | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/typescript/generic/__snapshots__/jsfmt.spec.js.snap tests/typescript/typeparams/consistent/simple-types.ts tests/typescript/comments/__snapshots__/jsfmt.spec.js.snap tests/typescript/template-literals/__snapshots__/jsf... | Bug Fix | false | true | false | false | 6 | 0 | 6 | false | false | ["src/language-js/printer-estree.js->program->function_declaration:printPathNoParens", "src/language-js/utils.js->program->function_declaration:isSimpleFlowType", "src/language-js/printer-estree.js->program->function_declaration:shouldHugType", "src/language-js/printer-estree.js->program->function_declaration:printFunc... |
prettier/prettier | 9,484 | prettier__prettier-9484 | ['9483'] | d9f5630ff59a3a7b05958ad3f7f7a45625440166 | diff --git a/changelog_unreleased/typescript/pr-9484.md b/changelog_unreleased/typescript/pr-9484.md
new file mode 100644
index 000000000000..1c468a631bcc
--- /dev/null
+++ b/changelog_unreleased/typescript/pr-9484.md
@@ -0,0 +1,13 @@
+#### Add parens to object value that it's an assignment (#9484 by @fisker)
+
+<!-- p... | diff --git a/tests/js/objects/assignment-expression/__snapshots__/jsfmt.spec.js.snap b/tests/js/objects/assignment-expression/__snapshots__/jsfmt.spec.js.snap
new file mode 100644
index 000000000000..8bd9f1527c0e
--- /dev/null
+++ b/tests/js/objects/assignment-expression/__snapshots__/jsfmt.spec.js.snap
@@ -0,0 +1,45 @... | Inconsistent output of `return assign` between `babel` and `ts`
<!--
BEFORE SUBMITTING AN ISSUE:
1. Search for your issue on GitHub: https://github.com/prettier/prettier/issues
A large number of opened issues are duplicates of existing issues.
If someone has already opened an issue for what you are exp... | null | 2020-10-23 08:11:19+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/js/objects/assignment-expression/jsfmt.spec.js->object-value.js [babel-ts] format', '/testbed/tests/js/objects/assignment-expression/jsfmt.spec.js->object-property.js format', '/testbed/tests/js/objects/assignment-expression/jsfmt.spec.js->object-property.js [flow] format', '/testbed/tests/js/objects/a... | ['/testbed/tests/js/objects/assignment-expression/jsfmt.spec.js->object-value.js [typescript] format', '/testbed/tests/js/objects/assignment-expression/jsfmt.spec.js->object-value.js [espree] format', '/testbed/tests/js/objects/assignment-expression/jsfmt.spec.js->object-value.js [flow] format'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/js/objects/assignment-expression/object-property.js tests/js/objects/assignment-expression/__snapshots__/jsfmt.spec.js.snap tests/js/objects/assignment-expression/object-value.js tests/js/objects/assignment-expression/... | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/language-js/needs-parens.js->program->function_declaration:needsParens"] |
prettier/prettier | 9,431 | prettier__prettier-9431 | ['9429'] | 64992221fc296b4ee11caf74a9b4edc4f8ab1aa3 | diff --git a/changelog_unreleased/javascript/pr-9431.md b/changelog_unreleased/javascript/pr-9431.md
new file mode 100644
index 000000000000..b3233bf01c14
--- /dev/null
+++ b/changelog_unreleased/javascript/pr-9431.md
@@ -0,0 +1,21 @@
+#### Keep html and markdown invalid template literals as it is (#9431 by @fisker)
+
... | diff --git a/tests/js/multiparser-invalid/__snapshots__/jsfmt.spec.js.snap b/tests/js/multiparser-invalid/__snapshots__/jsfmt.spec.js.snap
new file mode 100644
index 000000000000..437f6e376bc1
--- /dev/null
+++ b/tests/js/multiparser-invalid/__snapshots__/jsfmt.spec.js.snap
@@ -0,0 +1,75 @@
+// Jest Snapshot v1, https:... | Invalid strings in "html" different from other tags
**Prettier 2.1.2**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEAzCEAGAdbBXYABwCc4YYBLOYgX1wIAYGA2AVhswG5soALGALYAbHPiKlyVWvWBM2HblADmxAIaFeARxEySZStTpi57LjwGriAawAmEAO5RRBPZMMyTCngHpvAAjAAZ0DncX0pI0YWU0UedCxdCQNaABJgeJoSD2iaN2IzPkEdMVdkmjSMrOM... | `markdown` is a little different too, it didn't use `TemplateElement.cooked` | 2020-10-16 10:34:29+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/js/multiparser-invalid/jsfmt.spec.js->text.js [flow] expect SyntaxError', '/testbed/tests/js/multiparser-invalid/jsfmt.spec.js->text.js [typescript] expect SyntaxError', '/testbed/tests/js/multiparser-invalid/jsfmt.spec.js->text.js [babel-ts] format', '/testbed/tests/js/multiparser-invalid/jsfmt.spec.j... | ['/testbed/tests/js/multiparser-invalid/jsfmt.spec.js->text.js format'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/js/multiparser-invalid/__snapshots__/jsfmt.spec.js.snap tests/js/multiparser-invalid/jsfmt.spec.js tests/js/multiparser-invalid/text.js --json | Bug Fix | false | true | false | false | 2 | 0 | 2 | false | false | ["src/language-js/embed.js->program->function_declaration:embed", "src/language-js/embed.js->program->function_declaration:hasInvalidCookedValue"] |
prettier/prettier | 9,371 | prettier__prettier-9371 | ['9364'] | 633f084a7618ff8ef369de7532b576ac4769a5e0 | diff --git a/changelog_unreleased/api/pr-9371.md b/changelog_unreleased/api/pr-9371.md
new file mode 100644
index 000000000000..22af5459ed4a
--- /dev/null
+++ b/changelog_unreleased/api/pr-9371.md
@@ -0,0 +1,19 @@
+#### Stop inferring the parser to be `json` for `.jsonl` files (#9371 by @fisker)
+
+<!-- prettier-ignore... | diff --git a/tests_integration/__tests__/__snapshots__/infer-parser.js.snap b/tests_integration/__tests__/__snapshots__/infer-parser.js.snap
index 10220ca0a86c..52b58ad432b1 100644
--- a/tests_integration/__tests__/__snapshots__/infer-parser.js.snap
+++ b/tests_integration/__tests__/__snapshots__/infer-parser.js.snap
@... | JSON Lines files cause parse error
**Environments:**
- Prettier Version: 2.1.2
- Running Prettier via: CLI
- Runtime: Installed via Homebrew, uses NodeJS 14.13.1
- Operating System: macOS 10.15.7
**Steps to reproduce:**
Run the following in an empty directory:
```bash
echo "Lorem ipsum" >good.txt
echo ... | We need exclude `.jsonl` from https://github.com/prettier/prettier/blob/53008ffefb5f2d8a3de286cc123bca3ad6d6c57f/src/language-js/index.js#L55-L60 | 2020-10-12 01:57:02+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests_integration/__tests__/infer-parser.js->stdin no path and no parser --list-different logs error but exits with 0 (stdout)', '/testbed/tests_integration/__tests__/infer-parser.js->stdin no path and no parser --check logs error but exits with 0 (stdout)', '/testbed/tests_integration/__tests__/infer-parser... | ['/testbed/tests_integration/__tests__/infer-parser.js->Known/Unknown (stderr)', '/testbed/tests_integration/__tests__/infer-parser.js->Known/Unknown (status)'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests_integration/__tests__/__snapshots__/support-info.js.snap tests_integration/__tests__/infer-parser.js tests_integration/cli/infer-parser/known-unknown/unknown.jsonl tests_integration/cli/infer-parser/known-unknown/known... | Bug Fix | true | false | false | false | 0 | 0 | 0 | false | false | [] |
prettier/prettier | 9,267 | prettier__prettier-9267 | ['9260'] | 5f9063c43e57ca0af314a5c40a302181e5df6695 | diff --git a/changelog_unreleased/mdx/pr-9267.md b/changelog_unreleased/mdx/pr-9267.md
new file mode 100644
index 000000000000..4997d105f3c4
--- /dev/null
+++ b/changelog_unreleased/mdx/pr-9267.md
@@ -0,0 +1,35 @@
+#### Fix JSX format (#9267 by @fisker)
+
+<!-- prettier-ignore -->
+```markdown
+<!-- Input -->
+# title
... | diff --git a/tests/mdx/embedded-language-formatting/__snapshots__/jsfmt.spec.js.snap b/tests/mdx/embedded-language-formatting/__snapshots__/jsfmt.spec.js.snap
new file mode 100644
index 000000000000..28d11e582abc
--- /dev/null
+++ b/tests/mdx/embedded-language-formatting/__snapshots__/jsfmt.spec.js.snap
@@ -0,0 +1,30 @... | Formatting `mdx`, from v2.0.0 to v2.1.2 now a new line is introduced
After upgrading Prettier from some version higher than 2.0.0, I see now that the formatting for a particular code has changed in `mdx` files
This code
```
# title
<Parenthesis>
CR: Carriage Return, \r
LF: Line Feed, \n
</Parenthesis>... | ~Maybe introduced by https://github.com/prettier/prettier/pull/9143~ No, #9143 changes yaml..
Introduced by #8825 | 2020-09-25 01:45:59+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| [] | ['/testbed/tests/mdx/embedded-language-formatting/jsfmt.spec.js->issue-9260.mdx - {"embeddedLanguageFormatting":"off"} format'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/mdx/embedded-language-formatting/__snapshots__/jsfmt.spec.js.snap tests/mdx/embedded-language-formatting/jsfmt.spec.js tests/misc/embedded_language_formatting/mdx/__snapshots__/jsfmt.spec.js.snap tests/mdx/embedded-lan... | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/language-markdown/printer-markdown.js->program->function_declaration:genericPrint"] |
prettier/prettier | 9,051 | prettier__prettier-9051 | ['9050'] | 073dfd9fa2c1bb8f93d1e6d2e9b8a30a3d4799c2 | diff --git a/changelog_unreleased/TEMPLATE.md b/changelog_unreleased/TEMPLATE.md
index a7ebe3c0aaa9..268377304b92 100644
--- a/changelog_unreleased/TEMPLATE.md
+++ b/changelog_unreleased/TEMPLATE.md
@@ -24,7 +24,7 @@
#### Title ([#XXXX](https://github.com/prettier/prettier/pull/XXXX) by [@user](https://github.com/us... | diff --git a/tests/html/multiparser-css/__snapshots__/jsfmt.spec.js.snap b/tests/html/multiparser/css/__snapshots__/jsfmt.spec.js.snap
similarity index 100%
rename from tests/html/multiparser-css/__snapshots__/jsfmt.spec.js.snap
rename to tests/html/multiparser/css/__snapshots__/jsfmt.spec.js.snap
diff --git a/tests/ht... | Prettier 2.1.0 and Sass rules with single mixin inclusion
Having just upgraded from prettier 2.0.5 to 2.1.0.
I have a `.vue` Single File Components with SASS style where I apply a mixin to a selector
For example, something like:
```
// Works with Prettier 2.0.5
<style lang="sass">
.hero
@include background-... | It's a bug. Prettier should keep `style` blocks with unsupported `lang` as is.
I'll work on this | 2020-08-25 10:10:06+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/html/multiparser/ts/jsfmt.spec.js->html-with-ts-script.html format', '/testbed/tests/html/multiparser/js/jsfmt.spec.js->script-tag-escaping.html format', '/testbed/tests/html/multiparser/js/jsfmt.spec.js->html-with-js-script.html format', '/testbed/tests/vue/multiparser/unknown/jsfmt.spec.js->unknown.v... | ['/testbed/tests/vue/multiparser/unknown/jsfmt.spec.js->unknown.vue format', '/testbed/tests/vue/multiparser/unknown/jsfmt.spec.js->unknown.vue - {"vueIndentScriptAndStyle":true} format', '/testbed/tests/html/multiparser/unknown/jsfmt.spec.js->unknown-lang.html format'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/html/multiparser/css/jsfmt.spec.js tests/html/multiparser/markdown/html-with-markdown-script.html tests/html/multiparser/css/html-with-css-style.html tests/vue/multiparser/unknown/jsfmt.spec.js tests/html/multiparser/t... | Bug Fix | false | true | false | false | 2 | 0 | 2 | false | false | ["src/language-html/utils.js->program->function_declaration:inferStyleParser", "src/language-html/utils.js->program->function_declaration:inferScriptParser"] |
prettier/prettier | 8,829 | prettier__prettier-8829 | ['8136'] | b8a3f84c1964a26f6039d31cc5823e86e08dbe37 | diff --git a/.pre-commit-hooks.yaml b/.pre-commit-hooks.yaml
index 83519e34a39b..ac74494a227e 100644
--- a/.pre-commit-hooks.yaml
+++ b/.pre-commit-hooks.yaml
@@ -1,16 +1,4 @@
- id: prettier
name: prettier
- entry: prettier --write --list-different
+ entry: prettier --write --list-different --ignore-unknown
la... | diff --git a/tests_integration/__tests__/__snapshots__/early-exit.js.snap b/tests_integration/__tests__/__snapshots__/early-exit.js.snap
index 5472deb7a0e8..39e1ddf60c97 100644
--- a/tests_integration/__tests__/__snapshots__/early-exit.js.snap
+++ b/tests_integration/__tests__/__snapshots__/early-exit.js.snap
@@ -151,6... | Implement a new `--ignore-unknown` argument for CLI
Idea - do not throw an error on unknown extensions (when we don’t know which parser should be used)
Why? For tools like `lint-staged`.
Main idea:
```js
{
"*.*": "prettier --write --ignore-unknown"
}
```
This will avoid listing extensions.
We alr... | As mentioned in #8454, another use case where this can be very useful:
```bash
onchange . -- prettier --write --ignore-unknown '{{changed}}'
``` | 2020-07-24 09:47:24+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests_integration/__tests__/ignore-unknown.js->ignore-unknown alias (stdout)', '/testbed/tests_integration/__tests__/ignore-unknown.js->ignore-unknown check (status)', '/testbed/tests_integration/__tests__/ignore-unknown.js->ignore-unknown dir (write)', '/testbed/tests_integration/__tests__/ignore-unknown.js... | ['/testbed/tests_integration/__tests__/ignore-unknown.js->ignore-unknown pattern (stderr)', '/testbed/tests_integration/__tests__/ignore-unknown.js->ignore-unknown dir (stderr)', '/testbed/tests_integration/__tests__/ignore-unknown.js->ignore-unknown check (stderr)', '/testbed/tests_integration/__tests__/ignore-unknown... | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests_integration/__tests__/__snapshots__/help-options.js.snap tests_integration/cli/ignore-unknown/ignored.js tests_integration/cli/ignore-unknown/.prettierrc tests_integration/__tests__/__snapshots__/early-exit.js.snap tes... | Feature | false | true | false | false | 1 | 0 | 1 | true | false | ["src/cli/util.js->program->function_declaration:handleError"] |
prettier/prettier | 8,825 | prettier__prettier-8825 | ['8819'] | ed9d399a47a350cb80abb96558c8eaa7264050fa | diff --git a/changelog_unreleased/javascript/pr-7875.md b/changelog_unreleased/api/pr-7875.md
similarity index 89%
rename from changelog_unreleased/javascript/pr-7875.md
rename to changelog_unreleased/api/pr-7875.md
index a81510f05ccf..ff45f937aa17 100644
--- a/changelog_unreleased/javascript/pr-7875.md
+++ b/changelog... | diff --git a/tests/misc/embedded_language_formatting/mdx/__snapshots__/jsfmt.spec.js.snap b/tests/misc/embedded_language_formatting/mdx/__snapshots__/jsfmt.spec.js.snap
new file mode 100644
index 000000000000..baa62371949e
--- /dev/null
+++ b/tests/misc/embedded_language_formatting/mdx/__snapshots__/jsfmt.spec.js.snap
... | Unstable mdx format with `--embedded-language-formatting=off`
**Prettier pr-8811**
[Playground link](https://deploy-preview-8811--prettier.netlify.app/playground/#N4Igxg9gdgLgprEAuEBLAtgBwgJxgAmAEMBffcgMxwnXIHIAPATwC86BuAHSm4Fp-u3OA2x58kKAGcCRfAF58ARnYgANCAiYYqaJOSgiOagHcACoYR6URADbGiTPeoBGOImADWcGAGVM71CgAc2QYHABXOHU... | null | 2020-07-24 03:03:36+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| [] | ['/testbed/tests/misc/embedded_language_formatting/mdx/jsfmt.spec.js->import-export.mdx - {"embeddedLanguageFormatting":"off"} format', '/testbed/tests/misc/embedded_language_formatting/mdx/jsfmt.spec.js->jsx.mdx - {"embeddedLanguageFormatting":"off"} format'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/misc/embedded_language_formatting/mdx/import-export.mdx tests/misc/embedded_language_formatting/mdx/__snapshots__/jsfmt.spec.js.snap tests/misc/embedded_language_formatting/mdx/jsfmt.spec.js tests/misc/embedded_languag... | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/language-markdown/printer-markdown.js->program->function_declaration:genericPrint"] |
prettier/prettier | 8,777 | prettier__prettier-8777 | ['8773'] | d07267184278fcc3fa0fb57628653f9b6daed607 | diff --git a/src/main/ast-to-doc.js b/src/main/ast-to-doc.js
index 7d861c258595..ebf9471d5cd8 100644
--- a/src/main/ast-to-doc.js
+++ b/src/main/ast-to-doc.js
@@ -89,6 +89,26 @@ function printAstToDoc(ast, options, alignmentSize = 0) {
return doc;
}
+function printPrettierIgnoredNode(node, options) {
+ const {
+... | diff --git a/tests/markdown/broken-plugins/__snapshots__/jsfmt.spec.js.snap b/tests/markdown/broken-plugins/__snapshots__/jsfmt.spec.js.snap
new file mode 100644
index 000000000000..c571208bc17f
--- /dev/null
+++ b/tests/markdown/broken-plugins/__snapshots__/jsfmt.spec.js.snap
@@ -0,0 +1,19 @@
+// Jest Snapshot v1, htt... | Prettier doesn't throw an error for not printed comments with `prettier-ignore` comment
If input includes `prettier-ignore` comment, Prettier doesn't throw an error for not printed comments. I'm not sure it depends on languages.
(The below example code uses #7126 bug.)
**Prettier 2.0.5**
[Playground link](https://... | This is expected. `prettier-ignore` leads to outputting a portion of the input file instead of printing AST nodes, so the comments in the AST remain marked as not printed.
I thought this is not expected because `prettier-ignore` comment affects to other than its target node. At least I think users will be confused.
I m... | 2020-07-17 02:41:33+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/misc/errors/broken-plugin/jsfmt.spec.js->snippet: #0 error test'] | ['/testbed/tests/vue/broken-plugins/jsfmt.spec.js->missing-comments.vue format', '/testbed/tests/markdown/broken-plugins/jsfmt.spec.js->missing-comments.md format'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/misc/errors/typescript/__snapshots__/jsfmt.spec.js.snap tests/vue/broken-plugins/__snapshots__/jsfmt.spec.js.snap tests_config/prettier-plugins/prettier-plugin-missing-comments/index.js tests/misc/errors/broken-plugin/... | Bug Fix | false | true | false | false | 7 | 0 | 7 | false | false | ["src/main/multiparser.js->program->function_declaration:textToDoc", "src/main/comments.js->program->function_declaration:ensureAllCommentsPrinted", "src/main/ast-to-doc.js->program->function_declaration:printPrettierIgnoredNode", "src/main/core.js->program->function_declaration:attachComments", "src/main/core.js->prog... |
prettier/prettier | 8,707 | prettier__prettier-8707 | ['8704'] | 1d6d60ee375a78744df91d323642c5146f4fcefa | diff --git a/src/language-css/printer-postcss.js b/src/language-css/printer-postcss.js
index 708b75c2bdcf..a594da50eadd 100644
--- a/src/language-css/printer-postcss.js
+++ b/src/language-css/printer-postcss.js
@@ -20,6 +20,7 @@ const {
indent,
dedent,
ifBreak,
+ breakParent,
},
utils: { removeL... | diff --git a/tests/less/function-selector/__snapshots__/jsfmt.spec.js.snap b/tests/less/function-selector/__snapshots__/jsfmt.spec.js.snap
new file mode 100644
index 000000000000..d3d590221b64
--- /dev/null
+++ b/tests/less/function-selector/__snapshots__/jsfmt.spec.js.snap
@@ -0,0 +1,26 @@
+// Jest Snapshot v1, https:... | Less: Incorrect formatting of inline comment inside `selector()`
**Prettier pr-8545**
[Playground link](https://deploy-preview-8545--prettier.netlify.app/playground/#N4Igxg9gdgLgprEAuEABAzgVwA7YgJxnQAJ04AbOMGAgCgB0pjikAzCMTdAWgDcBLdPwBGlYgHpxxAFT0QAQzmMAlMWCNGAX0YgANCAjYY-aOmSh5+fBADuABUsIzKeeRvyAnmf3D88sADWcDAAytj+-F... | I don't believe this is a bug.
In css, comments seem to not be allowed inside the selector(), see https://jsfiddle.net/5rtf16ak/12/
Less seems to also leave alone the statement when transpiling to css.
@boyenn CSS doesn't support `//` comments, but turns out Less indeed doesn't strip them inside `selector(...)` ([d... | 2020-07-03 10:04:52+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| [] | ['/testbed/tests/less/function-selector/jsfmt.spec.js->selector.less format'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/less/function-selector/selector.less tests/less/function-selector/jsfmt.spec.js tests/less/function-selector/__snapshots__/jsfmt.spec.js.snap --json | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/language-css/printer-postcss.js->program->function_declaration:genericPrint"] |
prettier/prettier | 8,675 | prettier__prettier-8675 | ['8674'] | 44dedd94b5e41ec6fb703e8e124e0aa96b6f6f56 | diff --git a/changelog_unreleased/scss/pr-8675.md b/changelog_unreleased/scss/pr-8675.md
new file mode 100644
index 000000000000..971493fa4ae6
--- /dev/null
+++ b/changelog_unreleased/scss/pr-8675.md
@@ -0,0 +1,31 @@
+#### Comments at the end of the file were lost if the final semicolon was omitted ([#8675](https://git... | diff --git a/tests/css/no-semicolon/__snapshots__/jsfmt.spec.js.snap b/tests/css/no-semicolon/__snapshots__/jsfmt.spec.js.snap
new file mode 100644
index 000000000000..66ed9d0386de
--- /dev/null
+++ b/tests/css/no-semicolon/__snapshots__/jsfmt.spec.js.snap
@@ -0,0 +1,17 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
... | SCSS: unexpected format
**Prettier 2.0.5**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEABAlgWwA4QE4wAEArngDpSGEA2AFAPT0Bm0MAzgHQDmEEX1cAIbZ0nSJnpg2bAPxNBmdNQCeAXgDy2BAGoAyoKhskAFgAMpgDRnT6GIOrowASgDcICyAjYY6aG2Sggnh4EADuAApBCP4o9qGCyv4eAEZ4gmAA1nAwutjp6FBcyDB4xHAeABYwmNQA6hW2cGx5YHC60bboAG62ysj... | Found a valid SCSS case
**Prettier 2.0.5**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEABAtgSwB6agAgDMIIAKASn2AB0D8BDK2-F-SAGwgCcl8BiQgE5BAbmb4AvrSlRaqPGHYBXACZwiJCvgD0AKjYR06BDF3aQAGhAQADjEzQAzslD0uXCAHcACm4TOUenZPegBPZysAIy56MABrOBgAZRtYvABzZBguJTgrAAsYdHYAdXzMeEdUsDgk-wrMADcK0ORwRwiQPEc4L... | 2020-06-30 11:47:45+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/less/no-semicolon/jsfmt.spec.js->url.less format', '/testbed/tests/css/no-semicolon/jsfmt.spec.js->url.css format'] | ['/testbed/tests/scss/no-semicolon/jsfmt.spec.js->include-2.scss format', '/testbed/tests/scss/no-semicolon/jsfmt.spec.js->include.scss format', '/testbed/tests/scss/no-semicolon/jsfmt.spec.js->url.scss format'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/scss/no-semicolon/include-2.scss tests/less/no-semicolon/jsfmt.spec.js tests/scss/no-semicolon/include.scss tests/css/no-semicolon/__snapshots__/jsfmt.spec.js.snap tests/css/no-semicolon/url.css tests/scss/no-semicolon... | Bug Fix | false | true | false | false | 2 | 0 | 2 | false | false | ["src/language-css/printer-postcss.js->program->function_declaration:genericPrint", "src/language-css/clean.js->program->function_declaration:clean"] |
prettier/prettier | 8,614 | prettier__prettier-8614 | ['8287'] | 361ac3bc94383e241dc3a3cd7fe5b009bfc2474f | diff --git a/changelog_unreleased/html/pr-8614.md b/changelog_unreleased/html/pr-8614.md
new file mode 100644
index 000000000000..19d77a66aee0
--- /dev/null
+++ b/changelog_unreleased/html/pr-8614.md
@@ -0,0 +1,26 @@
+#### Don't preserve line breaks around text-only content ([#8614](https://github.com/prettier/prettier... | diff --git a/tests/angular/angular/__snapshots__/jsfmt.spec.js.snap b/tests/angular/angular/__snapshots__/jsfmt.spec.js.snap
index dac2d08b4fb5..2eb34a77df39 100644
--- a/tests/angular/angular/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/angular/angular/__snapshots__/jsfmt.spec.js.snap
@@ -4791,9 +4791,7 @@ can be foun... | Inconsistent formatting on Vue double curly braces template variables
**Prettier 2.0.5**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEAeeBbADgGwIbwB8AOlAARmoAmAlgG5lj4DOzAvMSAE5xWcnkKZAOpwyeHmQDmEGlClkYEcVSqKAFjWZlmNbDjFgJa9XB6kKqAPS06Ay7cYt2nHnxD2hw9QTJbpsvJk0GTAwGRYXBBYAIxkAL7x4lBqYRFRWABMCfEW... | null | 2020-06-22 04:38:28+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| [] | ['/testbed/tests/vue/interpolation/jsfmt.spec.js->template.vue format'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/mjml/mjml/__snapshots__/jsfmt.spec.js.snap tests/angular/angular/__snapshots__/jsfmt.spec.js.snap tests/vue/interpolation/jsfmt.spec.js tests/html/whitespace/__snapshots__/jsfmt.spec.js.snap tests/vue/vue/__snapshots__... | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/language-html/utils.js->program->function_declaration:forceBreakContent"] |
prettier/prettier | 8,536 | prettier__prettier-8536 | ['2081'] | f55960af898af617ba3544ee03c5344abc77e7a0 | diff --git a/src/language-js/printer-estree.js b/src/language-js/printer-estree.js
index 68875559ab90..cf4a211c78c4 100644
--- a/src/language-js/printer-estree.js
+++ b/src/language-js/printer-estree.js
@@ -449,12 +449,17 @@ function printPathNoParens(path, options, print, args) {
return concat(parts);
- ... | diff --git a/tests/js/directives/jsfmt.spec.js b/tests/js/directives/jsfmt.spec.js
index eb85eda6bd02..f5b37cd79521 100644
--- a/tests/js/directives/jsfmt.spec.js
+++ b/tests/js/directives/jsfmt.spec.js
@@ -1,1 +1,48 @@
-run_spec(__dirname, ["babel", "flow", "typescript"]);
+const { outdent } = require("outdent");
+
+r... | Directive followed by comment has extra trailing hardline
If your file is only a directive, followed by a new line, followed by a comment, prettier ends the file with two newlines, rather than a single one. This is reproducible with only the babylon parser.
**Prettier 1.10.2**
[Playground link](https://prettier.io/... | null | 2020-06-10 01:59:20+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/js/directives/jsfmt.spec.js->snippet: #0 verify (babel-ts)', '/testbed/tests/js/directives/jsfmt.spec.js->last-line-1.js verify (flow)', '/testbed/tests/js/directives/jsfmt.spec.js->last-line-2.js verify (flow)', '/testbed/tests/js/directives/jsfmt.spec.js->last-line-2.js verify (typescript)', '/testbe... | ['/testbed/tests/js/directives/jsfmt.spec.js->snippet: #2 format', '/testbed/tests/js/directives/jsfmt.spec.js->snippet: #0 verify (typescript)', '/testbed/tests/js/directives/jsfmt.spec.js->snippet: #2 verify (flow)', '/testbed/tests/js/directives/jsfmt.spec.js->snippet: #0 verify (flow)', '/testbed/tests/js/directive... | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/js/directives/jsfmt.spec.js --json | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/language-js/printer-estree.js->program->function_declaration:printPathNoParens"] |
prettier/prettier | 8,465 | prettier__prettier-8465 | ['6298'] | 11d0f4203e1bfbe4d75aa028dbb19f9ed05a5e1d | diff --git a/changelog_unreleased/vue/pr-8023.md b/changelog_unreleased/vue/pr-8023.md
index 894a9312454f..0d3500ab5e89 100644
--- a/changelog_unreleased/vue/pr-8023.md
+++ b/changelog_unreleased/vue/pr-8023.md
@@ -1,27 +1,36 @@
-#### Support custom blocks ([#8023](https://github.com/prettier/prettier/pull/8023) by [@s... | diff --git a/tests/vue/custom_block/__snapshots__/jsfmt.spec.js.snap b/tests/vue/custom_block/__snapshots__/jsfmt.spec.js.snap
index 0c0471e930cc..80e2b4bb4d50 100644
--- a/tests/vue/custom_block/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/vue/custom_block/__snapshots__/jsfmt.spec.js.snap
@@ -128,16 +128,16 @@ query {... | Pug plugin doesn't work for the .vue files
<!--
BEFORE SUBMITTING AN ISSUE:
1. Search for your issue on GitHub: https://github.com/prettier/prettier/issues
A large number of opened issues are duplicates of existing issues.
If someone has already opened an issue for what you are experiencing,
you d... | We think that it is not a problem of my plugin since the embedded pug in markdown works well.
Looks problem what vue printer should looks in plugins and run them for content inside (if plugin exists), i think it is feature
👋, @prettier/core team! I may have found a hint for people wanting to use `@prettier/plugin-pug`... | 2020-06-01 04:47:34+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/vue/with-plugins/jsfmt.spec.js->template-lang.vue - {"embeddedLanguageFormatting":"off"} format', '/testbed/tests/vue/with-plugins/jsfmt.spec.js->inline.vue - {"embeddedLanguageFormatting":"off"} format', '/testbed/tests/vue/with-plugins/jsfmt.spec.js->script-lang.vue format', '/testbed/tests/vue/with-... | ['/testbed/tests/vue/with-plugins/jsfmt.spec.js->template-lang.vue format', '/testbed/tests/vue/with-plugins/jsfmt.spec.js->whitspace.vue format', '/testbed/tests/vue/with-plugins/jsfmt.spec.js->inline.vue format', '/testbed/tests/vue/with-plugins/jsfmt.spec.js->custom-block-lang.vue format'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/vue/with-plugins/script-lang.vue tests_config/utils/stringify-options-for-title.js tests/vue/with-plugins/style-lang.vue tests/vue/with-plugins/template-lang.vue tests_config/prettier-plugins/prettier-plugin-uppercase-... | Feature | false | true | false | false | 9 | 0 | 9 | false | false | ["src/language-html/printer-html.js->program->function_declaration:embed", "src/language-html/printer-html.js->program->function_declaration:genericPrint", "src/language-html/printer-html.js->program->function_declaration:printChildren->function_declaration:printChild", "src/language-html/utils.js->program->function_de... |
prettier/prettier | 8,461 | prettier__prettier-8461 | ['8028'] | 3fc75799ee47f51b4fb39ec2caf380490ab7b602 | diff --git a/changelog_unreleased/javascript/pr-8461.md b/changelog_unreleased/javascript/pr-8461.md
new file mode 100644
index 000000000000..0a7027de133b
--- /dev/null
+++ b/changelog_unreleased/javascript/pr-8461.md
@@ -0,0 +1,19 @@
+#### Wrap jsx element on the left of "<" with parentheses ([#8461](https://github.co... | diff --git a/tests/jsx/binary-expressions/__snapshots__/jsfmt.spec.js.snap b/tests/jsx/binary-expressions/__snapshots__/jsfmt.spec.js.snap
new file mode 100644
index 000000000000..92e4ab74e94e
--- /dev/null
+++ b/tests/jsx/binary-expressions/__snapshots__/jsfmt.spec.js.snap
@@ -0,0 +1,51 @@
+// Jest Snapshot v1, https:... | Prettier’s output of JSX edge case fails to parse
**Prettier 2.0.4**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEAKAPAEwJYDcD0AfAJQAE6pArANwgA0IEADjNtAM7KgCGATrxADuABT4JOKbgBtB3AJ6cGAI17cwAazgwAykzXYoAc2QxeAVzgMAFjAC2UgOpXs8dnrBxt4l3hdzk4OyKIAbscLwwwqqGttzIAGbSYQwAVuwAHgBCqhpa2ty2cAAyBnAJSZYgae... | null | 2020-05-31 20:06:21+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/jsx/binary-expressions/jsfmt.spec.js->relational-operators.js verify (babel-ts)', '/testbed/tests/jsx/binary-expressions/jsfmt.spec.js->relational-operators.js verify (typescript)'] | ['/testbed/tests/jsx/binary-expressions/jsfmt.spec.js->relational-operators.js format'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/jsx/binary-expressions/jsfmt.spec.js tests/jsx/binary-expressions/relational-operators.js tests/jsx/binary-expressions/__snapshots__/jsfmt.spec.js.snap --json | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/language-js/needs-parens.js->program->function_declaration:needsParens"] |
prettier/prettier | 8,410 | prettier__prettier-8410 | ['4926'] | 507c3403e34b63c0b012563b3d88295b771a3dea | diff --git a/changelog_unreleased/javascript/pr-8410.md b/changelog_unreleased/javascript/pr-8410.md
new file mode 100644
index 000000000000..0a3420bfee55
--- /dev/null
+++ b/changelog_unreleased/javascript/pr-8410.md
@@ -0,0 +1,18 @@
+#### Fix range formatting indentation ([#8410](https://github.com/prettier/prettier/... | diff --git a/tests/js/range/__snapshots__/jsfmt.spec.js.snap b/tests/js/range/__snapshots__/jsfmt.spec.js.snap
index 556eac282b19..b0de3e8963ff 100644
--- a/tests/js/range/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/js/range/__snapshots__/jsfmt.spec.js.snap
@@ -88,6 +88,156 @@ function ugly ( {a=1, b = 2 ... | Too much indentation in method body selected by range if first line is comment or incompletely selected
**Prettier 1.14.0**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAucAbAhgZ0wAgGIQQ7AA6UOFOA9AFQ04AiEcuMAFgJa4DWcAnjgC26GGDY50OAOYcAbghwBZDlA7DUAaX444AD3hQAJiqk4IAIwBWcMDAD8OGlTKUhIsQApefOPNgBKYhd... | I’m starting to wonder if we should change range formatting to format the whole file, but with two “cursors,” then replace what’s in the range with the text between the cursors.
Sounds sensible to me. In my project we just ended up running prettier on everything so that we could use whole file prettier.
This makes rang... | 2020-05-26 04:35:08+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/typescript/range/jsfmt.spec.js->issue-4926.ts verify (babel-ts)', '/testbed/tests/typescript/range/jsfmt.spec.js->issue-7148.ts verify (babel-ts)'] | ['/testbed/tests/typescript/range/jsfmt.spec.js->issue-4926.ts format', '/testbed/tests/typescript/range/jsfmt.spec.js->issue-7148.ts format'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/js/range/issue-7082.js tests/js/range/issue-4206-1.js tests/js/range/issue-3789-2.js tests/js/range/issue-4206-2.js tests/js/range/issue-4206-3.js tests/typescript/range/jsfmt.spec.js tests/js/range/issue-3789-1.js tes... | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/main/core.js->program->function_declaration:formatRange"] |
prettier/prettier | 8,390 | prettier__prettier-8390 | ['8389'] | 6d7524c76a76104a0dbfb1dd8995fef85f7159f3 | diff --git a/changelog_unreleased/api/pr-8390.md b/changelog_unreleased/api/pr-8390.md
new file mode 100644
index 000000000000..fead47a132a9
--- /dev/null
+++ b/changelog_unreleased/api/pr-8390.md
@@ -0,0 +1,16 @@
+#### Add plugins' parsers to the `parser` option ([#8390](https://github.com/prettier/prettier/pull/8390)... | diff --git a/tests_integration/__tests__/__snapshots__/plugin-options-string.js.snap b/tests_integration/__tests__/__snapshots__/plugin-options-string.js.snap
index cf0d60aa19a5..656238849fa9 100644
--- a/tests_integration/__tests__/__snapshots__/plugin-options-string.js.snap
+++ b/tests_integration/__tests__/__snapsho... | Plugins don't add choices to the `parser` option
Plugins typically add parsers to be specified via the `parser` option, however there is no way for them to have their parsers listed as valid values of this option (in `prettier.getSupportedInfo().options`), which makes it difficult for editor integrations and other code... | null | 2020-05-24 10:27:05+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests_integration/__tests__/plugin-options.js->external options from CLI should work (stderr)', '/testbed/tests_integration/__tests__/plugin-options.js->external options from CLI should work (write)', "/testbed/tests_integration/__tests__/plugin-options.js->include plugin's parsers to the values of the `pars... | ['/testbed/tests_integration/__tests__/plugin-options.js->show detailed external option with `--help foo-option` (status)', "/testbed/tests_integration/__tests__/plugin-options.js->include plugin's parsers to the values of the `parser` option` (stdout)"] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests_integration/__tests__/__snapshots__/plugin-options.js.snap tests_integration/__tests__/plugin-options.js tests_integration/__tests__/__snapshots__/plugin-options-string.js.snap --json | Feature | false | true | false | false | 2 | 0 | 2 | false | false | ["src/main/support.js->program->function_declaration:getSupportInfo", "src/main/support.js->program->function_declaration:collectParsersFromLanguages"] |
prettier/prettier | 8,381 | prettier__prettier-8381 | ['8380'] | 8718bb4be44f6fd1aed8fcf91717f38931643dd7 | diff --git a/changelog_unreleased/html/pr-8381.md b/changelog_unreleased/html/pr-8381.md
new file mode 100644
index 000000000000..edca15ddab18
--- /dev/null
+++ b/changelog_unreleased/html/pr-8381.md
@@ -0,0 +1,31 @@
+#### Support front matter with dynamic language ([#8381](https://github.com/prettier/prettier/pull/838... | diff --git a/tests/css/front-matter/__snapshots__/jsfmt.spec.js.snap b/tests/css/front-matter/__snapshots__/jsfmt.spec.js.snap
new file mode 100644
index 000000000000..2b4909fe2c93
--- /dev/null
+++ b/tests/css/front-matter/__snapshots__/jsfmt.spec.js.snap
@@ -0,0 +1,28 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
... | Initial front matter signal (---) with extra text appended breaks formatting
<!--
BEFORE SUBMITTING AN ISSUE:
1. Search for your issue on GitHub: https://github.com/prettier/prettier/issues
A large number of opened issues are duplicates of existing issues.
If someone has already opened an issue for wha... | null | 2020-05-22 04:47:37+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/css/front-matter/jsfmt.spec.js->custom-parser.css verify (less)', '/testbed/tests/css/front-matter/jsfmt.spec.js->custom-parser.css verify (scss)'] | ['/testbed/tests/css/front-matter/jsfmt.spec.js->custom-parser.css format', '/testbed/tests/html/front-matter/jsfmt.spec.js->custom-parser.html format', '/testbed/tests/markdown/front-matter/jsfmt.spec.js->custom-parser.md format'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/markdown/front-matter/custom-parser.md tests/css/front-matter/jsfmt.spec.js tests/html/front-matter/__snapshots__/jsfmt.spec.js.snap tests/html/front-matter/custom-parser.html tests/css/front-matter/custom-parser.css t... | Feature | false | true | false | false | 13 | 0 | 13 | false | false | ["src/language-html/printer-html.js->program->function_declaration:embed", "src/language-css/printer-postcss.js->program->function_declaration:printNodeSequence", "src/language-css/clean.js->program->function_declaration:clean", "src/language-html/printer-html.js->program->function_declaration:genericPrint", "src/langu... |
prettier/prettier | 8,137 | prettier__prettier-8137 | ['7103'] | f470142e169de1fd102e0309f8ee7bbf9d845f09 | diff --git a/changelog_unreleased/html/pr-8137.md b/changelog_unreleased/html/pr-8137.md
new file mode 100644
index 000000000000..d602bac34bf3
--- /dev/null
+++ b/changelog_unreleased/html/pr-8137.md
@@ -0,0 +1,20 @@
+#### Preserve non-ASCII whitespace characters in HTML ([#8137](https://github.com/prettier/prettier/pu... | diff --git a/tests/html_whitespace/__snapshots__/jsfmt.spec.js.snap b/tests/html_whitespace/__snapshots__/jsfmt.spec.js.snap
index 484650fad7f8..b32d6f7499ff 100644
--- a/tests/html_whitespace/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/html_whitespace/__snapshots__/jsfmt.spec.js.snap
@@ -222,6 +222,273 @@ printWidth:... | U+2005 etc. is (sometimes) stripped from html
**Prettier 1.19.1**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEAeADgPlQZ3QQykwA1UB6PQzAAkFACWiAJ3utwKIE1zKjysAdKBhJ0GzWtS5kBUEABoQEdDACW0HMlD5GjCAHcACtoQaU+AG4QVAE3kgARo3xgA1nBgBlAmBVQA5sgwjACucAoAFjAAtgA2AOrhKvCUYHAeJkkq5kkAnsjgOBoKvjhwjDAGTn5R+Mg... | null | 2020-04-23 11:20:47+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/html_whitespace/jsfmt.spec.js->fill.html format', '/testbed/tests/html_whitespace/jsfmt.spec.js->table.html format', '/testbed/tests/html_whitespace/jsfmt.spec.js->snippet: should be empty format', '/testbed/tests/html_whitespace/jsfmt.spec.js->inline-nodes.html format', '/testbed/tests/html_whitespace... | ['/testbed/tests/html_whitespace/jsfmt.spec.js->snippet: #19 format', '/testbed/tests/html_whitespace/jsfmt.spec.js->snippet: #25 format', '/testbed/tests/html_whitespace/jsfmt.spec.js->snippet: #27 format', '/testbed/tests/html_whitespace/jsfmt.spec.js->snippet: #22 format', '/testbed/tests/html_whitespace/jsfmt.spec.... | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/html_whitespace/__snapshots__/jsfmt.spec.js.snap tests/html_whitespace/jsfmt.spec.js --json | Bug Fix | false | true | false | false | 5 | 0 | 5 | false | false | ["src/language-html/printer-html.js->program->function_declaration:genericPrint", "src/language-html/printer-html.js->program->function_declaration:getTextValueParts", "src/language-html/preprocess.js->program->function_declaration:extractWhitespaces", "src/language-html/preprocess.js->program->function_declaration:mer... |
prettier/prettier | 8,111 | prettier__prettier-8111 | ['5678'] | cc8eaf1f591a9322d9803700c5a58489bb9f31fe | diff --git a/changelog_unreleased/javascript/pr-8111.md b/changelog_unreleased/javascript/pr-8111.md
new file mode 100644
index 000000000000..6f41418c00e2
--- /dev/null
+++ b/changelog_unreleased/javascript/pr-8111.md
@@ -0,0 +1,22 @@
+#### Fix object trailing commas that last property is ignored ([#8111](https://githu... | diff --git a/tests/object_property_ignore/__snapshots__/jsfmt.spec.js.snap b/tests/object_property_ignore/__snapshots__/jsfmt.spec.js.snap
new file mode 100644
index 000000000000..4a6fa71e98a6
--- /dev/null
+++ b/tests/object_property_ignore/__snapshots__/jsfmt.spec.js.snap
@@ -0,0 +1,665 @@
+// Jest Snapshot v1, https... | Comma Dangle error if prettier ignore is set to ignore last property in object
**Prettier 1.15.3**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuc0DOMAEAnOAzXNACwBUIBrBABQEMBPAGwhoBNMBeTYAHSk38ww6ABzhJMAclwE4xMpSgSANLwGY0AVwBG4mEQCWaAHQB9fSxV8B2CAzGCDxm3cv9uMAPQfMw3DBj6cNgAtPoA5lAQuKoCcAAewuKRAO6Y... | Also fails with trailing commas enabled:
**Prettier 1.15.3**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuc0DOMAEAnOAzXNACwBUIBrBABQEMBPAGwhoBNMBeTYAHSk38ww6ABzhJMAclwE4xMpSgSANLwGY0AVwBG4mEQCWaAHQB9fSxV8B2CAzGCDxm3cv9uMAPQfMw3DBj6cNgAtPoA5lAQuKoCcAAewuKRAO6YANSYABQAbAAMmABUmHmFmABMACylAJy5AJRKmF... | 2020-04-22 03:09:59+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/object_property_ignore/jsfmt.spec.js->issue-5678.js - {"trailingComma":"none"} verify (typescript)', '/testbed/tests/object_property_ignore/jsfmt.spec.js->ignore.js - {"trailingComma":"all"} verify (typescript)', '/testbed/tests/object_property_ignore/jsfmt.spec.js->issue-5678.js - {"trailingComma":"no... | ['/testbed/tests/object_property_ignore/jsfmt.spec.js->ignore.js format', '/testbed/tests/object_property_ignore/jsfmt.spec.js->issue-5678.js format', '/testbed/tests/object_property_ignore/jsfmt.spec.js->ignore.js - {"trailingComma":"all"} format', '/testbed/tests/object_property_ignore/jsfmt.spec.js->issue-5678.js - ... | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/object_property_ignore/issue-5678.js tests/object_property_ignore/jsfmt.spec.js tests/object_property_ignore/__snapshots__/jsfmt.spec.js.snap tests/object_property_ignore/ignore.js --json | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/language-js/printer-estree.js->program->function_declaration:printPathNoParens"] |
prettier/prettier | 8,097 | prettier__prettier-8097 | ['8095'] | 004cacda97da709d2d8b7750bb009756bf291f3b | diff --git a/changelog_unreleased/javascript/pr-8097.md b/changelog_unreleased/javascript/pr-8097.md
new file mode 100644
index 000000000000..7e3db9efca65
--- /dev/null
+++ b/changelog_unreleased/javascript/pr-8097.md
@@ -0,0 +1,44 @@
+#### Fix inconsistent parsing of injected expressions in styled-components template ... | diff --git a/tests/multiparser_js_css/__snapshots__/jsfmt.spec.js.snap b/tests/multiparser_js_css/__snapshots__/jsfmt.spec.js.snap
index 8eb72caa98fa..320ae7e00961 100644
--- a/tests/multiparser_js_css/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/multiparser_js_css/__snapshots__/jsfmt.spec.js.snap
@@ -2,7 +2,7 @@
ex... | Inconsistent parsing of injected expressions in styled-components' css
note the presence/absence of `;` after injected expression
```ts
const Header = styled.div`
${something()};
margin:4px;
`
```
is parsed and formatted as
```ts
const Header = styled.div`
${something()};
margin: 4px;
`;
```
---
``... | Note that this error is shown only on the playground for debugging purposes. In production, Prettier just skips formatting this template literal. And I'd say this is the right thing to do because how can we know what `something()` can be? It can be a part of the selector or a separate rule set, so it's not clear how to... | 2020-04-20 15:33:16+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/multiparser_js_css/jsfmt.spec.js->issue-2883.js verify (typescript)', '/testbed/tests/multiparser_js_css/jsfmt.spec.js->colons-after-substitutions.js verify (typescript)', '/testbed/tests/multiparser_js_css/jsfmt.spec.js->issue-5697.js format', '/testbed/tests/multiparser_js_css/jsfmt.spec.js->issue-62... | ['/testbed/tests/multiparser_js_css/jsfmt.spec.js->issue-2883.js format', '/testbed/tests/multiparser_js_css/jsfmt.spec.js->styled-components.js format'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/multiparser_js_css/issue-2883.js tests/multiparser_js_css/issue-5697.js tests/multiparser_js_css/issue-2636.js tests/multiparser_js_css/jsfmt.spec.js tests/multiparser_js_css/styled-components-multiple-expressions.js t... | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/language-js/embed.js->program->function_declaration:replacePlaceholders"] |
prettier/prettier | 8,069 | prettier__prettier-8069 | ['8068'] | 2a7515b77e72832a52b89c1e878ca35a51f09c21 | diff --git a/changelog_unreleased/javascript/pr-8069.md b/changelog_unreleased/javascript/pr-8069.md
new file mode 100644
index 000000000000..121f9a54dcfa
--- /dev/null
+++ b/changelog_unreleased/javascript/pr-8069.md
@@ -0,0 +1,33 @@
+#### Fix end-of-line comments if followed by trailing whitespace ([#8069](https://gi... | diff --git a/tests/comments/__snapshots__/jsfmt.spec.js.snap b/tests/comments/__snapshots__/jsfmt.spec.js.snap
index 2963f6a9b6d3..43c395915526 100644
--- a/tests/comments/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/comments/__snapshots__/jsfmt.spec.js.snap
@@ -3835,6 +3835,72 @@ if (true) {
=========================... | End-of-line comments aren't formatted properly if followed by trailing whitespace
**Prettier 2.0.4**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEA3AhgJwATuwXm2GwHoAqbOADxkzwHcALAS3gGcAHdMObAWj4A+bGRLZsAHSjjxAI2wBfANxSpGHHkLFy2KBGxNWcTt14DhoqTOzzlIADQgIHGM2htkoLJgj0AClgIHijoADb06ACeHo6ydGAA1nAwA... | null | 2020-04-17 04:59:11+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/comments/jsfmt.spec.js->dangling_for.js verify (babel)', '/testbed/tests/comments/jsfmt.spec.js->assignment-pattern.js verify (babel-ts)', '/testbed/tests/comments/jsfmt.spec.js->call_comment.js - {"semi":false} verify (babel)', '/testbed/tests/comments/jsfmt.spec.js->dangling_array.js verify (typescri... | ['/testbed/tests/comments/jsfmt.spec.js->snippet: #0 format', '/testbed/tests/comments/jsfmt.spec.js->snippet: #0 - {"semi":false} format'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/comments/__snapshots__/jsfmt.spec.js.snap tests/comments/jsfmt.spec.js tests/insert-pragma/js/__snapshots__/jsfmt.spec.js.snap --json | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/main/comments.js->program->function_declaration:printComments"] |
prettier/prettier | 8,046 | prettier__prettier-8046 | ['8041'] | 19545e049ea424273fb6d647eefd1787d998b333 | diff --git a/changelog_unreleased/typescript/pr-8046.md b/changelog_unreleased/typescript/pr-8046.md
new file mode 100644
index 000000000000..0b19f0bb9018
--- /dev/null
+++ b/changelog_unreleased/typescript/pr-8046.md
@@ -0,0 +1,19 @@
+#### Fix the `babel-ts` parser so that it emits a proper syntax error for `(a:b)` ([... | diff --git a/tests/misc/errors/babel-ts/__snapshots__/jsfmt.spec.js.snap b/tests/misc/errors/babel-ts/__snapshots__/jsfmt.spec.js.snap
new file mode 100644
index 000000000000..f7efaedf67d4
--- /dev/null
+++ b/tests/misc/errors/babel-ts/__snapshots__/jsfmt.spec.js.snap
@@ -0,0 +1,8 @@
+// Jest Snapshot v1, https://goo.g... | babel-ts crashes on `(a:b)`
**Prettier 2.0.4**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEAKAhkgRgShAGhAgAcYBLaAZ2VHQCc6IB3ABXoWpXQBsn0BPaoSx10YANZwYAZWJiyUAObIYdAK5xCACxgBbbgHUtZeJTlg40jibIA3E-2ThKQkAspw6MFqMW70yABmPB6EAFaUAB4AQqISUtLounAAMgpwQSGaIBGR0gqK3HAAimoQ8JncoSBydB50TljoWHDcALQwrsR0Cj... | null | 2020-04-13 21:39:57+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| [] | ['/testbed/tests/misc/errors/babel-ts/jsfmt.spec.js->issue-8041.ts error test'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/misc/errors/babel-ts/__snapshots__/jsfmt.spec.js.snap tests/misc/errors/babel-ts/issue-8041.ts tests/misc/errors/babel-ts/jsfmt.spec.js --json | Bug Fix | false | true | false | false | 2 | 0 | 2 | false | false | ["src/language-js/parser-babel.js->program->function_declaration:rethrowSomeRecoveredErrors", "src/language-js/parser-babel.js->program->function_declaration:tryCombinations"] |
prettier/prettier | 7,933 | prettier__prettier-7933 | ['7740'] | 1a21ba94e4e481a330a9f94c75ab112c5fc0ab27 | diff --git a/changelog_unreleased/css/pr-7933.md b/changelog_unreleased/css/pr-7933.md
new file mode 100644
index 000000000000..16d9f059c39b
--- /dev/null
+++ b/changelog_unreleased/css/pr-7933.md
@@ -0,0 +1,41 @@
+#### [BREAKING] Add pure css parser ([#7933](https://github.com/prettier/prettier/pull/7933) by [@fisker]... | diff --git a/tests/misc/errors/css/__snapshots__/jsfmt.spec.js.snap b/tests/misc/errors/css/__snapshots__/jsfmt.spec.js.snap
new file mode 100644
index 000000000000..36d3dad90c37
--- /dev/null
+++ b/tests/misc/errors/css/__snapshots__/jsfmt.spec.js.snap
@@ -0,0 +1,15 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+ex... | Throw on Less syntax when the `css` parser is used
Not really sure this is really needed, but evilebottnawi asked to open this issue [here](https://github.com/prettier/prettier/pull/6981/files#r371918167).
| null | 2020-04-02 05:54:21+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/misc/errors/scss/jsfmt.spec.js->less-syntax.css error test'] | ['/testbed/tests/misc/errors/css/jsfmt.spec.js->less-syntax.css error test', '/testbed/tests/misc/errors/css/jsfmt.spec.js->scss-syntax.css error test'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/misc/errors/scss/__snapshots__/jsfmt.spec.js.snap tests/misc/errors/scss/jsfmt.spec.js tests/misc/errors/css/__snapshots__/jsfmt.spec.js.snap tests/misc/errors/css/jsfmt.spec.js tests/misc/errors/less/scss-syntax.css t... | Feature | false | true | false | false | 1 | 0 | 1 | true | false | ["src/language-css/parser-postcss.js->program->function_declaration:parseCss"] |
prettier/prettier | 7,923 | prettier__prettier-7923 | ['7920', '7920'] | 70da4fa630bbe21e1e7baa21984dd050cf1b3934 | diff --git a/changelog_unreleased/flow/pr-7923.md b/changelog_unreleased/flow/pr-7923.md
new file mode 100644
index 000000000000..2fc11058597a
--- /dev/null
+++ b/changelog_unreleased/flow/pr-7923.md
@@ -0,0 +1,52 @@
+#### Do not add comma for explicit inexact object with indexer property or no properties ([#7923](http... | diff --git a/tests/flow_object_inexact/__snapshots__/jsfmt.spec.js.snap b/tests/flow_object_inexact/__snapshots__/jsfmt.spec.js.snap
index fa0d6af61b93..f873374c1b27 100644
--- a/tests/flow_object_inexact/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/flow_object_inexact/__snapshots__/jsfmt.spec.js.snap
@@ -4,6 +4,141 @@... | [Flow] Prettier forces an extra comma for inexact object type flow syntax, only for object indexer.
**Prettier 2.0.2**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEMCeAHOACAchAfQGEIBbUgQ2wF5tgAdKbbCpbAIwggBs4KoANI2YA6MYwC+w7I3RZsAFWJlKNOtNYcuvfkKbYxIvVP2zMOAJJQAJnAAecAE4F8y8lVoN9AbQDOMRwBLKABzAF... | 2020-04-01 07:13:53+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/flow_object_inexact/jsfmt.spec.js->test.js', '/testbed/tests/flow_object_inexact/jsfmt.spec.js->comments.js - babel-verify', '/testbed/tests/flow_object_inexact/jsfmt.spec.js->comments.js', '/testbed/tests/flow_object_inexact/jsfmt.spec.js->test.js - babel-verify'] | ['/testbed/tests/flow_object_inexact/jsfmt.spec.js->test.js', '/testbed/tests/flow_object_inexact/jsfmt.spec.js->comments.js'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/flow_object_inexact/__snapshots__/jsfmt.spec.js.snap tests/flow_object_inexact/comments.js tests/flow_object_inexact/jsfmt.spec.js tests/flow_object_inexact/test.js --json | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/language-js/printer-estree.js->program->function_declaration:printPathNoParens"] | |
prettier/prettier | 7,430 | prettier__prettier-7430 | ['6929'] | ebd0c6d605325b7e0b44b51d5909a4d55d1f3cc9 | diff --git a/changelog_unreleased/api/pr-7430.md b/changelog_unreleased/api/pr-7430.md
new file mode 100644
index 000000000000..f6357f91de7a
--- /dev/null
+++ b/changelog_unreleased/api/pr-7430.md
@@ -0,0 +1,22 @@
+#### Change default value for `arrowParens` to `always` ([#7430](https://github.com/prettier/prettier/pul... | diff --git a/tests/arrow-call/__snapshots__/jsfmt.spec.js.snap b/tests/arrow-call/__snapshots__/jsfmt.spec.js.snap
index 95b30dca2140..21bfd8ae5b7a 100644
--- a/tests/arrow-call/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/arrow-call/__snapshots__/jsfmt.spec.js.snap
@@ -52,7 +52,7 @@ const composition = (ViewComponent,... | Change `arrowParens` to `always` by default for 2.0
Why i think we need to change that?
- code consistency when an argument more than one
- if we look through our issues a lot of developers use `always`
- it does not require large code changes in our code
- honestly I don't even know why we once created this opti... | I already posted it in the main 2.0 issue and for the sake of completeness I think I should post it again. I think `avoid` is a mistake. A mistake in the ES6 spec to make it at all possible to omit parens in exactly one very specific case, namely when you have exactly one argument without default value, without type in... | 2020-01-25 14:06:40+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/cursor/jsfmt.spec.js->cursor-4.js', '/testbed/tests/cursor/jsfmt.spec.js->cursor-3.js - typescript-verify', '/testbed/tests/arrows/jsfmt.spec.js->call.js', '/testbed/tests/flow_function_parentheses/jsfmt.spec.js->test.js - babel-verify', '/testbed/tests/cursor/jsfmt.spec.js->range-2.js', '/testbed/test... | ['/testbed/tests/flow_function_parentheses/jsfmt.spec.js->single.js', '/testbed/tests/test_declarations/jsfmt.spec.js->test_declarations.js', "/testbed/tests/cursor/jsfmt.spec.js->doesn't insert second placeholder for nonexistent TypeAnnotation", '/testbed/tests/test_declarations/jsfmt.spec.js->angular_async.js', '/tes... | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/preserve_line/__snapshots__/jsfmt.spec.js.snap tests_integration/__tests__/__snapshots__/support-info.js.snap tests/yield/__snapshots__/jsfmt.spec.js.snap tests/method-chain/__snapshots__/jsfmt.spec.js.snap tests/break... | Feature | true | false | false | false | 0 | 0 | 0 | false | false | [] |
prettier/prettier | 7,221 | prettier__prettier-7221 | ['7174', '7174'] | 47ece13d7830be1e948c53cec54e39a6d4d5b988 | diff --git a/changelog_unreleased/typescript/pr-7174.md b/changelog_unreleased/typescript/pr-7174.md
new file mode 100644
index 000000000000..225335abca92
--- /dev/null
+++ b/changelog_unreleased/typescript/pr-7174.md
@@ -0,0 +1,13 @@
+#### Fix printing of mapped types with the template type omitted ([#7221](https://gi... | diff --git a/tests/typescript_mapped_type/__snapshots__/jsfmt.spec.js.snap b/tests/typescript_mapped_type/__snapshots__/jsfmt.spec.js.snap
new file mode 100644
index 000000000000..aa88ebac33e5
--- /dev/null
+++ b/tests/typescript_mapped_type/__snapshots__/jsfmt.spec.js.snap
@@ -0,0 +1,19 @@
+// Jest Snapshot v1, https:... | Format error syntax with language typescript
BEFORE RUN FORMAT
`type A = { readonly [key in keyof B] };`
AFTER RUN FORMAT
`type A = { readonly [key in keyof B]: };`
Format error syntax with language typescript
BEFORE RUN FORMAT
`type A = { readonly [key in keyof B] };`
AFTER RUN FORMAT
`type A = { readonly [ke... | Some useful information's about this ticket 🔢
https://github.com/prettier/prettier/blob/master/src/language-js/printer-estree.js#L3336
```diff
- ": ",
+ n.typeAnnotation ? ": " : "",
```
https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/typescript-estree... | 2020-01-05 05:00:50+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| [] | ['/testbed/tests/typescript_mapped_type/jsfmt.spec.js->mapped-type.ts'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/typescript_mapped_type/jsfmt.spec.js tests/typescript_mapped_type/mapped-type.ts tests/typescript_mapped_type/__snapshots__/jsfmt.spec.js.snap --json | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/language-js/printer-estree.js->program->function_declaration:printPathNoParens"] |
prettier/prettier | 7,208 | prettier__prettier-7208 | ['7096'] | 64723640c8c58ea3c45acb8e1045a2eeeb7c0b86 | diff --git a/changelog_unreleased/javascript/pr-7208.md b/changelog_unreleased/javascript/pr-7208.md
new file mode 100644
index 000000000000..722d231c3af7
--- /dev/null
+++ b/changelog_unreleased/javascript/pr-7208.md
@@ -0,0 +1,24 @@
+#### Do not add hard linebreak for html template ([#7208](https://github.com/prettie... | diff --git a/tests/angular_component_examples/__snapshots__/jsfmt.spec.js.snap b/tests/angular_component_examples/__snapshots__/jsfmt.spec.js.snap
index 21ae6bd3d3b7..d72d36c36313 100644
--- a/tests/angular_component_examples/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/angular_component_examples/__snapshots__/jsfmt.sp... | Extra spaces in html tagged templates
**Prettier 1.19.1**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuc0DOMAEAbAhgIzm0wF5MALGAW2wAMAeNAB1ygD4ASYeADxgF96Aemas2tANwAdKCAA0ICExgBLdMlC4ATlogB3AAraEaZCFwA3CCoAm8kPi24wAazgwAyizAqoAc2QYLQBXOAVKGgB1chV4UTA4DxNYlQtYgE8zMDRTBV80OC0YAyc-KlxkADNcbAKFACs0HgA... | /cc @saschanaz please don't repeat issues, put examples here
@evilebottnawi For me #7101 wasn't exactly this issue though, because hyperHTML automatically trim out the newlines *if single-rooted* and thus won't make a breaking change.
Edit: But anyway it looks similar, and 100% sorry for #7100 which is exactly same ... | 2019-12-30 13:47:44+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/multiparser_js_html/jsfmt.spec.js->lit-html.js', '/testbed/tests/multiparser_js_html/jsfmt.spec.js->lit-html.js - babel-ts-verify', '/testbed/tests/multiparser_js_html/jsfmt.spec.js->lit-html.js - flow-verify', '/testbed/tests/multiparser_js_html/jsfmt.spec.js->html-template-literals.js - typescript-ve... | ['/testbed/tests/multiparser_js_html/jsfmt.spec.js->lit-html.js', '/testbed/tests/multiparser_js_html/jsfmt.spec.js->html-template-literals.js'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/multiparser_js_html/html-template-literals.js tests/multiparser_js_html/jsfmt.spec.js tests/decorators-ts/__snapshots__/jsfmt.spec.js.snap tests/multiparser_js_html/lit-html.js tests/multiparser_js_html/__snapshots__/j... | Bug Fix | false | true | false | false | 4 | 0 | 4 | false | false | ["src/language-js/embed.js->program->function_declaration:printHtmlTemplateLiteral", "src/language-js/embed.js->program->function_declaration:printHtmlTemplateLiteral->method_definition:__onHtmlRoot", "src/language-js/embed.js->program->function_declaration:embed", "src/language-html/printer-html.js->program->function_... |
prettier/prettier | 7,094 | prettier__prettier-7094 | ['7066'] | b9743b4c6c31d23f76f747a1e61bac04d461ecfa | diff --git a/changelog_unreleased/typescript/pr-7094.md b/changelog_unreleased/typescript/pr-7094.md
new file mode 100644
index 000000000000..ee30e2bf486e
--- /dev/null
+++ b/changelog_unreleased/typescript/pr-7094.md
@@ -0,0 +1,26 @@
+#### Remove extra indentation for arrow function on variable declaration with commen... | diff --git a/tests/typescript_arrow/__snapshots__/jsfmt.spec.js.snap b/tests/typescript_arrow/__snapshots__/jsfmt.spec.js.snap
index 394c70a0b64d..837d1324ef5b 100644
--- a/tests/typescript_arrow/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/typescript_arrow/__snapshots__/jsfmt.spec.js.snap
@@ -40,3 +40,108 @@ app.get("... | [TS parser] Incorrect leading spaces inserted
**Prettier 1.19.1**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEBLAtgBwgJxgAgCp8BDAZ3zgA84wT8AzHCdfAcmtpLYB0oNsefAHMIjZqzYA6APSjeUPpChkC6Eqij4AvKTIBPKGHwAKAJQ6AfPmB989-MtWUax3aJOc6Zuw6cEwdAATHRcuX3snCAAbOCloiGETCIcSAHcNAi8TNkxNYQAvNgAafABtNgBaMBL2AF... | null | 2019-12-04 16:15:58+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/typescript_arrow/jsfmt.spec.js->arrow_regression.js'] | ['/testbed/tests/typescript_arrow/jsfmt.spec.js->comments.js'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/typescript_arrow/__snapshots__/jsfmt.spec.js.snap tests/typescript_arrow/comments.js tests/typescript_arrow/jsfmt.spec.js --json | Bug Fix | false | true | false | false | 3 | 0 | 3 | false | false | ["src/language-js/postprocess.js->program->function_declaration:postprocess->function_declaration:locEnd", "src/language-js/postprocess.js->program->function_declaration:postprocess->function_declaration:overrideLocEnd", "src/language-js/postprocess.js->program->function_declaration:postprocess"] |
prettier/prettier | 7,010 | prettier__prettier-7010 | ['6965'] | d52b6a8a1ea78e3a50e25e947450eeb10186a0a3 | diff --git a/changelog_unreleased/javascript/pr-7003.md b/changelog_unreleased/javascript/pr-7003.md
new file mode 100644
index 000000000000..73563471a0c4
--- /dev/null
+++ b/changelog_unreleased/javascript/pr-7003.md
@@ -0,0 +1,28 @@
+#### Fix formatting of logical, binary and sequence expressions in template literals... | diff --git a/tests/line_suffix_boundary/__snapshots__/jsfmt.spec.js.snap b/tests/line_suffix_boundary/__snapshots__/jsfmt.spec.js.snap
index 583f31c1d3f7..475d1d817e90 100644
--- a/tests/line_suffix_boundary/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/line_suffix_boundary/__snapshots__/jsfmt.spec.js.snap
@@ -32,7 +32,... | Logical operators & nullish coalescing break strangely in template string expressions
<!--
BEFORE SUBMITTING AN ISSUE:
1. Search for your issue on GitHub: https://github.com/prettier/prettier/issues
A large number of opened issues are duplicates of existing issues.
If someone has already opened an issu... | i think it makes sense
Sometimes breaking like this:
```js
`abc ${...
...}`
```
…and sometimes like this:
```js
`abc ${
...
}`
```
…sounds like a bug to me. We should always print like the second example.
@lydell :+1: Let's mark as bug
Feel free to send a PR with fix
Cool! I have no idea how to f... | 2019-11-19 13:15:18+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| [] | ['/testbed/tests/typescript_template_literals/jsfmt.spec.js->as-expression.ts'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/template_literals/binary-exporessions.js tests/template_literals/__snapshots__/jsfmt.spec.js.snap tests/template_literals/logical-expressions.js tests/template_literals/conditional-expressions.js tests/line_suffix_boun... | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/language-js/printer-estree.js->program->function_declaration:printPathNoParens"] |
prettier/prettier | 6,687 | prettier__prettier-6687 | ['5966'] | 0acc3120ef46df957aaad93863eb234c1a6fac51 | diff --git a/CHANGELOG.unreleased.md b/CHANGELOG.unreleased.md
index bd578028f8f2..e4ade133c80c 100644
--- a/CHANGELOG.unreleased.md
+++ b/CHANGELOG.unreleased.md
@@ -1317,6 +1317,20 @@ $ prettier --parser babel < test.js
[error] Invalid printWidth value. Expected an integer, but received "nope".
```
+#### CLI: Gra... | diff --git a/tests_integration/__tests__/__snapshots__/stdin-filepath.js.snap b/tests_integration/__tests__/__snapshots__/stdin-filepath.js.snap
index a109655c8ed4..2f065a2b1d21 100644
--- a/tests_integration/__tests__/__snapshots__/stdin-filepath.js.snap
+++ b/tests_integration/__tests__/__snapshots__/stdin-filepath.j... | Passing a full path via --stdin-filepath causes an error
**Environments:**
- Prettier Version: master
- Running Prettier via: CLI
- Runtime: Node.js
- Operating System: Linux
**Steps to reproduce:**
When prettier is given a simple file name, like `foo.tsx` in its `--stdin-filepath` arg, everything works fine.
... | null | 2019-10-20 05:59:18+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests_integration/__tests__/stdin-filepath.js->throw error if stdin content incompatible with stdin-filepath (stderr)', '/testbed/tests_integration/__tests__/stdin-filepath.js->apply editorconfig for stdin-filepath with nonexistent file (stderr)', '/testbed/tests_integration/__tests__/stdin-filepath.js->outp... | ['/testbed/tests_integration/__tests__/stdin-filepath.js->gracefully handle stdin-filepath with nonexistent directory (stdout)', '/testbed/tests_integration/__tests__/stdin-filepath.js->don’t apply editorconfig outside project for stdin-filepath with nonexistent directory (status)', '/testbed/tests_integration/__tests_... | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests_integration/__tests__/__snapshots__/stdin-filepath.js.snap tests_integration/__tests__/stdin-filepath.js --json | Bug Fix | true | false | false | false | 0 | 0 | 0 | false | false | [] |
prettier/prettier | 6,657 | prettier__prettier-6657 | ['6569'] | 4e46f92b8648c7f25de62bfaf4368aa3f2e588d9 | diff --git a/CHANGELOG.unreleased.md b/CHANGELOG.unreleased.md
index 10b564aeee44..94da1ddcd127 100644
--- a/CHANGELOG.unreleased.md
+++ b/CHANGELOG.unreleased.md
@@ -44,6 +44,107 @@ const link = <a href="example.com">http://example.com</a>;
-->
+#### TypeScript: Support for TypeScript 3.7 ([#6657] by [@cryrivers]... | diff --git a/tests/comments/__snapshots__/jsfmt.spec.js.snap b/tests/comments/__snapshots__/jsfmt.spec.js.snap
index 8782461805bf..34cf5455a6f0 100644
--- a/tests/comments/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/comments/__snapshots__/jsfmt.spec.js.snap
@@ -325,6 +325,11 @@ React.render( // Warm any cache
conta... | [Typescript] Prettier removes question mark from optional computed class property
**Prettier 1.18.2**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuc0DOMAEAjAhgJ0wF5MByPfUgbgB0owAbXNNTAMQgk2Dsz8wDaFALoB+WlH6CAjGIlSB5XAC9ScugF86IADQgIABxgBLdMlAF8EAO4AFAgjTIQuAG4RjAE10hs+XGAA1nAwAMoGAcZQAObIMPgArnB6... | minimum reproduct
**Prettier 1.18.2**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuc0DOMAEAjAhgJ0wF5MByPfUgbgB0owAbXNNTAMQgk2Dsz8wDaFALoB+WlAC+dEABoQEAA4wAlumSgC+CAHcACgQRpkIXADcIKgCZyQ2fLjABrODADKixyqgBzZDHwAVzh5AAsYAFsGAHVQlXg0TzA4NyN4lTN4gE8TMBZbbzQ4fBg9Bx8I3GQAM1wGIvkAKzQADwAhB2dXN1wIuAAZb... | 2019-10-15 04:27:55+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/template_literals/jsfmt.spec.js->styled-components-with-expressions.js', '/testbed/tests/optional_chaining/jsfmt.spec.js->chaining.js - flow-verify', '/testbed/tests/template_literals/jsfmt.spec.js->styled-jsx-with-expressions.js - typescript-verify', '/testbed/tests/template_literals/jsfmt.spec.js->st... | ['/testbed/tests/optional_chaining/jsfmt.spec.js->chaining.js', '/testbed/tests/template_literals/jsfmt.spec.js->expressions.js', '/testbed/tests/template_literals/jsfmt.spec.js->expressions.js - flow-verify'] | ['/testbed/tests/optional_chaining/jsfmt.spec.js->chaining.js - typescript-verify', '/testbed/tests/nullish_coalescing/jsfmt.spec.js->nullish_coalesing_operator.js - typescript-verify', '/testbed/tests/template_literals/jsfmt.spec.js->expressions.js - typescript-verify', '/testbed/tests/optional_chaining/jsfmt.spec.js-... | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/typescript_assert/__snapshots__/jsfmt.spec.js.snap tests/optional_chaining/jsfmt.spec.js tests/comments/call_comment.js tests/comments/dangling.js tests/nullish_coalescing/jsfmt.spec.js tests/optional_chaining/chaining... | Bug Fix | false | true | false | false | 9 | 0 | 9 | false | false | ["src/language-js/comments.js->program->function_declaration:handleCallExpressionComments", "src/language-js/printer-estree.js->program->function_declaration:printPathNoParens", "src/common/util.js->program->function_declaration:startsWithNoLookaheadToken", "src/language-js/needs-parens.js->program->function_declaratio... |
prettier/prettier | 6,644 | prettier__prettier-6644 | ['5501'] | 433d3303c169e8a2927580b3df7b1f443bb7f4a5 | diff --git a/docs/options.md b/docs/options.md
index 80faff1e6a3b..8588686a4e66 100644
--- a/docs/options.md
+++ b/docs/options.md
@@ -382,8 +382,8 @@ Whether or not to indent the code inside `<script>` and `<style>` tags in Vue fi
Valid options:
-- `"false"` - Do not indent script and style tags in Vue files.
-- ... | diff --git a/tests/format/html/single-attribute-per-line/__snapshots__/jsfmt.spec.js.snap b/tests/format/html/single-attribute-per-line/__snapshots__/jsfmt.spec.js.snap
new file mode 100644
index 000000000000..b26f05bdf1c3
--- /dev/null
+++ b/tests/format/html/single-attribute-per-line/__snapshots__/jsfmt.spec.js.snap
... | Change HTML/JSX formatting to have one attribute/prop per line
Similar to what was done for #3847 I think it best to break some of the discussion from #3101 into a new issue that people can 👍 or 👎.
I'm proposing that for HTML and JSX to have Prettier always have one attribute/prop per line (and thus not respect th... | While I agree that I'd like to see this being default behavior, I would suggest the following steps:
- introduce new config option (`singleAttributePerLine: true` ?)
- make default of that option to have attributes on single line (for backwards compatibility)
- now we can have it 🎉
- open discussion about chang... | 2019-10-13 16:53:37+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/format/jsx/single-attribute-per-line/jsfmt.spec.js->single-attribute-per-line.js format', '/testbed/tests/format/vue/single-attribute-per-line/jsfmt.spec.js->single-attribute-per-line.vue format', '/testbed/tests/format/jsx/single-attribute-per-line/jsfmt.spec.js->single-attribute-per-line.js [babel-ts... | ['/testbed/tests/format/html/single-attribute-per-line/jsfmt.spec.js->single-attribute-per-line.html - {"singleAttributePerLine":true} format', '/testbed/tests/format/jsx/single-attribute-per-line/jsfmt.spec.js->single-attribute-per-line.js - {"singleAttributePerLine":true} format', '/testbed/tests/format/vue/single-at... | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/format/vue/single-attribute-per-line/single-attribute-per-line.vue tests/format/jsx/single-attribute-per-line/single-attribute-per-line.js tests/integration/__tests__/__snapshots__/support-info.js.snap tests/format/jsx... | Feature | false | true | false | false | 2 | 0 | 2 | false | false | ["src/language-html/print/tag.js->program->function_declaration:printAttributes", "src/language-js/print/jsx.js->program->function_declaration:printJsxOpeningElement"] |
prettier/prettier | 6,604 | prettier__prettier-6604 | ['6603'] | affa24ce764bd14ac087abeef0603012f5c635d6 | diff --git a/CHANGELOG.unreleased.md b/CHANGELOG.unreleased.md
index b6e4f385e5e0..6db041af81cb 100644
--- a/CHANGELOG.unreleased.md
+++ b/CHANGELOG.unreleased.md
@@ -742,6 +742,29 @@ Previously, the flag was not applied on html attributes.
<div class='a-class-name'></div>
```
+#### TypeScript: Fix incorrectly remo... | diff --git a/tests/typescript_conditional_types/__snapshots__/jsfmt.spec.js.snap b/tests/typescript_conditional_types/__snapshots__/jsfmt.spec.js.snap
index 6bf4a520de1f..34f70876e92b 100644
--- a/tests/typescript_conditional_types/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/typescript_conditional_types/__snapshots__/... | [TypeScript] Prettier incorrectly removes double parentheses around types
**Prettier 1.18.2**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEB6VACAwhATruMGAHVgE8AHODAFQEYMBeDABgzgA94oATAZwwAKBp278MAJgwYA-BgDMGJBgAsASlkYArEowA2UugwAhAK4BzUjErV6AfQBGFpq3ZcE4wcLdiBUzYrK6hpyOsoGUIaYOPiEJORUtFLMgmyiHgI... | null | 2019-10-04 11:17:15+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| [] | ['/testbed/tests/typescript_intersection/jsfmt.spec.js->intersection-parens.ts'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/typescript_intersection/__snapshots__/jsfmt.spec.js.snap tests/typescript_union/__snapshots__/jsfmt.spec.js.snap tests/typescript_union/inlining.ts tests/typescript_intersection/jsfmt.spec.js tests/typescript_keyof/key... | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/language-js/needs-parens.js->program->function_declaration:needsParens"] |
prettier/prettier | 6,438 | prettier__prettier-6438 | ['6435'] | 2523a017aad479b006593e9b380e4e27a7caea3d | diff --git a/CHANGELOG.unreleased.md b/CHANGELOG.unreleased.md
index d7e1b48b4d1f..76fde807d0f2 100644
--- a/CHANGELOG.unreleased.md
+++ b/CHANGELOG.unreleased.md
@@ -504,6 +504,25 @@ class Class {
}
```
+#### JavaScript: Handle empty object patterns with type annotations in function parameters ([#6438] by [@bakkot... | diff --git a/tests/flow_parameter_with_type/__snapshots__/jsfmt.spec.js.snap b/tests/flow_parameter_with_type/__snapshots__/jsfmt.spec.js.snap
new file mode 100644
index 000000000000..42006eb9e42c
--- /dev/null
+++ b/tests/flow_parameter_with_type/__snapshots__/jsfmt.spec.js.snap
@@ -0,0 +1,34 @@
+// Jest Snapshot v1, ... | Invalid trailing comma insertion for empty destructured argument
**Prettier 1.18.2**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuc0DOMAEAzTBeTACmAF8lMBZATwDc4AnKgG2gHMYqAHOauxlqOy49aDZmw7deYgUO4BKfAD5MpANwAdKCAA0ICJxgBLdMlABDevQgB3AAqWEaZCHM0IRgCa6QAI3rmYADWcDAAypyBRoLIMPQArnB6ABYwALZMAOrJRvBokW... | Must be related. Such empty patterns are formatted differently when type annotations are added:
**Prettier 1.18.2**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEAzArlMMCW0AEqAFMAL4CU+ZAOlBlrgcWUvgGIQSVkgA0IEAA6MoAZ2SgAhgCdpEAO4AFGQnEpJANwg4AJnxAAjaZLABrODADKgkzigBzZDGno4-ABYwAtgBsA6u448KI2YHC... | 2019-08-30 19:10:56+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/flow_parameter_with_type/jsfmt.spec.js->param.js - babel-verify'] | ['/testbed/tests/flow_parameter_with_type/jsfmt.spec.js->param.js'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/flow_parameter_with_type/param.js tests/flow_parameter_with_type/__snapshots__/jsfmt.spec.js.snap tests/flow_parameter_with_type/jsfmt.spec.js --json | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/language-js/printer-estree.js->program->function_declaration:printPathNoParens"] |
prettier/prettier | 6,219 | prettier__prettier-6219 | ['6151'] | 24f161db565c1a6692ee98191193d9cf9ff31d6f | diff --git a/src/main/options-normalizer.js b/src/main/options-normalizer.js
index 69fd3384dc68..a46a579df887 100644
--- a/src/main/options-normalizer.js
+++ b/src/main/options-normalizer.js
@@ -118,6 +118,9 @@ function optionInfoToSchema(optionInfo, { isCLI, optionInfos }) {
parameters.preprocess = value => N... | diff --git a/tests_integration/__tests__/__snapshots__/plugin-options-string.js.snap b/tests_integration/__tests__/__snapshots__/plugin-options-string.js.snap
new file mode 100644
index 000000000000..77d3ae01f2f8
--- /dev/null
+++ b/tests_integration/__tests__/__snapshots__/plugin-options-string.js.snap
@@ -0,0 +1,34 @... | Allow plugin to add option with string type
<!--
BEFORE SUBMITTING AN ISSUE:
1. Search for your issue on GitHub: https://github.com/prettier/prettier/issues
A large number of opened issues are duplicates of existing issues.
If someone has already opened an issue for what you are experiencing,
you ... | null | 2019-06-13 18:37:16+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests_integration/__tests__/plugin-options-string.js->show detailed external option with `--help foo-string` (write)', '/testbed/tests_integration/__tests__/plugin-options-string.js->external options from config file should work (write)', '/testbed/tests_integration/__tests__/plugin-options-string.js->extern... | ['/testbed/tests_integration/__tests__/plugin-options-string.js->external options from config file should work (status)', '/testbed/tests_integration/__tests__/plugin-options-string.js->external options from CLI should work (status)', '/testbed/tests_integration/__tests__/plugin-options-string.js->external options from... | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests_integration/plugins/options-string/plugin.js tests_integration/__tests__/plugin-options-string.js tests_integration/__tests__/__snapshots__/plugin-options-string.js.snap tests_integration/plugins/options-string/config.... | Feature | false | true | false | false | 1 | 0 | 1 | true | false | ["src/main/options-normalizer.js->program->function_declaration:optionInfoToSchema"] |
prettier/prettier | 6,199 | prettier__prettier-6199 | ['6197'] | f070f003853e8f0237b76cdc3631590541e84fb2 | diff --git a/src/language-js/printer-estree.js b/src/language-js/printer-estree.js
index 09d3e26abbd1..b56a59f96e73 100644
--- a/src/language-js/printer-estree.js
+++ b/src/language-js/printer-estree.js
@@ -2487,7 +2487,7 @@ function printPathNoParens(path, options, print, args) {
printArrayItems(path, o... | diff --git a/tests/typescript_tuple/__snapshots__/jsfmt.spec.js.snap b/tests/typescript_tuple/__snapshots__/jsfmt.spec.js.snap
index ea436406d13e..4a7cbef55649 100644
--- a/tests/typescript_tuple/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/typescript_tuple/__snapshots__/jsfmt.spec.js.snap
@@ -44,6 +44,47 @@ exports[`t... | Prettier 1.18 breaks support for TS users < 3.3
**Prettier 1.18.0**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEAzArlMMCW0AEqEE+AFAIYBOA5gM5L4DaAOlPux+7TJTlNQBpWnTt178hbEVx59Bw6fjFzJipbIkLpyzVO0b5ekTsNqTqxea3GD19gF0AlPmABfEAJAQADrmi1kUCpKCAB3AAUqBACUcgA3CBwAEw8QACNKcjAAazgYAGVvLLlkHnQ4TwALGABbA... | @mattlewis92
Oh thanks for the report! Indeed there was a bug there. I'll fix it and release 1.18.2 in a bit.
> I think the TS version could be read by prettier and then used to determine whether to apply this transformation.
This is a good idea.
Awesome, thanks! | 2019-06-07 14:11:09+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/typescript_tuple/jsfmt.spec.js->trailing-comma.ts', '/testbed/tests/typescript_tuple/jsfmt.spec.js->tuple.ts'] | ['/testbed/tests/typescript_tuple/jsfmt.spec.js->trailing-comma.ts', '/testbed/tests/typescript_tuple/jsfmt.spec.js->tuple.ts'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/typescript_tuple/__snapshots__/jsfmt.spec.js.snap tests/typescript_tuple/jsfmt.spec.js --json | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/language-js/printer-estree.js->program->function_declaration:printPathNoParens"] |
prettier/prettier | 6,194 | prettier__prettier-6194 | ['6193'] | 8812792e93bbeac6beb5d99b244ab1f35a489a3e | diff --git a/CHANGELOG.unreleased.md b/CHANGELOG.unreleased.md
index df2af2751f2a..d16b0cf35766 100644
--- a/CHANGELOG.unreleased.md
+++ b/CHANGELOG.unreleased.md
@@ -75,5 +75,11 @@ function function1<T>() {
}
```
+#### Config: Match dotfiles in config overrides ([#6194] by [@duailibe])
+
+When using [`overrides`](... | diff --git a/tests_integration/__tests__/config-resolution.js b/tests_integration/__tests__/config-resolution.js
index e2f20d42884a..841c9f3ceb94 100644
--- a/tests_integration/__tests__/config-resolution.js
+++ b/tests_integration/__tests__/config-resolution.js
@@ -232,6 +232,15 @@ test("API clearConfigCache", () => {... | Overrides not applied to dotfiles
<!--
BEFORE SUBMITTING AN ISSUE:
1. Search for your issue on GitHub: https://github.com/prettier/prettier/issues
A large number of opened issues are duplicates of existing issues.
If someone has already opened an issue for what you are experiencing,
you do not nee... | null | 2019-06-07 12:25:56+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests_integration/__tests__/config-resolution.js->API resolveConfig with file arg', '/testbed/tests_integration/__tests__/config-resolution.js->resolves yaml configuration file with --find-config-path file (stderr)', '/testbed/tests_integration/__tests__/config-resolution.js->resolves configuration from exte... | ['/testbed/tests_integration/__tests__/config-resolution.js->API resolveConfig overrides work with dotfiles'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests_integration/cli/config/dot-overrides/.prettierrc tests_integration/__tests__/config-resolution.js --json | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/config/resolve-config.js->program->function_declaration:pathMatchesGlobs"] |
prettier/prettier | 6,172 | prettier__prettier-6172 | ['5846'] | 9ee56cdcfd9028eb8bea5479c041e9704dbe7af0 | diff --git a/CHANGELOG.unreleased.md b/CHANGELOG.unreleased.md
index a5faa7d48b64..974484f7b21c 100644
--- a/CHANGELOG.unreleased.md
+++ b/CHANGELOG.unreleased.md
@@ -433,6 +433,31 @@ f[(a::b)];
f[a::b];
```
+### TypeScript: Add trailing comma on tuple types when `trailing-commma` options is `all` ([#6172] by [@sos... | diff --git a/tests/typescript_tuple/__snapshots__/jsfmt.spec.js.snap b/tests/typescript_tuple/__snapshots__/jsfmt.spec.js.snap
index c30e729f5fe0..ea436406d13e 100644
--- a/tests/typescript_tuple/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/typescript_tuple/__snapshots__/jsfmt.spec.js.snap
@@ -40,6 +40,47 @@ export int... | [TypeScript] Trailing commas from type exports removed
**Prettier 1.16.4**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEcAeAHCAnGACGATwzjwBUBXDAGzjONIF48BtAHSjzygoFsAjONgA0eAPRi86AJYxIAEzgcAuiGEgIGGNOgBnZKACG2bBADuABWMJ9KQwDcI0+WpD9shsAGs4MAMoYntJQAObIMNgUcOoAFjC81ADqMbJwuoFgcH42stL2soTI4Lr66sG6... | Same to me. Every time I run prettier all the types that I've been working results as without commas. Therefore it's an error
@Ruffeng what do you mean "it's an error" ?
Do you have an example ?
That my TS complains about that
It does not complain in the TypeScript playground: http://www.typescriptlang.org/play/#... | 2019-06-03 04:14:46+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/typescript_tuple/jsfmt.spec.js->trailing-comma.ts', '/testbed/tests/typescript_tuple/jsfmt.spec.js->tuple.ts'] | ['/testbed/tests/typescript_tuple/jsfmt.spec.js->trailing-comma.ts', '/testbed/tests/typescript_tuple/jsfmt.spec.js->tuple.ts'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/typescript_tuple/__snapshots__/jsfmt.spec.js.snap tests/typescript_tuple/jsfmt.spec.js --json | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/language-js/printer-estree.js->program->function_declaration:printPathNoParens"] |
prettier/prettier | 6,133 | prettier__prettier-6133 | ['6083'] | e222562b582dd67be360d1697cee0ebadf8d40e1 | diff --git a/CHANGELOG.unreleased.md b/CHANGELOG.unreleased.md
index 827b5ad5c7bd..c904f9130dc1 100644
--- a/CHANGELOG.unreleased.md
+++ b/CHANGELOG.unreleased.md
@@ -304,6 +304,27 @@ type G = keyof T[];
type G = (keyof T)[];
```
+### JavaScript: Keep parenthesis around functions and classes in `export default` dec... | diff --git a/tests/export_default/__snapshots__/jsfmt.spec.js.snap b/tests/export_default/__snapshots__/jsfmt.spec.js.snap
index 3eed46afbae0..c085ccc7b66f 100644
--- a/tests/export_default/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/export_default/__snapshots__/jsfmt.spec.js.snap
@@ -1,8 +1,22 @@
// Jest Snapshot v1... | Parens incorrectly dropped when trying to type a function expression
**Prettier 1.17.0**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEcAeAHCAnGACAEzgDMBDAVwBt8AKY8qMGAS2j0ogHMaBKPYADpQhAXzykAznhgBPDHAjE8kKBIiU4AOg6ceIADQgIGFtAnJQpbNggB3AApWE5lKQBuEZgQMgARtlIwAGs4GABlDEDmKE5kGGxyOEMACxgAW0oAdWTme... | null | 2019-05-18 03:21:25+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/export_default/jsfmt.spec.js->iife.js', '/testbed/tests/export_default/jsfmt.spec.js->iife.js - typescript-verify', '/testbed/tests/export_default/jsfmt.spec.js->binary_and_template.js', '/testbed/tests/export_default/jsfmt.spec.js->function_in_template.js - typescript-verify', '/testbed/tests/export_d... | ['/testbed/tests/export_default_ts/jsfmt.spec.js->function_as.ts', '/testbed/tests/export_default/jsfmt.spec.js->function_tostring.js', '/testbed/tests/export_default/jsfmt.spec.js->class_instance.js'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/typescript_as/__snapshots__/jsfmt.spec.js.snap tests/export_default_ts/jsfmt.spec.js tests/export_default/__snapshots__/jsfmt.spec.js.snap tests/typescript_as/export_default_as.ts tests/export_default/class_instance.js... | Bug Fix | false | true | false | false | 8 | 0 | 8 | false | false | ["src/language-js/printer-estree.js->program->function_declaration:hasNakedLeftSide", "src/language-js/utils.js->program->function_declaration:getLeftSide", "src/language-js/needs-parens.js->program->function_declaration:shouldWrapFunctionForExportDefault", "src/language-js/printer-estree.js->program->function_declarat... |
prettier/prettier | 5,963 | prettier__prettier-5963 | ['3146'] | b38319740af7721873ada5e3b97b0eb34e759b4a | diff --git a/CHANGELOG.unreleased.md b/CHANGELOG.unreleased.md
index a88ae9c3b709..4460a0bc86e5 100644
--- a/CHANGELOG.unreleased.md
+++ b/CHANGELOG.unreleased.md
@@ -42,6 +42,35 @@ Examples:
-->
+- Config: Support shared configurations ([#5963] by [@azz])
+
+ Sharing a Prettier configuration is simple: just publ... | diff --git a/tests_integration/__tests__/__snapshots__/config-invalid.js.snap b/tests_integration/__tests__/__snapshots__/config-invalid.js.snap
index 90e9857c6236..334c91fa25f6 100644
--- a/tests_integration/__tests__/__snapshots__/config-invalid.js.snap
+++ b/tests_integration/__tests__/__snapshots__/config-invalid.j... | Extend config
Inside an org with a lot of repos we would like to maintain a consistent code style by sharing formatting/linting configuration files. TSLint, ESLint, TypeScript tsconfig etc. all allow this by specifying an `extends` property that points to another config, resolved by node module resolution algorithm. Me... | I'm currently doing it this way in all of my repos to maintain consistent style:
```js
// prettier.config.js
module.exports = require("prettier-config-ikatyang");
```
The proposed feature (ref: [ESLint config](https://eslint.org/docs/user-guide/configuring#configuration-based-on-glob-patterns)) looks good to m... | 2019-03-12 10:12:33+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests_integration/__tests__/config-resolution.js->API resolveConfig with file arg', '/testbed/tests_integration/__tests__/config-resolution.js->resolves yaml configuration file with --find-config-path file (stderr)', '/testbed/tests_integration/__tests__/config-resolution.js->resolves configuration from exte... | ['/testbed/tests_integration/__tests__/config-resolution.js->CLI overrides take precedence (stdout)', '/testbed/tests_integration/__tests__/config-resolution.js->resolves configuration from external files (stderr)', '/testbed/tests_integration/__tests__/config-resolution.js->resolves configuration from external files (... | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests_integration/__tests__/__snapshots__/config-resolution.js.snap tests_integration/cli/config/external-config/package.json tests_integration/__tests__/__snapshots__/with-config-precedence.js.snap tests_integration/__tests... | Feature | true | false | false | false | 0 | 0 | 0 | false | false | [] |
prettier/prettier | 5,947 | prettier__prettier-5947 | ['4799'] | ed15b6d04e60a75d81c406ee899a86690187d44e | diff --git a/CHANGELOG.unreleased.md b/CHANGELOG.unreleased.md
index 7b5a8f5be608..a89a80824180 100644
--- a/CHANGELOG.unreleased.md
+++ b/CHANGELOG.unreleased.md
@@ -41,3 +41,22 @@ Examples:
```
-->
+
+- JavaScript: Fix closure compiler typecasts ([#5947] by [@jridgewell])
+
+ If a closing parenthesis follows a... | diff --git a/tests/comments/__snapshots__/jsfmt.spec.js.snap b/tests/comments/__snapshots__/jsfmt.spec.js.snap
index 9198e1dc3efc..1cc4bce165fe 100644
--- a/tests/comments/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/comments/__snapshots__/jsfmt.spec.js.snap
@@ -323,114 +323,6 @@ React.render(
========================... | JSDoc type cast parentheses is removed
**Prettier 1.13.7**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAucAbAhgZ0wAgMIAWArlANY7AA6UOtOA9AFSPWUw6M4ACATnDER5RcwAEYQIqOOigBfHAHcC-ZTxwQ1UCOxjL8xMooCWqVDgLoAbnBzocPEjCMBbOK3aN67i5gBKjlzgACgBKCnc2ADMNHCDIYXYwA1IAcR4IIgAHdUicXSNMADoAfQBzdKzMMKooNjqYenocA... | Looks like it's caused by the outer parens:
**Prettier 1.13.7**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuc0DOMAEAPTBeTAegCpjMABGATwAc5NgANAX02MMwAoBDASgDoARp1748BMAG4AOlEhQMOfFxJlKtek1bsufISLETekkABoQEGjACW6ZKG4AnRxADuABScI0yENwBuENYAJmYggo7cYADWcDAAyjRR1lAA5sgwjgCucOYpaHCOMO6RqQC23MgAZtwA... | 2019-03-07 05:49:47+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| [] | ['/testbed/tests/comments_closure_typecast/jsfmt.spec.js->closure-compiler-type-cast.js'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/comments/__snapshots__/jsfmt.spec.js.snap tests/comments_closure_typecast/jsfmt.spec.js tests/comments_closure_typecast/__snapshots__/jsfmt.spec.js.snap tests/comments_closure_typecast/closure-compiler-type-cast.js --j... | Bug Fix | false | true | false | false | 5 | 0 | 5 | false | false | ["src/language-js/needs-parens.js->program->function_declaration:hasClosureCompilerTypeCastComment->function_declaration:hasAncestorTypeCastComment", "src/language-js/needs-parens.js->program->function_declaration:hasClosureCompilerTypeCastComment->function_declaration:hasTypeCastComment", "src/language-js/needs-parens... |
prettier/prettier | 5,934 | prettier__prettier-5934 | ['4327'] | 3a9006659eb935fbf15940ca94c12dc3fec9a0a6 | diff --git a/CHANGELOG.unreleased.md b/CHANGELOG.unreleased.md
index 2131c474ce8e..a5266f9f45f3 100644
--- a/CHANGELOG.unreleased.md
+++ b/CHANGELOG.unreleased.md
@@ -42,6 +42,44 @@ Examples:
-->
+- JavaScript: Add an option to modify when Prettier quotes object properties ([#5934] by [@azz])
+ **`--quote-props <... | diff --git a/tests/quote_props/__snapshots__/jsfmt.spec.js.snap b/tests/quote_props/__snapshots__/jsfmt.spec.js.snap
new file mode 100644
index 000000000000..2d21433e6f0d
--- /dev/null
+++ b/tests/quote_props/__snapshots__/jsfmt.spec.js.snap
@@ -0,0 +1,379 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`clas... | Respect quoted object keys, as unquoting breaks aggressive minifiers like Closure Compiler
Hi, related to the discussions in [#838](https://github.com/prettier/prettier/issues/838#issuecomment-381831221) and [#1103](https://github.com/prettier/prettier/issues/1103#issuecomment-290996915), Prettier uses a `consistent-as... | cc: @vjeux who asked me in #838 to open a seperate issue for this
It doesn't feel like @vjeux was aware of #1103 when he suggested to open a new issue?
#1103 was closed last year (by @vjeux, actually) - am hoping we're ok to start a fresh discussion here. Let me know if I should close this and try to get that one re-op... | 2019-03-02 02:35:22+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/quote_props_typescript/jsfmt.spec.js->types.ts', '/testbed/tests/quote_props/jsfmt.spec.js->objects.js - babel-verify', '/testbed/tests/quote_props/jsfmt.spec.js->objects.js', '/testbed/tests/quote_props/jsfmt.spec.js->classes.js - babel-verify', '/testbed/tests/quote_props/jsfmt.spec.js->classes.js'] | ['/testbed/tests/quote_props/jsfmt.spec.js->objects.js', '/testbed/tests/quote_props/jsfmt.spec.js->classes.js'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests_integration/__tests__/__snapshots__/help-options.js.snap tests_integration/__tests__/__snapshots__/support-info.js.snap tests/quote_props/jsfmt.spec.js tests/quote_props_typescript/jsfmt.spec.js tests_integration/__tes... | Feature | false | true | false | false | 2 | 0 | 2 | false | false | ["src/language-js/printer-estree.js->program->function_declaration:isStringPropSafeToCoerceToIdentifier", "src/language-js/printer-estree.js->program->function_declaration:printPropertyKey"] |
prettier/prettier | 5,826 | prettier__prettier-5826 | ['5822'] | a093bb3f7b9f59d8cbaf7e20f97f6fafceaef21b | diff --git a/CHANGELOG.unreleased.md b/CHANGELOG.unreleased.md
index 3b7624d02177..ee721918bff2 100644
--- a/CHANGELOG.unreleased.md
+++ b/CHANGELOG.unreleased.md
@@ -84,3 +84,7 @@ Examples:
// Output (Prettier master)
<my-element data-for={value}></my-element>
```
+
+- Fix `prettier.getSupportInfo()` reportin... | diff --git a/tests_integration/__tests__/__snapshots__/support-info.js.snap b/tests_integration/__tests__/__snapshots__/support-info.js.snap
index 33450f09ba94..96189705d760 100644
--- a/tests_integration/__tests__/__snapshots__/support-info.js.snap
+++ b/tests_integration/__tests__/__snapshots__/support-info.js.snap
@... | getSupportInfo misinform about babel/babylon
<!--
BEFORE SUBMITTING AN ISSUE:
1. Search for your issue on GitHub: https://github.com/prettier/prettier/issues
A large number of opened issues are duplicates of existing issues.
If someone has already opened an issue for what you are experiencing,
you... | null | 2019-02-03 09:29:04+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests_integration/__tests__/support-info.js->CLI --support-info (status)', '/testbed/tests_integration/__tests__/support-info.js->API getSupportInfo() with version 0.0.0 -> 1.0.0', '/testbed/tests_integration/__tests__/support-info.js->API getSupportInfo() with version 1.16.0 -> undefined', '/testbed/tests_i... | ['/testbed/tests_integration/__tests__/support-info.js->API getSupportInfo() with version 1.5.0 -> 1.7.1', '/testbed/tests_integration/__tests__/support-info.js->API getSupportInfo() with version 0.0.0', '/testbed/tests_integration/__tests__/support-info.js->API getSupportInfo() with version 1.0.0 -> 1.4.0', '/testbed/... | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests_integration/__tests__/__snapshots__/support-info.js.snap tests_integration/__tests__/support-info.js --json | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/main/support.js->program->function_declaration:getSupportInfo"] |
prettier/prettier | 5,790 | prettier__prettier-5790 | ['5789'] | 1061be070263f72653bdd69d41bfefc97699ec67 | diff --git a/CHANGELOG.unreleased.md b/CHANGELOG.unreleased.md
index 38d0f0857371..5e3e12ffd71c 100644
--- a/CHANGELOG.unreleased.md
+++ b/CHANGELOG.unreleased.md
@@ -121,8 +121,34 @@ Examples:
_foo <InlineJSX /> bar_
```
+- TypeScript: Stable parentheses for function type in the return type of arrow function (... | diff --git a/tests/typescript_function_type/__snapshots__/jsfmt.spec.js.snap b/tests/typescript_function_type/__snapshots__/jsfmt.spec.js.snap
new file mode 100644
index 000000000000..f03a65c296cc
--- /dev/null
+++ b/tests/typescript_function_type/__snapshots__/jsfmt.spec.js.snap
@@ -0,0 +1,19 @@
+// Jest Snapshot v1, ... | Bug with type annotation, keep removing and adding parentheses
Following https://github.com/prettier/prettier/issues/5247
I think, introduced in https://github.com/prettier/prettier/commit/30979ed10471731f293da3f254f2267dd760c060
**Prettier 1.16.0**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprE... | That is a regression in the sense that 1.15 had a clear preference for `(): () => void`, which is better. Unless there is an ambiguity in the type expression you should not need parens, and there is never an ambiguity with a function type unless you need to `|` or `&` the function type itself with another type.
To b... | 2019-01-22 09:06:01+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| [] | ['/testbed/tests/typescript_function_type/jsfmt.spec.js->type-annotation.ts'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/typescript_function_type/jsfmt.spec.js tests/typescript_function_type/__snapshots__/jsfmt.spec.js.snap tests/typescript_function_type/type-annotation.ts --json | Bug Fix | false | true | false | false | 2 | 0 | 2 | false | false | ["src/language-js/needs-parens.js->program->function_declaration:getUnparenthesizedNode", "src/language-js/needs-parens.js->program->function_declaration:needsParens"] |
prettier/prettier | 5,701 | prettier__prettier-5701 | ['5651'] | 7faa2608c1ee6e4f13b83185343eb514ac3f0801 | diff --git a/CHANGELOG.unreleased.md b/CHANGELOG.unreleased.md
index 7b5a8f5be608..764e3973be7a 100644
--- a/CHANGELOG.unreleased.md
+++ b/CHANGELOG.unreleased.md
@@ -41,3 +41,33 @@ Examples:
```
-->
+
+- Markdown: Do not align table contents if it exceeds the print width and `--prose-wrap never` is set ([#5701] ... | diff --git a/tests/markdown_long_table/__snapshots__/jsfmt.spec.js.snap b/tests/markdown_long_table/__snapshots__/jsfmt.spec.js.snap
new file mode 100644
index 000000000000..1b3fe4c5e98a
--- /dev/null
+++ b/tests/markdown_long_table/__snapshots__/jsfmt.spec.js.snap
@@ -0,0 +1,76 @@
+// Jest Snapshot v1, https://goo.gl/... | markdown : compact formatted table
**Prettier 1.15.3**
**Input:**
```
| Property | Description | Type | Default |
| -------- | ----------- | ---- | ------- |
| addon | called from timepicker panel to render some addon to its bottom | function | - |
| allowEmpty | allow clearing text | boolean | true |
| autoFocu... | 

I think compact is a better solution for api table
Feel free to use `<!-- prettier-ignore -->` t... | 2019-01-01 08:51:50+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/markdown_long_table/jsfmt.spec.js->long-table.md'] | ['/testbed/tests/markdown_long_table/jsfmt.spec.js->long-table.md'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/markdown_table/table.md tests/markdown_long_table/long-table.md tests/markdown_long_table/jsfmt.spec.js tests/markdown_long_table/__snapshots__/jsfmt.spec.js.snap tests/markdown_table/__snapshots__/jsfmt.spec.js.snap -... | Feature | false | true | false | false | 5 | 0 | 5 | false | false | ["src/language-markdown/printer-markdown.js->program->function_declaration:printTable->function_declaration:alignLeft", "src/language-markdown/printer-markdown.js->program->function_declaration:printTable->function_declaration:alignRight", "src/language-markdown/printer-markdown.js->program->function_declaration:printT... |
prettier/prettier | 5,658 | prettier__prettier-5658 | ['5623'] | f94f63b040f881e182c0ffe5efcf7ba3e1053090 | diff --git a/src/language-js/comments.js b/src/language-js/comments.js
index 50ee0e9e2942..be1394e0058a 100644
--- a/src/language-js/comments.js
+++ b/src/language-js/comments.js
@@ -858,9 +858,20 @@ function isBlockComment(comment) {
return comment.type === "Block" || comment.type === "CommentBlock";
}
+function... | diff --git a/tests/multiparser_js_html/__snapshots__/jsfmt.spec.js.snap b/tests/multiparser_js_html/__snapshots__/jsfmt.spec.js.snap
index ac3e5057945e..98f22416d728 100644
--- a/tests/multiparser_js_html/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/multiparser_js_html/__snapshots__/jsfmt.spec.js.snap
@@ -2,7 +2,7 @@
... | `html` in `.ts/.tsx` is not formatted
**Prettier 1.15.3**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuc0DOMAEALGBbAG0wF5MB6AKkwAkAVAWQBlMKzMADAHgEIARAeQDCtAJoAFAKI58BAHwAdKJzpNMgxgEEAyluLyQUCAFoAVmkx4RRwQQ1ot+hVEyZlEjbycuXnehNoaatQaAEpa-nogAK4wAGZGAByOit6utACStIwSsvQAnpgwmQQSnGQZWTkp3r7+gQByGn6R... | The issue here is that the `/* HTML */` comment is somehow not attached to the template literal.
This seems to be related to #5588, relevant code: https://github.com/prettier/prettier/blob/6a45924379d919a17b072e38114745053ab808ef/src/language-js/embed.js#L555
Also happens with Flow, i.e. only works with babylon. | 2018-12-18 15:21:46+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/multiparser_js_html/jsfmt.spec.js->lit-html.js'] | ['/testbed/tests/multiparser_js_html/jsfmt.spec.js->lit-html.js - typescript-verify', '/testbed/tests/multiparser_js_html/jsfmt.spec.js->lit-html.js - flow-verify'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/multiparser_js_html/jsfmt.spec.js tests/multiparser_js_html/__snapshots__/jsfmt.spec.js.snap --json | Bug Fix | false | true | false | false | 2 | 0 | 2 | false | false | ["src/language-js/embed.js->program->function_declaration:hasLanguageComment", "src/language-js/comments.js->program->function_declaration:hasLeadingComment"] |
prettier/prettier | 5,657 | prettier__prettier-5657 | ['5648'] | f94f63b040f881e182c0ffe5efcf7ba3e1053090 | diff --git a/src/common/fast-path.js b/src/common/fast-path.js
index eb678a9a10d4..4c152b2f8db5 100644
--- a/src/common/fast-path.js
+++ b/src/common/fast-path.js
@@ -29,17 +29,18 @@ FastPath.prototype.getValue = function getValue() {
};
function getNodeHelper(path, count) {
- const s = path.stack;
-
- for (let i... | diff --git a/tests/html_angular/__snapshots__/jsfmt.spec.js.snap b/tests/html_angular/__snapshots__/jsfmt.spec.js.snap
index 2bfac28a7985..ec5d2dd291b4 100644
--- a/tests/html_angular/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/html_angular/__snapshots__/jsfmt.spec.js.snap
@@ -61,6 +61,21 @@ printWidth: 80
==========... | HTML Angular parser removes necessary parentheses causing early block closing
**Prettier 1.15.3**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEAeADgPgDpQAQF7DC6Fl4DkAJnADZzwWnksA+eMATgIZQDOtbvCREA7gAshIgBQUEMAJaK4fCnnZdeAoXBHBIAV1gjunHgE8AdPSgBzGOIC+ASkfMCjt1FQB6LCAAaEAh0RWg+ZFBTTghRAAVTBAiUbgA3... | Angular doesn't parse `} }` as `}}`. There is a white space in between.
Yes, my bad, I forgot to add the --no-bracket-spacing option. I've updated the original comment and the playground link accordingly.
It looks like we need to force `bracketSpacing: true` for interpolations. | 2018-12-18 14:52:56+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/html_angular/jsfmt.spec.js->ignore-attribute.component.html', '/testbed/tests/html_angular/jsfmt.spec.js->real-world.component.html', '/testbed/tests/html_angular/jsfmt.spec.js->interpolation.component.html', '/testbed/tests/html_angular/jsfmt.spec.js->first-lf.component.html', '/testbed/tests/html_ang... | ['/testbed/tests/html_angular/jsfmt.spec.js->interpolation.component.html'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/html_angular/interpolation.component.html tests/html_angular/__snapshots__/jsfmt.spec.js.snap tests/html_angular/jsfmt.spec.js --json | Bug Fix | false | true | false | false | 7 | 0 | 7 | false | false | ["src/language-html/printer-html.js->program->function_declaration:embed", "src/common/fast-path.js->program->function_declaration:getNodeStackIndexHelper", "src/language-js/needs-parens.js->program->function_declaration:needsParens", "src/language-js/needs-parens.js->program->function_declaration:endsWithRightBracket"... |
prettier/prettier | 5,642 | prettier__prettier-5642 | ['5617'] | 8e612f05a0d4b68a6ee9af5406f917388f1d04d2 | diff --git a/src/language-html/utils.js b/src/language-html/utils.js
index 5b263ecebc7d..ecbf5a139d8d 100644
--- a/src/language-html/utils.js
+++ b/src/language-html/utils.js
@@ -375,6 +375,10 @@ function inferScriptParser(node) {
if (node.attrMap.type === "text/markdown") {
return "markdown";
}
+
+ ... | diff --git a/tests/html_script/__snapshots__/jsfmt.spec.js.snap b/tests/html_script/__snapshots__/jsfmt.spec.js.snap
new file mode 100644
index 000000000000..18a5cad25c06
--- /dev/null
+++ b/tests/html_script/__snapshots__/jsfmt.spec.js.snap
@@ -0,0 +1,19 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`scrip... | Handle "application/ld+json" type as script type in html formatting
**Prettier 1.15.3**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEAeAzmATgSwA4wAEMAnnnALwA6IAhnngDY5i0w7QD0jAJgNQArdNBoA+KlEKFgEqVJoABSLDgAPGDSSEaACxgw8STp0w64AW1oA6CFgDmNADQTZcmpZxQAorBykA8gBmAAq0dnCa0q5y2iAKpOSRNADqcABGoeFO0W5x... | Shouldn’t it be the `json` parser?
Yes, you're right. | 2018-12-15 15:17:36+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| [] | ['/testbed/tests/html_script/jsfmt.spec.js->script.html'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/html_script/jsfmt.spec.js tests/html_script/script.html tests/html_script/__snapshots__/jsfmt.spec.js.snap --json | Feature | false | true | false | false | 1 | 0 | 1 | true | false | ["src/language-html/utils.js->program->function_declaration:inferScriptParser"] |
Subsets and Splits
Top Repos by Test Count
Lists the top 1000 repositories by the number of entries, providing a basic count of entries per repository.
Unique Repo Selection
Lists unique repository names from the dataset, providing a basic overview of the repositories present.