repo stringclasses 15
values | pull_number int64 147 18.3k | instance_id stringlengths 14 31 | issue_numbers listlengths 1 3 | base_commit stringlengths 40 40 | patch stringlengths 289 585k | test_patch stringlengths 355 6.82M | problem_statement stringlengths 25 49.4k | hints_text stringlengths 0 58.9k | created_at timestamp[us, tz=UTC]date 2014-08-08 22:09:38 2024-06-28 03:13:12 | version stringclasses 110
values | PASS_TO_PASS listlengths 0 4.82k | FAIL_TO_PASS listlengths 1 1.06k | language stringclasses 4
values | image_urls listlengths 0 4 | website links listlengths 0 4 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
prettier/prettier | 14,279 | prettier__prettier-14279 | [
"14275"
] | f602be5a478a5bcdca870b31936dc873ecae1120 | diff --git a/src/language-js/needs-parens.js b/src/language-js/needs-parens.js
--- a/src/language-js/needs-parens.js
+++ b/src/language-js/needs-parens.js
@@ -466,22 +466,30 @@ function needsParens(path, options) {
}
case "TSConditionalType":
- if (name === "extendsType" && parent.type === "TSConditi... | diff --git a/tests/format/typescript/conditional-types/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/conditional-types/__snapshots__/jsfmt.spec.js.snap
--- a/tests/format/typescript/conditional-types/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/format/typescript/conditional-types/__snapshots__/jsfmt.spec.j... | Incorrect removal of parentheses when using an `infer` with a constraint in a function predicate
**Prettier 2.8.3**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEMCeAHOACAKnAZxgB5cA+bAXj2zgA94oATA7ACjYB0ptsYIA1giR4AygFFRuAE5w4AOlyCE3AJRUK-ITwCWrHVABmcadgCqtBghZjJMuYuVRV3XgH5zr7CNwSpshSVtAG5uEAAaE... | 2023-01-31T09:28:25Z | 2.9 | [] | [
"tests/format/typescript/conditional-types/jsfmt.spec.js"
] | JavaScript | [] | [
"https://prettier.io/playground/#N4Igxg9gdgLgprEAuEMCeAHOACAKnAZxgB5cA+bAXj2zgA94oATA7ACjYB0ptsYIA1giR4AygFFRuAE5w4AOlyCE3AJRUK-ITwCWrHVABmcadgCqtBghZjJMuYuVRV3XgH5zr7CNwSpshSVtAG5uEAAaEAgMGB1oAmRQAENpaQgAdwAFFIQElCSAG3SktATIgCNpJLAhGFEkgFs4ABkDOGRDQoI4CqqauDqMaoMAc2QYaQBXHpA4BvK4JiZF5qSoEcmkkbgAMQhpBqSYWPXkECTJ-gi... | |
prettier/prettier | 14,314 | prettier__prettier-14314 | [
"8204"
] | 62827ab4d5daf858af7599143846e6bc942c4942 | diff --git a/src/language-js/parse/babel.js b/src/language-js/parse/babel.js
--- a/src/language-js/parse/babel.js
+++ b/src/language-js/parse/babel.js
@@ -218,8 +218,9 @@ const allowedMessageCodes = new Set([
"DuplicateExport",
]);
+const babelParserOptionsCombinations = [appendPlugins(["jsx"])];
const babel = c... | diff --git a/tests/config/format-test.js b/tests/config/format-test.js
--- a/tests/config/format-test.js
+++ b/tests/config/format-test.js
@@ -218,19 +218,6 @@ function runSpec(fixtures, parsers, options) {
const allParsers = [...parsers];
if (!IS_ERROR_TESTS) {
- if (
- parsers.includes("typescript") &... | Remove `flow` support from `parser: babel`
I was trying to improve parse performance on large files, and found it will cost almost half time on some file by removing plugins.
Something interesting come up, we have `flow` and `babel-flow` parser, but we also enabled `flow` syntax in `babel` plugins https://github.com... | > found it will cost almost half time on some file by removing plugins.
Could you show some benchmark results?
> Can we remove it?
I guess we can if we make Prettier switch to `babel-flow` automatically when the `@flow` pragma is found.
> Could you show some benchmark results?
Will do.
> I guess we can i... | 2023-02-08T10:23:27Z | 3.0 | [
"tests/format/jsx/jsx/jsfmt.spec.js",
"tests/format/jsx/expression-with-types/jsfmt.spec.js",
"tests/format/js/trailing-whitespace/jsfmt.spec.js",
"tests/format/flow/decorator/jsfmt.spec.js",
"tests/format/js/decorators/jsfmt.spec.js",
"tests/format/js/rest/jsfmt.spec.js",
"tests/format/typescript/decor... | [
"tests/format/js/babel-plugins/jsfmt.spec.js",
"tests/format/misc/errors/babel-flow/jsfmt.spec.js",
"tests/format/misc/errors/js/import-assertions/jsfmt.spec.js"
] | JavaScript | [] | [] |
prettier/prettier | 14,393 | prettier__prettier-14393 | [
"14309"
] | 2a5b391cc05e0ed8e00285c0a8afb71bb776147c | diff --git a/src/language-js/needs-parens.js b/src/language-js/needs-parens.js
--- a/src/language-js/needs-parens.js
+++ b/src/language-js/needs-parens.js
@@ -187,6 +187,10 @@ function needsParens(path, options) {
}
case "Decorator": {
if (name === "expression") {
+ if (isMemberExpression(node) ... | diff --git a/tests/config/format-test.js b/tests/config/format-test.js
--- a/tests/config/format-test.js
+++ b/tests/config/format-test.js
@@ -82,6 +82,8 @@ const meriyahDisabledTests = new Set([
__dirname,
"../format/js/babel-plugins/decorator-auto-accessors.js"
),
+ // Parsing to different ASTs
+ path.... | Using member access expressions (`@(array[0])`) in decorators produces incorrect output
**Prettier 2.8.3**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAucAbAhgZ0wAgApwBOm0OwAOlDjgAIAUAtgJ4Aickh6MEhAgoZyYBtAAwBdAJSVqAc0Jw4MOhLIBfSuqggANCAgAHGAEtomZKHQCIAdzyWEZlOlTX0TM7oBGnMAGtFAMroDHAAMkZQcMgAZs6Yc... | 2023-02-21T06:54:03Z | 2.9 | [] | [
"tests/format/js/decorators/jsfmt.spec.js"
] | JavaScript | [] | [
"https://prettier.io/playground/#N4Igxg9gdgLgprEAucAbAhgZ0wAgApwBOm0OwAOlDjgAIAUAtgJ4Aickh6MEhAgoZyYBtAAwBdAJSVqAc0Jw4MOhLIBfSuqggANCAgAHGAEtomZKHQCIAdzyWEZlOlTX0TM7oBGnMAGtFAMroDHAAMkZQcMgAZs6YcF4+-jAB+uhgETLIMIQArgkgcAyecAAmpWWh6FAyuegycABiPAxcxjXIIOi53DogABYwDKgA6v1G8JhpYHABDhNGAG4TTJ1g2H0R8YQweJwyrTFxBQBWmAAeAZ... | |
prettier/prettier | 14,400 | prettier__prettier-14400 | [
"13197"
] | 6905b39ec7bc6ed38732e26ceced5b57677e2600 | diff --git a/src/language-html/utils/index.js b/src/language-html/utils/index.js
--- a/src/language-html/utils/index.js
+++ b/src/language-html/utils/index.js
@@ -109,6 +109,7 @@ function isScriptLikeTag(node) {
(node.fullName === "script" ||
node.fullName === "style" ||
node.fullName === "svg:style"... | diff --git a/tests/config/utils/check-parsers.js b/tests/config/utils/check-parsers.js
--- a/tests/config/utils/check-parsers.js
+++ b/tests/config/utils/check-parsers.js
@@ -46,7 +46,10 @@ const categoryParsers = new Map([
"handlebars",
{ parsers: ["glimmer"], verifyParsers: [], extensions: [".hbs"] },
],... | Script in SVG is incorrectly formatted when using HTML parser
<!--
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 exper... | 2023-02-22T12:55:33Z | 3.0 | [
"tests/format/html/svg/jsfmt.spec.js"
] | [
"tests/format/html/svg/embeded/jsfmt.spec.js"
] | JavaScript | [] | [
"https://prettier.io/playground/#N4Igxg9gdgLgprEAuEAeAzgNwOYAIAeAtgDZToC8AOiABYwwAOSA9MwO4cB0bAzJxACdszAEwAGCcyzZquNgEsAJjBpUQIgCxjZNOPOx01m7SFyZ5cNgCEI+NWNwPNuTdQB8lKJRiow8gWDEcLhgdtQAjCKyYACeajxRpgJqAGyyAGbyxMRqYACuAgIIMADCEMSC7p7e3qgAhlDyhHXwuC0wAvIARnnwAHJ1hHC5MbKYdcR5cBTUCQDckbKKBfacKegZWTnU6UVwAF5wssweXj7MfgF... | |
prettier/prettier | 14,402 | prettier__prettier-14402 | [
"5666"
] | b5210fd392da98d099eeb978380e5452819a7c26 | diff --git a/src/language-js/print/function-parameters.js b/src/language-js/print/function-parameters.js
--- a/src/language-js/print/function-parameters.js
+++ b/src/language-js/print/function-parameters.js
@@ -279,8 +279,17 @@ function isDecoratedFunction(path) {
);
}
+function shouldBreakFunctionParameters(func... | diff --git a/tests/format/misc/errors/typescript/modifiers/__snapshots__/jsfmt.spec.js.snap b/tests/format/misc/errors/typescript/modifiers/__snapshots__/jsfmt.spec.js.snap
--- a/tests/format/misc/errors/typescript/modifiers/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/format/misc/errors/typescript/modifiers/__snapshot... | TypeScript constructor assignment improvement.
**Prettier 1.15.3**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEcAeAHCAnGACMAGwEMBnUvAFTlJgGETy9gAdKPA6W7AVzBhwAKNhw4ZsASwBuxeHmIYJSPAEFFAZTjYpEsHAA0I0eOmy4nKADMJAc2V1o1m5u264RgJTMAvm28h9EAgMGAkuZFBibGwIAHcABSiEUmQQYikICQATAJAAI2xiMABrOBh1DCKJKBtkG... | Is there any direct relation between "class properties" and "constructor arguments" in TypeScript? I don't use TypeScript so I really don't know.
I'm aware that sometimes in constructor you want to do:
```js
constructor(foo, bar) {
this.foo = foo;
this.bar = bar;
}
```
But if this works like JS, and ... | 2023-02-22T14:16:24Z | 3.0 | [
"tests/format/misc/errors/typescript/modifiers/jsfmt.spec.js"
] | [
"tests/format/typescript/conformance/classes/constructorDeclarations/constructorParameters/jsfmt.spec.js",
"tests/format/typescript/class/jsfmt.spec.js",
"tests/format/typescript/conformance/internalModules/importDeclarations/jsfmt.spec.js",
"tests/format/typescript/conformance/classes/jsfmt.spec.js"
] | JavaScript | [] | [
"https://prettier.io/playground/#N4Igxg9gdgLgprEAuEcAeAHCAnGACMAGwEMBnUvAFTlJgGETy9gAdKPA6W7AVzBhwAKNhw4ZsASwBuxeHmIYJSPAEFFAZTjYpEsHAA0I0eOmy4nKADMJAc2V1o1m5u264RgJTMAvm28h9EAgMGAkuZFBibGwIAHcABSiEUmQQYikICQATAJAAI2xiMABrOBh1DCKJKBtkGF4DEAALGABbQgB1Jol4Ukq9TShSHukegE9UsHJc6tItGHjCm1biZEtiQjnAgCtSNAAhQpKy9WJWuAAZar... |
prettier/prettier | 14,476 | prettier__prettier-14476 | [
"14237",
"14237"
] | 992ed5b572e9438cc4b45ea939b8931905ee46d6 | diff --git a/src/language-css/parse/parse-value.js b/src/language-css/parse/parse-value.js
--- a/src/language-css/parse/parse-value.js
+++ b/src/language-css/parse/parse-value.js
@@ -1,18 +1,12 @@
import PostcssValuesParser from "postcss-values-parser/lib/parser.js";
+import getFunctionArgumentsText from "../utils/get... | diff --git a/tests/format/css/url/__snapshots__/jsfmt.spec.js.snap b/tests/format/css/url/__snapshots__/jsfmt.spec.js.snap
--- a/tests/format/css/url/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/format/css/url/__snapshots__/jsfmt.spec.js.snap
@@ -11,11 +11,63 @@ div {
background: -fb-url(/images/bg.png);
}
+@font... | @font-face urls are incorrectly stripped of commas
**Prettier 2.8.3**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEAeAzjAngGzgPgB0oACEgAQDNoYBaSgQzDhOGLI4+tnoYFsAljixISAJwgAjANyc58hYqXKVqxewXoxYUQFcxOABQAlKRBgQAYngAetAGoMxAhpLyWaAfQDixgIIAIgA0ABoAKv5BAJoA8gAKAIrRYX4AyskBAKLJlgCSyQAyAMLJAKolEAAO6... | Thank you for reporting this! This is a CSS formatting problem, not for HTML!
**Prettier 2.8.3**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEACVABAZtGBaLAQzDlWAB0p1rqdYDCBbASwBsBPJVAJwgCMA3DWEjRY8RMlSxlMQGduYLgFdurABQAlfhBgQAYqzgAPPADVC3ZoT5H9uAPoBxTQEEAIgBoAGgBU3ngCaAPIACgCKQb6uAMpR7gCiUfoA... | 2023-03-09T21:20:26Z | 3.0 | [] | [
"tests/format/css/url/jsfmt.spec.js"
] | JavaScript | [] | [
"https://prettier.io/playground/#N4Igxg9gdgLgprEAuEAeAzjAngGzgPgB0oACEgAQDNoYBaSgQzDhOGLI4+tnoYFsAljixISAJwgAjANyc58hYqXKVqxewXoxYUQFcxOABQAlKRBgQAYngAetAGoMxAhpLyWaAfQDixgIIAIgA0ABoAKv5BAJoA8gAKAIrRYX4AyskBAKLJlgCSyQAyAMLJAKolEAAO6ABeQeg4sEEA7gAmMAAWLQDmHTAAdDAwlACU0hokAL5yxKgA9Ji4BBMkIEEgVTAC0OjIoE4SzXFOCLsoDDjND... |
prettier/prettier | 14,548 | prettier__prettier-14548 | [
"14547"
] | ddf3b43c33e2e98f6413b5232ad623876d96738e | diff --git a/src/language-js/parse/postprocess/typescript.js b/src/language-js/parse/postprocess/typescript.js
--- a/src/language-js/parse/postprocess/typescript.js
+++ b/src/language-js/parse/postprocess/typescript.js
@@ -30,6 +30,20 @@ function throwErrorOnTsNode(node, message) {
throwSyntaxError({ loc: { start, e... | diff --git a/tests/format/js/decorators/class-expression/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/decorators/class-expression/__snapshots__/jsfmt.spec.js.snap
--- a/tests/format/js/decorators/class-expression/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/format/js/decorators/class-expression/__snapshots__/jsfm... | Decorators on accessor private fields report SyntaxError
**Prettier 2.8.5**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAucAbAhgZ0wAgII7AA6UOOAAgCZxgAUAlDumGHNhAE44DEAZgJZxUlANwkAviAA0ICAAcY-aJmSh0HDhADuABXUIVKdKi3oAnipkAjDswDWcGAGV0AWzgAZflDjJexzDhrWzAHZzlmbwBzZBgOAFcgkDhXKzhKakoPdCgo+PQouAAxTld0... | TypeScript seems don't allow it [playground](https://www.typescriptlang.org/play?#code/MYGwhgzhAECC0G8BQ1oAEAmBTYAKAlNGMMFlAPYBO0AxAGYCWWIGA3EgL5A)
You should unset the `experimentalDecorators` option. While it's enabled, it uses stage 2 decorator proposal, not the latest stage 3 proposal | 2023-03-21T07:41:07Z | 2.9 | [] | [
"tests/format/js/decorators/class-expression/jsfmt.spec.js",
"tests/format/typescript/decorators/jsfmt.spec.js",
"tests/format/typescript/type-arguments-bit-shift-left-like/jsfmt.spec.js"
] | JavaScript | [] | [
"https://prettier.io/playground/#N4Igxg9gdgLgprEAucAbAhgZ0wAgII7AA6UOOAAgCZxgAUAlDumGHNhAE44DEAZgJZxUlANwkAviAA0ICAAcY-aJmSh0HDhADuABXUIVKdKi3oAnipkAjDswDWcGAGV0AWzgAZflDjJexzDhrWzAHZzlmbwBzZBgOAFcgkDhXKzhKakoPdCgo+PQouAAxTld0GEVc5BB0eJgIaRAACxhXVAB1Jv54TAjWJwNu-gA3brNqsGxG70COGB1bKLK-AKSAK0wADydo1DgARXiIeBXUQJkIjl... |
prettier/prettier | 14,557 | prettier__prettier-14557 | [
"9060"
] | 6650770c04cda06f1233f66b175e89b3ffa98424 | diff --git a/src/language-js/print/expression-statement.js b/src/language-js/print/expression-statement.js
new file mode 100644
--- /dev/null
+++ b/src/language-js/print/expression-statement.js
@@ -0,0 +1,44 @@
+import { printDanglingComments } from "../../main/comments/print.js";
+import {
+ markerForIfWithoutBlockAn... | diff --git a/tests/format/vue/ts-event-binding/__snapshots__/jsfmt.spec.js.snap b/tests/format/vue/event-binding/__snapshots__/jsfmt.spec.js.snap
similarity index 95%
rename from tests/format/vue/ts-event-binding/__snapshots__/jsfmt.spec.js.snap
rename to tests/format/vue/event-binding/__snapshots__/jsfmt.spec.js.snap
... | Unnecessary leading semi
**Prettier 2.1.0**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEAeeBbADgGwIbwB8AOlAARmoBuAtBnlmQAI4R4Amc7AvMSABT1G3MgBI4VBDACUZAGRyyASyhKYAWQb9pfQqgD0tISSgHMuAnBMgANCAhYYS6AGdkoPACdPEAO4AFLwQ3FDwqCCV2WxAAI088MABrOBgAZSwElQBzZBhPAFc4OzgMGK5OdgAZPCgs-LwsuAAxCE96GCda5BA8fJg... | This is expected and we format js like this, when `--no-semi`, but looks weird in this case.
Yes, when code like `;(() => {...})()` is placed at start of js file, the leading semi is unnecessary too, can this behavior be adjusted?
We won't change current behavior in js files, but this one may worth discuss.
__updated:_... | 2023-03-22T09:14:22Z | 3.0 | [
"tests/format/vue/event-binding/jsfmt.spec.js"
] | [
"tests/format/vue/event-binding/no-semi/jsfmt.spec.js"
] | JavaScript | [] | [
"https://prettier.io/playground/#N4Igxg9gdgLgprEAuEAeeBbADgGwIbwB8AOlAARmoBuAtBnlmQAI4R4Amc7AvMSABT1G3MgBI4VBDACUZAGRyyASyhKYAWQb9pfQqgD0tISSgHMuAnBMgANCAhYYS6AGdkoPACdPEAO4AFLwQ3FDwqCCV2WxAAI088MABrOBgAZSwElQBzZBhPAFc4OzgMGK5OdgAZPCgs-LwsuAAxCE96GCda5BA8fJgIaIALGAwcAHVBtTgXDLA4VOC1JSo1AE9usBc3OxUXOE8Yf3is+mQAMzwcP... |
prettier/prettier | 14,587 | prettier__prettier-14587 | [
"14575"
] | dd779dae55133f3065817608636e26d6b81a9e62 | diff --git a/src/language-html/print-preprocess.js b/src/language-html/print-preprocess.js
--- a/src/language-html/print-preprocess.js
+++ b/src/language-html/print-preprocess.js
@@ -411,18 +411,13 @@ function addIsSpaceSensitive(ast, options) {
}
function markTsScript(ast, options) {
- if (options.parser === "vue... | diff --git a/tests/format/vue/multiparser/__snapshots__/jsfmt.spec.js.snap b/tests/format/vue/multiparser/__snapshots__/jsfmt.spec.js.snap
--- a/tests/format/vue/multiparser/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/format/vue/multiparser/__snapshots__/jsfmt.spec.js.snap
@@ -70,6 +70,60 @@ export default {
========... | Vue not formatting TS expression if `script[lang=ts]` is second `<script>`
**Prettier 2.8.6**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEAeAzmATgSwA4wB8qA9JrgYQDpQbb4wAE6cMArnowDYCGUA5gF4qIGOhHUoXVowAeSZjFwDGAH0ZQ2AWwBGcLI0GMAjDVLkGk1PC15e8SY0bBgjABSynXxj3Tenmrr6AJQAdDAQAGI4snAAJm4ATMGMAL6pZiQ... | 2023-03-25T13:27:33Z | 2.9 | [] | [
"tests/format/vue/multiparser/jsfmt.spec.js"
] | JavaScript | [] | [
"https://prettier.io/playground/#N4Igxg9gdgLgprEAuEAeAzmATgSwA4wB8qA9JrgYQDpQbb4wAE6cMArnowDYCGUA5gF4qIGOhHUoXVowAeSZjFwDGAH0ZQ2AWwBGcLI0GMAjDVLkGk1PC15e8SY0bBgjABSynXxj3Tenmrr6AJQAdDAQAGI4snAAJm4ATMGMAL6pZiQ2djwOIAA0IBAEONDoyKA8WFgQAO4AClUI5Sg8XLU8AJ7lhTpYPGAA1qwAyjxacAAyOFBwyABmbSy9-UOjeAMz-MhKbHCFcEFxcfGTfPxsPPx... | |
prettier/prettier | 14,672 | prettier__prettier-14672 | [
"14666"
] | cddb59d211ff408c5b0b283a6dc2619889f725a3 | diff --git a/src/language-js/print/type-parameters.js b/src/language-js/print/type-parameters.js
--- a/src/language-js/print/type-parameters.js
+++ b/src/language-js/print/type-parameters.js
@@ -112,6 +112,10 @@ function printDanglingCommentsForInline(path, options) {
function printTypeParameter(path, options, print... | diff --git a/tests/format/typescript/typeparams/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/typeparams/__snapshots__/jsfmt.spec.js.snap
--- a/tests/format/typescript/typeparams/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/format/typescript/typeparams/__snapshots__/jsfmt.spec.js.snap
@@ -362,6 +362,54 @@ ... | Nested TypeScript generics are not well line-wrapped (even if input is)
Found a bug. Thank you for your consideration!
**Prettier 2.8.7**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEcAeAHCAnGACGATwzjwHkBXebAFWLgB4AdKPPAGWgHM5tOoefbr36CAklCi86JPOnhQAJgGcOwoQJHrRvMjAAW0+s1ZtyUgLI44MuCzYA+Fg7wB... | (I tried commenting things like #11923 but that didn't work. Having to resort to `// prettier-ignore` for now)
I prefer breaking line after `extends` for this case:
```ts
export type OuterType<
LongerLongerLongerLongerInnerType extends
ใใLongerLongerLongerLongerOtherType<OneMoreType>
> = {a: 1};
``` | 2023-04-08T16:31:50Z | 3.0 | [] | [
"tests/format/typescript/typeparams/jsfmt.spec.js"
] | JavaScript | [] | [
"https://prettier.io/playground/#N4Igxg9gdgLgprEAuEcAeAHCAnGACGATwzjwHkBXebAFWLgB4AdKPPAGWgHM5tOoefbr36CAklCi86JPOnhQAJgGcOwoQJHrRvMjAAW0+s1ZtyUgLI44MuCzYA+Fg7wBePMACGSPAEYAvgDcLAD0IXgACthwMDAAlrx4EFQYVHhxqgA26gT6nqwAHAAMeGB52J5g1MogADQgEBjx0DVIoJ7Y2BAA7hEdCK0gnpndnoQ19QBGFWAA1jEAyp4AtnDscVLIAGbDynBTM-MwCxiVG1zIMNg... |
prettier/prettier | 14,701 | prettier__prettier-14701 | [
"14625"
] | fb948bb15f31ade3b35e66b720f8d44260de45f8 | diff --git a/src/language-js/needs-parens.js b/src/language-js/needs-parens.js
--- a/src/language-js/needs-parens.js
+++ b/src/language-js/needs-parens.js
@@ -890,6 +890,9 @@ function needsParens(path, options) {
parent.type !== "VariableDeclarator" &&
parent.type !== "YieldExpression")
);
... | diff --git a/tests/format/typescript/instantiation-expression/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/instantiation-expression/__snapshots__/jsfmt.spec.js.snap
--- a/tests/format/typescript/instantiation-expression/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/format/typescript/instantiation-expressio... | Prettier removes parenthesis around Typescript instantiation expression that is used as part of a bind call
**Prettier 2.8.7**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuc0DOMAEBbAngeQCMArOMLAXk2AB0pNMBBJTARgBo6GAhFgJk71MAYRYBmOgF9MAQzSZIUDAG46dGLgAOcTAFkCJMjABqMgDYBXOABUtOqgAoN2iADMcB0uQCUAbQD... | ๐ @christopherschroer! Which version of TypeScript are you using? I just tried pasting
```ts
const getValidMyObjectValue = getValidValue<MyObjectValueType>.bind(
null,
myObject
);
```
into TS playground and [it successfully generated JavaScript](https://www.typescriptlang.org/play?ts=5.0.2#code/MYewdgzgLg... | 2023-04-15T06:20:08Z | 3.0 | [] | [
"tests/format/typescript/instantiation-expression/jsfmt.spec.js"
] | JavaScript | [] | [
"https://www.typescriptlang.org/play?#code/MYewdgzgLgBAtgTwPICMBWBTYsC8MDeAUDDAIIBcMAjADTEwBClATHSQMKUDMdAvjAEMIMUJCgBuQoSgIADhhgBZZOixQAagIA2AVwwAVOQrwAKGfJAAzeCszYAlAG0A1hgRWY5jB8So7UAF1JQksdMGwAS3AYCIhNLQiAE3i9AB51GAwADygMMEThMB04FAwAJwA+E3oQdEoAJSwQMsTU6DKIsABzGhh1CrYYADdtPUoikvLCe0oR3QVYvoJ6MowoHTKwGD81ADo5vQg... |
prettier/prettier | 14,736 | prettier__prettier-14736 | [
"13017"
] | 54404fc96faec9ace7f2422ce9c6ca4f63ab384c | diff --git a/src/language-js/print/array.js b/src/language-js/print/array.js
--- a/src/language-js/print/array.js
+++ b/src/language-js/print/array.js
@@ -9,17 +9,19 @@ import {
fill,
} from "../../document/builders.js";
import hasNewline from "../../utils/has-newline.js";
+import isNextLineEmptyAfterIndex from ".... | diff --git a/tests/format/js/arrays/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/arrays/__snapshots__/jsfmt.spec.js.snap
--- a/tests/format/js/arrays/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/format/js/arrays/__snapshots__/jsfmt.spec.js.snap
@@ -844,6 +844,87 @@ a = [
]
+b = [
+ 100,
+
+ (200)
+ ,
+
+ ... | (idempotence violation) Empty line after parenthesized array item
**Prettier 2.7.1**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEBtAOlABFghlgXiwCMAaTHCrMLAelswF0RSQIAHGAS2gGdlQuAE5CIAdwAKwhPxS4ANmNwBPfq2JDcYANZwYAZVwBbOABkuUOMgBmC3nHWade-ey0WA5shhCArg5A4I2I4ABNQsNNcKA9fXA84ADEIISNcGG4Y5BBcXxgIF... | I haven't been able to replicate this. I'm on macOS and ran a script to compare the output 1000 times, and they were all identical.
it may be difficult to determine the cause without more information
@solarized-fox the issue is to do with the second output not being equal to the first output, which means that idem... | 2023-04-21T11:25:02Z | 3.0 | [] | [
"tests/format/json/json/jsfmt.spec.js",
"tests/format/js/arrays/jsfmt.spec.js"
] | JavaScript | [] | [
"https://prettier.io/playground/#N4Igxg9gdgLgprEAuEBtAOlABFghlgXiwCMAaTHCrMLAelswF0RSQIAHGAS2gGdlQuAE5CIAdwAKwhPxS4ANmNwBPfq2JDcYANZwYAZVwBbOABkuUOMgBmC3nHWade-ey0WA5shhCArg5A4I2I4ABNQsNNcKA9fXA84ADEIISNcGG4Y5BBcXxgIFhAACxgjeQB1Iq54XjcwOH0Zaq4AN2rlbLBeNRALeyEYCU0PNJs7AIArXgAPfU95OABFXwh4Mfl7VjchfuziXBD5QvYhCxhyrlCY... |
prettier/prettier | 14,788 | prettier__prettier-14788 | [
"14148"
] | dfe32bcc388388ed27dce93096e2f920086e3d00 | diff --git a/src/cli/format.js b/src/cli/format.js
--- a/src/cli/format.js
+++ b/src/cli/format.js
@@ -21,13 +21,24 @@ function diff(a, b) {
class DebugError extends Error {}
function handleError(context, filename, error, printedFilename) {
- if (error instanceof errors.UndefinedParserError) {
+ const errorIsUnde... | diff --git a/tests/integration/__tests__/__snapshots__/line-after-filepath-with-errors.js.snap b/tests/integration/__tests__/__snapshots__/line-after-filepath-with-errors.js.snap
new file mode 100644
--- /dev/null
+++ b/tests/integration/__tests__/__snapshots__/line-after-filepath-with-errors.js.snap
@@ -0,0 +1,85 @@
+... | --list-different logs errors after file path instead of in a new line
**Environments:**
- Prettier Version: 2.8.2
- Running Prettier via: CLI
- Operating System: all
**Steps to reproduce:**
create a index.js file with a syntax issue in it, then run:
```bash
npx prettier --list-different "./**/*.{js,jsx,ts,... | @fisker, @thorn0, @sosukesuzuki sorry for disturbing you, would you please have a look at this issue? | 2023-05-03T08:50:13Z | 3.0 | [] | [
"tests/integration/__tests__/line-after-filepath-with-errors.js"
] | JavaScript | [] | [] |
prettier/prettier | 14,830 | prettier__prettier-14830 | [
"14786"
] | 20ab6d6f1c5bd774621230b493a3b71d39383a2c | diff --git a/src/language-js/print/object.js b/src/language-js/print/object.js
--- a/src/language-js/print/object.js
+++ b/src/language-js/print/object.js
@@ -118,7 +118,8 @@ function printObject(path, options, print) {
if (
(prop.node.type === "TSPropertySignature" ||
prop.node.type === "TSMethodS... | diff --git a/tests/format/typescript/call-signature/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/call-signature/__snapshots__/jsfmt.spec.js.snap
new file mode 100644
--- /dev/null
+++ b/tests/format/typescript/call-signature/__snapshots__/jsfmt.spec.js.snap
@@ -0,0 +1,131 @@
+// Jest Snapshot v1, https://... | Bug report: using `// prettier-ignore` on a call signature line leads to broken code on format
**Prettier 2.8.8**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEMCeAHOACAYhCbAXm2AB0ptsAKASiWwDcIBLAEwG5sB6b7DAE5wYMFnAEBaFgHMoEIRSoBnOJChsGSmAJZRpHCgF8DUEABoQEDKOhLkoAIYCBEAO4AFJwjsoHAG1cHNDsLACMBBzAA... | Hello, I don't have prior experience contributing to this project, but I would like to work on this issue as a good first issue.
If I find a solution, I plan to submit a pull request. | 2023-05-17T03:57:50Z | 3.0 | [] | [
"tests/format/typescript/call-signature/jsfmt.spec.js"
] | JavaScript | [] | [
"https://prettier.io/playground/#N4Igxg9gdgLgprEAuEMCeAHOACAYhCbAXm2AB0ptsAKASiWwDcIBLAEwG5sB6b7DAE5wYMFnAEBaFgHMoEIRSoBnOJChsGSmAJZRpHCgF8DUEABoQEDKOhLkoAIYCBEAO4AFJwjsoHAG1cHNDsLACMBBzAAa2EAZQcAWzgAGV04ZAAzfxUwiOi4jEjdaWRtAFc4CzgE0Lg2Njrkhz0yh2k4fAEEhxFi5BAHMpgIcxAACxgEvwB1MZZ4JUKwOFjveZZGebR+sCUQkF0VARh3COluzOzK... |
prettier/prettier | 14,858 | prettier__prettier-14858 | [
"14808"
] | 2a864e515769073e7d668a94ceadb29ff58613a7 | diff --git a/src/language-js/print/type-parameters.js b/src/language-js/print/type-parameters.js
--- a/src/language-js/print/type-parameters.js
+++ b/src/language-js/print/type-parameters.js
@@ -7,6 +7,8 @@ import {
group,
indent,
ifBreak,
+ lineSuffixBoundary,
+ indentIfBreak,
} from "../../document/builde... | diff --git a/tests/format/typescript/typeparams/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/typeparams/__snapshots__/jsfmt.spec.js.snap
--- a/tests/format/typescript/typeparams/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/format/typescript/typeparams/__snapshots__/jsfmt.spec.js.snap
@@ -404,12 +404,91 @@... | Regression in v3
**Prettier pr-14803**
[Playground link](https://deploy-preview-14803--prettier.netlify.app/playground/#N4Igxg9gdgLgprEAuEAzArlMMCW0AEAtgIYDWcAwgBbE5QDqxANuQE4A8AOlPvgIKsA5gBV8cAB7woAEwDO+YN168IAB1zRZSfADVmOacXjSA8urxRZAbiXLpOVlGKE422TFZ1BNnstQ4mOFUjKgB+Nw8vH14AXwAabgA+AAoASgUYkDiQNQ1LZFBiVlYIAHcABSKEW... | 2023-05-25T07:00:10Z | 3.0 | [] | [
"tests/format/typescript/typeparams/jsfmt.spec.js"
] | JavaScript | [] | [
"https://deploy-preview-14803--prettier.netlify.app/playground/#N4Igxg9gdgLgprEAuEAzArlMMCW0AEAtgIYDWcAwgBbE5QDqxANuQE4A8AOlPvgIKsA5gBV8cAB7woAEwDO+YN168IAB1zRZSfADVmOacXjSA8urxRZAbiXLpOVlGKE422TFZ1BNnstQ4mOFUjKgB+Nw8vH14AXwAabgA+AAoASgUYkDiQNQ1LZFBiVlYIAHcABSKEWWQQZlLiAE8a7IAjVmIwchgAZWc4ABk6OGRUZlk4No6uuF7gsC9kD3... | |
prettier/prettier | 15,076 | prettier__prettier-15076 | [
"15007"
] | c9b479edca4d16fcb8588840d684fb4f5a9d9a87 | diff --git a/src/language-js/comments/handle-comments.js b/src/language-js/comments/handle-comments.js
--- a/src/language-js/comments/handle-comments.js
+++ b/src/language-js/comments/handle-comments.js
@@ -208,7 +208,9 @@ function handleIfStatementComments({
addDanglingComment(
precedingNode,
... | diff --git a/tests/format/js/if/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/if/__snapshots__/jsfmt.spec.js.snap
--- a/tests/format/js/if/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/format/js/if/__snapshots__/jsfmt.spec.js.snap
@@ -93,26 +93,44 @@ parsers: ["babel", "flow", "typescript"]
printWidth: 80
... | Skip single characters was not printed. Please report this error!
when ever i try to format my js file , it gives me this error
["ERROR" - 10:30:02 PM] Error formatting document.
["ERROR" - 10:30:02 PM] Comment "Skip single characters" was not printed. Please report this error!
| Please use the [issue template](https://github.com/prettier/prettier/tree/main/.github/ISSUE_TEMPLATE) to help us reproduce the bug. What source code was producing the error?
@kachkaev, I also have the same issue in typescript file after I updated to prettier 3.0.0 from 2.8.8
```
const a = {
project: "SchemaChec... | 2023-07-11T05:58:03Z | 3.1 | [] | [
"tests/format/js/if/jsfmt.spec.js"
] | JavaScript | [] | [] |
prettier/prettier | 15,204 | prettier__prettier-15204 | [
"15208"
] | 892a1cfba6690a8fae154f307cd9079d2fe07c57 | diff --git a/src/language-js/print/assignment.js b/src/language-js/print/assignment.js
--- a/src/language-js/print/assignment.js
+++ b/src/language-js/print/assignment.js
@@ -205,7 +205,11 @@ function shouldBreakAfterOperator(path, options, print, hasShortKey) {
let node = rightNode;
const propertiesForPath = [];... | diff --git a/tests/format/js/assignment/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/assignment/__snapshots__/jsfmt.spec.js.snap
--- a/tests/format/js/assignment/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/format/js/assignment/__snapshots__/jsfmt.spec.js.snap
@@ -278,6 +278,104 @@ printWidth: 80
===============... | line breaks after assignment instead of between parentheses / around parameters
### Discussed in https://github.com/prettier/prettier/discussions/15196
<div type='discussions-op-text'>
<sup>Originally posted by **macgyver** August 1, 2023</sup>
Just wondering if anybody can explain the formatting philosophy of ... | 2023-08-03T13:52:21Z | 3.1 | [] | [
"tests/format/js/assignment/jsfmt.spec.js"
] | JavaScript | [] | [] | |
prettier/prettier | 15,256 | prettier__prettier-15256 | [
"15252"
] | c01661f311a2e1e033f1f9cb127882cc13e293bd | diff --git a/src/language-js/print/call-expression.js b/src/language-js/print/call-expression.js
--- a/src/language-js/print/call-expression.js
+++ b/src/language-js/print/call-expression.js
@@ -89,7 +89,8 @@ function isCommonsJsOrAmdCall(node, parentNode) {
}
if (node.callee.name === "require") {
- return t... | diff --git a/tests/format/js/require/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/require/__snapshots__/jsfmt.spec.js.snap
--- a/tests/format/js/require/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/format/js/require/__snapshots__/jsfmt.spec.js.snap
@@ -11,6 +11,19 @@ const { one1, two1, three1, four1, five1, six1... | Ugly format for `require()` call
**Prettier 3.0.0**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEcAeAHCAnGACSKAZ3wwBsBXAcwEso8BePbOARwppYAoqyIAjAIZkAdAGUAKgEEAcgBEpAGQDyMgKIAdengD8eDIJgALEQCsIdLgH0rAE05RBAWzgAaPBpAiRAehKCoW2FoODMiTwBKLTw8JH1DE3NLG3tsRxd3T29IiIBuLS10LFwCaBJ9Slp6Jis2Dm5eAWFxaXklVU... | 2023-08-17T10:31:12Z | 3.1 | [] | [
"tests/format/js/require/jsfmt.spec.js"
] | JavaScript | [] | [
"https://prettier.io/playground/#N4Igxg9gdgLgprEAuEcAeAHCAnGACSKAZ3wwBsBXAcwEso8BePbOARwppYAoqyIAjAIZkAdAGUAKgEEAcgBEpAGQDyMgKIAdengD8eDIJgALEQCsIdLgH0rAE05RBAWzgAaPBpAiRAehKCoW2FoODMiTwBKLTw8JH1DE3NLG3tsRxd3T29IiIBuLS10LFwCaBJ9Slp6Jis2Dm5eAWFxaXklVU1tPQNjMwsoazsHZzcPL19-QOCoUNNwkCjtOJ7E-sHU9NGskRzckFcQCAwYGjLkUEFs... | |
prettier/prettier | 15,286 | prettier__prettier-15286 | [
"15282"
] | 999c2c27506735f67dfd22e0d5d6c381dda209ee | diff --git a/src/language-js/parse/typescript.js b/src/language-js/parse/typescript.js
--- a/src/language-js/parse/typescript.js
+++ b/src/language-js/parse/typescript.js
@@ -40,7 +40,7 @@ function createParseError(error) {
});
}
-// https://typescript-eslint.io/architecture/parser/#jsx
+// https://typescript-esl... | diff --git a/tests/format/markdown/code/__snapshots__/jsfmt.spec.js.snap b/tests/format/markdown/code/__snapshots__/jsfmt.spec.js.snap
--- a/tests/format/markdown/code/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/format/markdown/code/__snapshots__/jsfmt.spec.js.snap
@@ -291,6 +291,33 @@ hello world
===================... | Prettier prints a trailing comma after type argument list even if the languages is `ts` in markdown
**Prettier 3.0.2**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEADdMDOAdKkqYwAExAvEQDwAqANAHwAUAlEaXUcAL4Dcu6quPhkwAPXPkIlWlWoxZsOnIahA0QEAA4wAltEzJQAQwBOxiAHcACiYT6UhgDbnDAT31qARscNgA1nBgAZUMAWzg... | 2023-08-23T13:53:05Z | 3.1 | [] | [
"tests/format/markdown/code/jsfmt.spec.js"
] | JavaScript | [] | [
"https://prettier.io/playground/#N4Igxg9gdgLgprEAuEADdMDOAdKkqYwAExAvEQDwAqANAHwAUAlEaXUcAL4Dcu6quPhkwAPXPkIlWlWoxZsOnIahA0QEAA4wAltEzJQAQwBOxiAHcACiYT6UhgDbnDAT31qARscNgA1nBgAZUMAWzgAGW0oOGQAM0dMOE9vPwDAjR8ogHNkGGMAVySQRJDtXIKizGyHOABFfIh4OISigCtRQOq6hqakeIdEtQBHHrhLMw07EENMAFpouAATJdUQPMNtB2yAYQgQkMNkaYcHVaqoLJqA... | |
prettier/prettier | 15,324 | prettier__prettier-15324 | [
"15314"
] | a35008fb0a010f92c1002ee074c6a7f3c0d8da41 | diff --git a/src/language-js/comments/handle-comments.js b/src/language-js/comments/handle-comments.js
--- a/src/language-js/comments/handle-comments.js
+++ b/src/language-js/comments/handle-comments.js
@@ -576,8 +576,8 @@ function handleLastFunctionArgComments({
precedingNode?.type === "AssignmentPattern" ||
... | diff --git a/tests/format/typescript/comments/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/comments/__snapshots__/jsfmt.spec.js.snap
--- a/tests/format/typescript/comments/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/format/typescript/comments/__snapshots__/jsfmt.spec.js.snap
@@ -694,6 +694,31 @@ export c... | Unstable comment location - after the last parameter property
<!--
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 exper... | Tip: We have <kbd>show second format</kbd> option in playgroud left panel. | 2023-08-29T08:37:09Z | 3.1 | [] | [
"tests/format/typescript/comments/jsfmt.spec.js"
] | JavaScript | [] | [
"https://prettier.io/playground/#N4Igxg9gdgLgprEAucAbAhgZ0wAgMIbY7AA6UOOkUmMATgK5gwS0AUZFnOADrQJYA3dPBy046ACbRUATx7pa6ALYAFWhCQ4AKjO5wANB04B6Y5QhKlCGEYCUxIwF8yjkPpARuMPtEzJQCuoA7ioKCH4o6KhB6DJ+7gBGimAA1nAwAMrKcAAyfFBwyABmUZgGIEnoqekZ3FX5AObIdPTlZUp8zQxtjahwAIr0EPDFpeUAVpgAHhm9A0MjSCWoZe4Ajgtwap4RIFgAtAVwEsduIHTofKi... |
prettier/prettier | 15,326 | prettier__prettier-15326 | [
"15325"
] | a35008fb0a010f92c1002ee074c6a7f3c0d8da41 | diff --git a/src/language-js/comments/handle-comments.js b/src/language-js/comments/handle-comments.js
--- a/src/language-js/comments/handle-comments.js
+++ b/src/language-js/comments/handle-comments.js
@@ -585,29 +585,20 @@ function handleLastFunctionArgComments({
return true;
}
+ // Comment between functio... | diff --git a/tests/format/js/comments/function/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/comments/function/__snapshots__/jsfmt.spec.js.snap
new file mode 100644
--- /dev/null
+++ b/tests/format/js/comments/function/__snapshots__/jsfmt.spec.js.snap
@@ -0,0 +1,78 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
... | Error when formatting anonymous export default function
**Prettier 3.0.2**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEcAeAHCAnGACAEzgDMBDAVwBt9jyowYBLaACgEoAdKAem7xgAWjAM54ReUnlr0m0LsC5482ODHLYoeACwAmLgF8QAGhAQMsqMOShS2bBADuABVsIrKUpQekAnlZMARtikYADWqgDKpAC2cAAyjFBwyGSUwnCBwWGRGCGJAObIMNjkGSDp... | 2023-08-29T09:35:00Z | 3.1 | [] | [
"tests/format/js/comments/function/jsfmt.spec.js"
] | JavaScript | [] | [
"https://prettier.io/playground/#N4Igxg9gdgLgprEAuEcAeAHCAnGACAEzgDMBDAVwBt9jyowYBLaACgEoAdKAem7xgAWjAM54ReUnlr0m0LsC5482ODHLYoeACwAmLgF8QAGhAQMsqMOShS2bBADuABVsIrKUpQekAnlZMARtikYADWqgDKpAC2cAAyjFBwyGSUwnCBwWGRGCGJAObIMNjkGSDp0YxFJWXCBZRwAIrkEPApnukmAFbCaBH1TS1tSKmdIACOQ3BO9hjuIKTCALRJcEQExiDFpIyUBQDCENHRpMgLlJSbd... | |
prettier/prettier | 15,400 | prettier__prettier-15400 | [
"15341"
] | f4491b1274d0697f38f9110116a7dd8d7c295e84 | diff --git a/src/language-markdown/clean.js b/src/language-markdown/clean.js
--- a/src/language-markdown/clean.js
+++ b/src/language-markdown/clean.js
@@ -48,6 +48,16 @@ function clean(ast, newObj, parent) {
newObj.label = collapseWhiteSpace(ast.label);
}
+ if (
+ (ast.type === "link" || ast.type === "ima... | diff --git a/tests/format/markdown/link/__snapshots__/jsfmt.spec.js.snap b/tests/format/markdown/link/__snapshots__/jsfmt.spec.js.snap
--- a/tests/format/markdown/link/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/format/markdown/link/__snapshots__/jsfmt.spec.js.snap
@@ -47,6 +47,83 @@ proseWrap: "always"
=============... | When prettier inserts <> characters in markdown links, it should encode existing <> characters too.
**Prettier 3.0.3**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEBtANgSygawLoAUAFjDAA4DOSA9NQO4MB0A5hBM+nIwGYBO1BAJTc2AWgB8AIwCGvQYwA6UEABoQEMjEzQKyULN4Q6ABVkJdKaejrSAnrrWTe0sDjgwAytIC2cADLYcMjcVhR... | 2023-09-14T17:46:47Z | 3.1 | [] | [
"tests/format/markdown/link/jsfmt.spec.js"
] | JavaScript | [] | [
"https://prettier.io/playground/#N4Igxg9gdgLgprEAuEBtANgSygawLoAUAFjDAA4DOSA9NQO4MB0A5hBM+nIwGYBO1BAJTc2AWgB8AIwCGvQYwA6UEABoQEMjEzQKyULN4Q6ABVkJdKaejrSAnrrWTe0sDjgwAytIC2cADLYcMjcVhRwjs6u7h5kLtjMyDC8AK7hIGHemIkpaRTxnACKyRDwwaFpAFYUAB4e+XBFJUFIIehhagCOxfDGhpTIINIUolBwcAAmE6ogSdKYWFDMAMIQ3t7SA1bo03mLnACCpLyYksk9cLwB... | |
prettier/prettier | 15,408 | prettier__prettier-15408 | [
"15315"
] | 675490ae55fe1c0b797db13bf5f055711d2c0b69 | diff --git a/src/language-js/embed/graphql.js b/src/language-js/embed/graphql.js
--- a/src/language-js/embed/graphql.js
+++ b/src/language-js/embed/graphql.js
@@ -107,7 +107,7 @@ function printGraphqlComments(lines) {
*/
function isGraphQL({ node, parent }) {
return (
- hasLanguageComment(node, "GraphQL") ||
+... | diff --git a/tests/format/flow/as-const/__snapshots__/jsfmt.spec.js.snap b/tests/format/flow/as-const/__snapshots__/jsfmt.spec.js.snap
new file mode 100644
--- /dev/null
+++ b/tests/format/flow/as-const/__snapshots__/jsfmt.spec.js.snap
@@ -0,0 +1,46 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`embedded.js... | /* GraphQL */ comment tag does not format with typescript `as const`
**Prettier 3.0.0**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuc0DOMAEAlA8gIVwBUBlAfQEUBVAUWwE0yB1ASSIAkyBhXAORKKYAvJgD0AKkwBxAE4BDAA4ALCgBlM40ZgAGAHSiZMARwCucGQE9MJTMExolEBZgC++7ZjlpMkKBgDc+vq+GDgExOTUdPTCYpKyiirqmjr6hqbmVjZ2D... | I don't think we need to support this.
@hanayashiki Hi, can you tell me why this is needed? Is there any meaning in adding `as const` to template literal in TypeScript?
> @hanayashiki Hi, can you tell me why this is needed? Is there any meaning in adding `as const` to template literal in TypeScript?
If you don't use... | 2023-09-16T08:56:24Z | 3.1 | [] | [
"tests/format/flow/as-const/jsfmt.spec.js",
"tests/format/typescript/as/jsfmt.spec.js"
] | JavaScript | [] | [
"https://prettier.io/playground/#N4Igxg9gdgLgprEAuc0DOMAEAlA8gIVwBUBlAfQEUBVAUWwE0yB1ASSIAkyBhXAORKKYAvJgD0AKkwBxAE4BDAA4ALCgBlM40ZgAGAHSiZMARwCucGQE9MJTMExolEBZgC++7ZjlpMkKBgDc+vq+GDgExOTUdPTCYpKyiirqmjr6hqbmVjZ2Dk6u7oFQIAA0IE4wAJboyKByMjIQAO4ACnUIaMggcgA2jXIWHaUARvJgANZwMCRyALZwqhVQcMgAZj1ocMOjE1MKcmCLAObIMDJmpRs... |
prettier/prettier | 15,409 | prettier__prettier-15409 | [
"11910"
] | 675490ae55fe1c0b797db13bf5f055711d2c0b69 | diff --git a/src/language-js/comments/handle-comments.js b/src/language-js/comments/handle-comments.js
--- a/src/language-js/comments/handle-comments.js
+++ b/src/language-js/comments/handle-comments.js
@@ -84,6 +84,7 @@ function handleEndOfLineComment(context) {
handleVariableDeclaratorComments,
handleBreakA... | diff --git a/tests/format/flow/union/__snapshots__/jsfmt.spec.js.snap b/tests/format/flow/union/__snapshots__/jsfmt.spec.js.snap
--- a/tests/format/flow/union/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/format/flow/union/__snapshots__/jsfmt.spec.js.snap
@@ -22,6 +22,37 @@ const myValue = (callcallcallcallcallcall(
==... | Last indented list item inline comment is being moved to outer comment and combined with existing comment
**Prettier 2.5.0**
[Playground link](https://prettier.io/playground/?source=post_page---------------------------#N4Igxg9gdgLgprEAuEB6VACAKgTwA5wDKYATgJZ4wZmxwkBmAhmHADpQ3wPNzYAWNAOYBGDMHasYjaUgwAKCTEkAfDAHIYAqCLUZ... | This is still happening in the latest version of Prettier, has anyone started looking into this?
Another half year later, and it appears that this issue is *still* happening!!! | 2023-09-16T09:48:18Z | 3.1 | [] | [
"tests/format/typescript/union/jsfmt.spec.js",
"tests/format/flow/union/jsfmt.spec.js"
] | JavaScript | [] | [
"https://prettier.io/playground/?source=post_page---------------------------#N4Igxg9gdgLgprEAuEB6VACAKgTwA5wDKYATgJZ4wZmxwkBmAhmHADpQ3wPNzYAWNAOYBGDMHasYjaUgwAKCTEkAfDAHIYAqCLUZ0GAMIQAtsYQxhiles1CATLv1HT5u4oCUAbQC6Abj2YAGI0jAA2GJAusOwAviAANCAQlGTQAM7IoIwkJBAA7gAK2QgZKGF5jDgZiQBGJMwA1nAwhIxmADI0cMhMoWlwtfVgTS14zELIM... |
prettier/prettier | 15,411 | prettier__prettier-15411 | [
"15410"
] | 4169dbb871f29023fdb8ed4594c7bb19a758771e | diff --git a/src/language-markdown/print-whitespace.js b/src/language-markdown/print-whitespace.js
--- a/src/language-markdown/print-whitespace.js
+++ b/src/language-markdown/print-whitespace.js
@@ -47,7 +47,7 @@ const noBreakAfter = new Set(
* `"ๆชๅๆ๏ผใฒใฎใฏใใใ๏ผ\nไปฅๅคใซใฏใ"`
*/
const noBreakBefore = new Set(
- "!... | diff --git a/tests/format/markdown/splitCjkText/__snapshots__/jsfmt.spec.js.snap b/tests/format/markdown/splitCjkText/__snapshots__/jsfmt.spec.js.snap
--- a/tests/format/markdown/splitCjkText/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/format/markdown/splitCjkText/__snapshots__/jsfmt.spec.js.snap
@@ -17,7 +17,10 @@ pr... | Markdown: Don't split lines between Japanese kana & COMBINING KATAKANA-HIRAGANA (SEMI-)VOICED SOUND MARK
<!--
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 alr... | 2023-09-16T14:20:33Z | 3.1 | [] | [
"tests/format/markdown/splitCjkText/jsfmt.spec.js"
] | JavaScript | [] | [
"https://prettier.io/playground/#.....",
"https://prettier.io/playground"
] | |
prettier/prettier | 15,433 | prettier__prettier-15433 | [
"15155",
"15079"
] | b37a120ab6459f25218b411baab66ee73de02af9 | diff --git a/src/cli/expand-patterns.js b/src/cli/expand-patterns.js
--- a/src/cli/expand-patterns.js
+++ b/src/cli/expand-patterns.js
@@ -11,22 +11,24 @@ async function* expandPatterns(context) {
const seen = new Set();
let noResults = true;
- for await (const pathOrError of expandPatternsInternal(context)) {... | diff --git a/tests/integration/__tests__/__snapshots__/ignore-unknown.js.snap b/tests/integration/__tests__/__snapshots__/ignore-unknown.js.snap
--- a/tests/integration/__tests__/__snapshots__/ignore-unknown.js.snap
+++ b/tests/integration/__tests__/__snapshots__/ignore-unknown.js.snap
@@ -18,25 +18,35 @@ exports[`Not ... | Load plugins from `.prettierrc` when initializing CLI context
## Description
<!-- Please provide a brief summary of your changes: -->
Fixes #15079
## Checklist
<!-- Please ensure youโve done all of these things (if applicable). -->
<!-- You can replace the `[ ]` with `[x]` to mark each task as done. -->
... |
It's a known issue, are you sure it works in v2?
@fisker I tried @devcrev's reproduction at https://github.com/devcrev/p-sh-old, it works on v2.
```log
> p-sh-old@1.0.0 format
> prettier --check .
Checking formatting...
[warn] level-0/go.sh
[warn] level-0/hello.sh
[warn] level-0/level-1/another.sh
[warn] l... | 2023-09-19T14:49:48Z | 3.1 | [] | [
"tests/integration/__tests__/patterns-dirs.js",
"tests/integration/__tests__/infer-plugins-ext-dir.js",
"tests/integration/__tests__/ignore-unknown.js"
] | JavaScript | [] | [
"https://prettier.io/playground-redirect"
] |
prettier/prettier | 15,467 | prettier__prettier-15467 | [
"15396",
"15396"
] | c140ed6b5354bc64d15f33eb9fbaa2571a375aa1 | diff --git a/src/cli/format.js b/src/cli/format.js
--- a/src/cli/format.js
+++ b/src/cli/format.js
@@ -437,7 +437,7 @@ async function formatFiles(context) {
} else if (!context.argv.check && !context.argv.listDifferent) {
const message = `${chalk.grey(fileNameToDisplay)} ${
Date.now() - start... | diff --git a/tests/integration/__tests__/__snapshots__/line-after-filepath-with-errors.js.snap b/tests/integration/__tests__/__snapshots__/line-after-filepath-with-errors.js.snap
--- a/tests/integration/__tests__/__snapshots__/line-after-filepath-with-errors.js.snap
+++ b/tests/integration/__tests__/__snapshots__/line-... | `--write` to show text identifier for unchanged files ('grey color only' an accessibility concern ๐งโ๐ฆฏ)
The output of `--write` can't distinguish between changed and unchanged text if color is not visible.
### Suggestion: Distinguish using text.
Consider that the use of color to distinguish changed vs unchanged ... | I agree with giving `(unchanged)` to output for accessibility.
I agree with giving `(unchanged)` to output for accessibility. | 2023-09-27T16:24:28Z | 3.1 | [] | [
"tests/integration/__tests__/line-after-filepath-with-errors.js",
"tests/integration/__tests__/write.js"
] | JavaScript | [] | [] |
prettier/prettier | 15,472 | prettier__prettier-15472 | [
"8352"
] | b78d7c7d2d9889252211abc69fffef71f02f741a | diff --git a/src/language-css/printer-postcss.js b/src/language-css/printer-postcss.js
--- a/src/language-css/printer-postcss.js
+++ b/src/language-css/printer-postcss.js
@@ -224,7 +224,9 @@ function genericPrint(path, options, print) {
// If a Less file ends up being parsed with the SCSS parser, Less
... | diff --git a/tests/format/js/multiparser-css/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/multiparser-css/__snapshots__/jsfmt.spec.js.snap
--- a/tests/format/js/multiparser-css/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/format/js/multiparser-css/__snapshots__/jsfmt.spec.js.snap
@@ -363,6 +363,48 @@ export const... | CSS selectors must not be lowercased in styled-components that reference other
**Prettier 2.0.5**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuc0DOMAEBlGBPAGzgBMBhCAWwAdoEsBeTDQkgOmIEsA3AAwB0omTBQCGAJwDmHKAFoxHCQAsYSTDIAsVAB4BuAQKEASYOVgjpcMQF9WHNAFEtVEVGIlMAMkzADQzDDEXNAAzCDEKVTEIGBF4AAoZAEYADgA... | This is the case with parser @typescript-eslint as well. Probably also with just eslint.
Can confirm with `typescript-eslint`, thought maybe I had the syntax wrong at first.
Going to use `/* prettier-ignore */` for now.
bump. this issue arose for my styled-components heavy project when upgrading `eslint-config-pret... | 2023-09-28T03:53:49Z | 3.1 | [] | [
"tests/format/js/multiparser-css/jsfmt.spec.js"
] | JavaScript | [] | [
"https://prettier.io/playground/#N4Igxg9gdgLgprEAuc0DOMAEBlGBPAGzgBMBhCAWwAdoEsBeTDQkgOmIEsA3AAwB0omTBQCGAJwDmHKAFoxHCQAsYSTDIAsVAB4BuAQKEASYOVgjpcMQF9WHNAFEtVEVGIlMAMkzADQzDDEXNAAzCDEKVTEIGBF4AAoZAEYADgAGNwkASj1BTCsBHh0QABoQCCoYDnRkUHEogHcABXEENGQQEQJ6kTw20oAjQLAAazgYbGcwaQlkAIBXOFLlCgIAdUUOeDRJuGxWze5NvHawND6QaTR... |
prettier/prettier | 15,525 | prettier__prettier-15525 | [
"15284"
] | 427a84d24203e2d54160cde153a1e6a6390fe65a | diff --git a/src/language-js/utils/index.js b/src/language-js/utils/index.js
--- a/src/language-js/utils/index.js
+++ b/src/language-js/utils/index.js
@@ -6,6 +6,7 @@ import isNextLineEmptyAfterIndex from "../../utils/is-next-line-empty.js";
import getStringWidth from "../../utils/get-string-width.js";
import { locSt... | diff --git a/tests/format/js/strings/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/strings/__snapshots__/jsfmt.spec.js.snap
--- a/tests/format/js/strings/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/format/js/strings/__snapshots__/jsfmt.spec.js.snap
@@ -1,5 +1,51 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
+e... | Prettier formatting is inconsistent when using escaping in string
**Prettier 3.0.3**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEcAeAHCAnGACSKAZ3wFkBlAcQH1KBRAOToCUBJAYWoHkAFFgQQAqrLg2oAxfqwAyAVWZ1qAIS4ARAJp4AvAB0oeAwHMIEQwDpDcGKSKGAFAHJBACwCGMHTodE8rgDZ+eADucHgA1lAQQQ4AlADcIAA0IBAYMACW0ETIoK7Y... | Note that the first snippet has a That's which contains a "\'" to escape the apostrophe
Please follow the issue template.
This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we... | 2023-10-20T08:13:02Z | 3.1 | [] | [
"tests/format/js/strings/jsfmt.spec.js"
] | JavaScript | [] | [
"https://prettier.io/playground/#N4Igxg9gdgLgprEAuEcAeAHCAnGACSKAZ3wFkBlAcQH1KBRAOToCUBJAYWoHkAFFgQQAqrLg2oAxfqwAyAVWZ1qAIS4ARAJp4AvAB0oeAwHMIEQwDpDcGKSKGAFAHJBACwCGMHTodE8rgDZ+eADucHgA1lAQQQ4AlADcIAA0IBAYMACW0ETIoK7Y2FE8eQjZKP5BrgCe2ckARtiuYGFW5K4AtnDS6VBwyABm-kRwdQ1NLRiN3YbIMNgArsMgQ23pM-OLRFN+cACKcxDw-YOLAFZEaOR... |
prettier/prettier | 15,547 | prettier__prettier-15547 | [
"15534"
] | e682577c08e83c0ab272fc73ad1633883ad5d1a5 | diff --git a/src/language-js/print/assignment.js b/src/language-js/print/assignment.js
--- a/src/language-js/print/assignment.js
+++ b/src/language-js/print/assignment.js
@@ -141,11 +141,13 @@ function chooseLayout(path, options, print, leftDoc, rightPropertyName) {
return "never-break-after-operator";
}
+ c... | diff --git a/tests/format/angular/angular/__snapshots__/jsfmt.spec.js.snap b/tests/format/angular/angular/__snapshots__/jsfmt.spec.js.snap
--- a/tests/format/angular/angular/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/format/angular/angular/__snapshots__/jsfmt.spec.js.snap
@@ -1147,7 +1147,8 @@ printWidth: 1
(targe... | Assignment of template literal to indexed access property causes odd formatting
I noticed today that assigning a template literal string to an indexed access property of an object can lead to odd formatting where the property access is broken into many lines.
This does not happen if 1) dot property access is used in... | As a temporary solution do `params.redirectTo`. Might be short enough to wrap around | 2023-10-27T12:27:58Z | 3.1 | [] | [
"tests/format/angular/angular/jsfmt.spec.js",
"tests/format/js/assignment/jsfmt.spec.js"
] | JavaScript | [] | [
"https://prettier.io/playground/#N4Igxg9gdgLgprEAuEAHAhgJ3QWwM4DaAOiJnACYCWZYMAKhCQLoAEAvCwAYAkwA7pSjkIfAHQAbCGHQxK0URhgALKLjgBfXgKEiJUmXKii8cLGCWb+g4WMnTZ8pejwXOAbhAAaEBFQOoeMigWJgiAApYCIEo6OJ86ACegd4ARthgANZwMADKagAygnDIAGaxJqnpWbkYYIIA5sgwmACucN4mOJRNre0geA3icACKLRDwpeV9AFZ4AB45gyNjE0hl4hUgAI4rcGGhqNEgzgC0UHAUFF... |
prettier/prettier | 15,605 | prettier__prettier-15605 | [
"14207",
"14737"
] | 1a00467677fe97d40409e646152ed8b60b4b7da5 | diff --git a/src/language-handlebars/printer-glimmer.js b/src/language-handlebars/printer-glimmer.js
--- a/src/language-handlebars/printer-glimmer.js
+++ b/src/language-handlebars/printer-glimmer.js
@@ -366,7 +366,7 @@ function print(path, options, print) {
];
}
case "PathExpression":
- return nod... | diff --git a/tests/format/handlebars/path-expressions/__snapshots__/jsfmt.spec.js.snap b/tests/format/handlebars/path-expressions/__snapshots__/jsfmt.spec.js.snap
new file mode 100644
--- /dev/null
+++ b/tests/format/handlebars/path-expressions/__snapshots__/jsfmt.spec.js.snap
@@ -0,0 +1,119 @@
+// Jest Snapshot v1, ht... | Handlebars / Glimmer: Square brackets removed from array index - causes SyntaxError
**Prettier 2.8.3**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuExgAc4XQGzgOgG0BGAXXygEMBbOAXzoB0o1Ns8iyGQAaEbGAEtoAZ2ShKAJ0kQA7gAUpCMSko5ZlAJ5i+AI0mUwAazgwAyjTgAZQVDjIAZmpFw9B46bPpDtgObIYSQBXVxA4al04ABMo6KtKKF8... | Hi guys! Can I work on this?
I assume we need to change this file (Not sure which function we need to change yet)
https://github.com/prettier/prettier/blob/main/src/language-handlebars/printer-glimmer.js
@shogohida Still interested? Related code should be here https://github.com/prettier/prettier/blob/ddf3b43c33e2e... | 2023-11-08T20:36:02Z | 3.1 | [] | [
"tests/format/handlebars/path-expressions/jsfmt.spec.js"
] | JavaScript | [] | [
"https://prettier.io/playground/#N4Igxg9gdgLgprEAuExgAc4XQGzgOgG0BGAXXygEMBbOAXzoB0o1Ns8iyGQAaEbGAEtoAZ2ShKAJ0kQA7gAUpCMSko5ZlAJ5i+AI0mUwAazgwAyjTgAZQVDjIAZmpFw9B46bPpDtgObIYSQBXVxA4al04ABMo6KtKKF8gyl84ADEISWpKGCFE5BBKIJgIXhAACxhqHAB1csF4EW8wODNlBsEANwbNArARHRBbF0kYeQNfbMdnUIArEQAPMz88AEUgiHhpnBc+b0kRgt8cQWpaSTL0SV... |
prettier/prettier | 15,606 | prettier__prettier-15606 | [
"14991"
] | 811eb0a08505c2a1aad4ef9dfae6db8065063dd5 | diff --git a/src/language-html/clean.js b/src/language-html/clean.js
--- a/src/language-html/clean.js
+++ b/src/language-html/clean.js
@@ -12,6 +12,14 @@ const ignoredProperties = new Set([
"valueTokens",
]);
+const embeddedAngularControlFlowBlocks = new Set([
+ "if",
+ "else if",
+ "for",
+ "switch",
+ "cas... | diff --git a/tests/format/angular/control-flow/__snapshots__/jsfmt.spec.js.snap b/tests/format/angular/control-flow/__snapshots__/jsfmt.spec.js.snap
new file mode 100644
--- /dev/null
+++ b/tests/format/angular/control-flow/__snapshots__/jsfmt.spec.js.snap
@@ -0,0 +1,551 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+... | Support for the new Angular Control Flow Syntax
Angular is introducing a new control flow syntax in it's [RFC](https://github.com/angular/angular/discussions/50719).
I'm opening this issue in order to track the support for it in the prettier formatter.
Because the new sytanx follows the svelte syntax a lot, I bel... | Update: Angular choose to go with @-syntax for the control flow.
https://blog.angular.io/meet-angulars-new-control-flow-a02c6eee7843
Thanks for opening this. With v17 right around the corner, I hope this gets some love in time.
To provide some concrete dates: the Angular v17 release candidate will be mid-October,... | 2023-11-09T03:11:12Z | 3.1 | [] | [
"tests/unit/visitor-keys.js",
"tests/format/angular/control-flow/embedded-language-formatting-off/jsfmt.spec.js",
"tests/format/angular/control-flow/small-print-width/jsfmt.spec.js",
"tests/format/angular/control-flow/jsfmt.spec.js"
] | JavaScript | [] | [] |
prettier/prettier | 15,708 | prettier__prettier-15708 | [
"15707"
] | bb4ad267738918a3fd823ea018598337f3a19fed | diff --git a/src/language-js/comments/handle-comments.js b/src/language-js/comments/handle-comments.js
--- a/src/language-js/comments/handle-comments.js
+++ b/src/language-js/comments/handle-comments.js
@@ -62,6 +62,7 @@ function handleOwnLineComment(context) {
handleLabeledStatementComments,
handleBreakAndCo... | diff --git a/tests/format/typescript/comments/15707.ts b/tests/format/typescript/comments/15707.ts
new file mode 100644
--- /dev/null
+++ b/tests/format/typescript/comments/15707.ts
@@ -0,0 +1,55 @@
+const {
+ foo,
+ // bar
+ // baz
+}: Foo = expr;
+
+const {
+ foo1,
+ // bar
+ foo2,
+ // baz
+}: Foo = expr;
+
+... | Object destructuring in parameters with type and comments results in non-stable format loop
**Prettier 3.1.0**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEAdKcAeAHCAnGAAgBM4AzAQwFcAbIsGigZycIDEIJDh1DDIoTGHipgY+ABTBCvPoTKcANLL4B6VYQBGFPIQC8MkNryoQyqHMLqtFAF639h7fdPm+AXyTtOASSgBLGABKbnd0dzMQCGwYf... | 2023-11-23T14:00:08Z | 3.2 | [] | [
"tests/format/typescript/comments/jsfmt.spec.js"
] | JavaScript | [] | [
"https://prettier.io/playground/#N4Igxg9gdgLgprEAuEAdKcAeAHCAnGAAgBM4AzAQwFcAbIsGigZycIDEIJDh1DDIoTGHipgY+ABTBCvPoTKcANLL4B6VYQBGFPIQC8MkNryoQyqHMLqtFAF639h7fdPm+AXyTtOASSgBLGABKbnd0dzMQCGwYf2gmZFAdPAgAdwAFHQQElAoaVIoATwTFIzwKMABrOBgAZQoAWzgAGX8MZEoaJjhSzXKqmtrsCraAc2RhKh6Qbob-CZFprGw4PH8m2DyAFVWoHX84HM7u0qYxmjgARS... | |
prettier/prettier | 15,748 | prettier__prettier-15748 | [
"15738"
] | 56408635eb01002940513e89fa5e8d9c98c9a5af | diff --git a/src/language-html/print/children.js b/src/language-html/print/children.js
--- a/src/language-html/print/children.js
+++ b/src/language-html/print/children.js
@@ -7,6 +7,8 @@ import {
hardline,
} from "../../document/builders.js";
import { replaceEndOfLine } from "../../document/utils.js";
+import isNo... | diff --git a/tests/format/html/prettier_ignore/__snapshots__/jsfmt.spec.js.snap b/tests/format/html/prettier_ignore/__snapshots__/jsfmt.spec.js.snap
--- a/tests/format/html/prettier_ignore/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/format/html/prettier_ignore/__snapshots__/jsfmt.spec.js.snap
@@ -117,6 +117,60 @@ prin... | Prettier removes unterminated HTML tag & content
<details><summary>old text</summary>
**Prettier 3.1.0**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEAeAFnAhgEwHyoD0mueAOlKgDYCWUA1hQARMBOcVAvGSAM4wBPKnF6Y4MHsybp2AM24h0MGAAdeSQoTA4oAOgBWvHBxoA3VrqjjCUFQFtCAdyzwLYXrwACAJkIQArjBOLnBuHpJQhOSU-EJw... | 2023-12-04T15:11:14Z | 3.2 | [] | [
"tests/format/html/prettier_ignore/jsfmt.spec.js"
] | JavaScript | [] | [
"https://prettier.io/playground/#N4Igxg9gdgLgprEAuEAeAFnAhgEwHyoD0mueAOlKgDYCWUA1hQARMBOcVAvGSAM4wBPKnF6Y4MHsybp2AM24h0MGAAdeSQoTA4oAOgBWvHBxoA3VrqjjCUFQFtCAdyzwLYXrwACAJkIQArjBOLnBuHpJQhOSU-EJweHZYrPRwOAC0djhIUBAwABRIxrJ0qQCUTMBMODS8KlRYAkhMOVZMAL5EscLRqLxgrDQqMEyCKnAKdhA4-sI8TLysYAq6uoRYgRAGvDwEhH0DQz0AhGlpTCrsyj... | |
prettier/prettier | 15,756 | prettier__prettier-15756 | [
"7912"
] | 4c3cfa7a813e072ae4f581ecf6c5b27ebb063f15 | diff --git a/src/language-js/print/module.js b/src/language-js/print/module.js
--- a/src/language-js/print/module.js
+++ b/src/language-js/print/module.js
@@ -148,7 +148,7 @@ function printModuleSource(path, options, print) {
/** @type{Doc[]} */
const parts = [];
- if (!shouldNotPrintSpecifiers(node, options))... | diff --git a/tests/format/js/import/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/import/__snapshots__/jsfmt.spec.js.snap
--- a/tests/format/js/import/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/format/js/import/__snapshots__/jsfmt.spec.js.snap
@@ -286,9 +286,92 @@ printWidth: 80
... | Curly braces and `from` keyword stripped off of `import` statements
**Prettier 2.0.2**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEB6VACA7hATgawGcAdKASwFsAHPGDYAXwwDNcIKMByQ9uGACzJQA5p1Kl0GAEa44AQyKlKNXHWAZUAKgyQKFBHU2Ymrdlx76AtFTlh8c4XDFQJmGfKIYYECEuq16UgwNTABhdn1YUhM2Dm5eDAgBOAwbOwcnEAAaEAgqG... | Strictly speaking, this doesn't break code. Still, better to fix it.
@thorn0 I'm trying to fix this, do you know is there token info in those parser? I can't find anything. We have to use source code? https://github.com/prettier/prettier/blob/aeeb2ff7a8231e2f3a0b2474fd35b4419fe0d97a/src/language-js/printer-estree.js#L1... | 2023-12-05T07:52:55Z | 3.2 | [] | [
"tests/format/js/import/jsfmt.spec.js",
"tests/format/typescript/import-export/jsfmt.spec.js"
] | JavaScript | [] | [
"https://prettier.io/playground/#N4Igxg9gdgLgprEAuEB6VACA7hATgawGcAdKASwFsAHPGDYAXwwDNcIKMByQ9uGACzJQA5p1Kl0GAEa44AQyKlKNXHWAZUAKgyQKFBHU2Ymrdlx76AtFTlh8c4XDFQJmGfKIYYECEuq16UgwNTABhdn1YUhM2Dm5eDAgBOAwbOwcnEAAaEAgqGDJoQmRQOVw2LAAFMoRilDkANwgyABNskBlbfD4AZTShYWQYXABXOBz+GAoAGwB1QXhCNLge2rIChvWAT2RwQmKcoUI4VUrcBwo5ZG... |
prettier/prettier | 15,806 | prettier__prettier-15806 | [
"15785"
] | 66a23c9331e2c652f8e08fd05a65d2bea7fe5c1a | diff --git a/src/language-js/print/call-expression.js b/src/language-js/print/call-expression.js
--- a/src/language-js/print/call-expression.js
+++ b/src/language-js/print/call-expression.js
@@ -61,7 +61,11 @@ function printCallExpression(path, options, print) {
!isDynamicImport &&
!isNew &&
isMemberish(... | diff --git a/tests/format/js/chain-expression/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/chain-expression/__snapshots__/jsfmt.spec.js.snap
--- a/tests/format/js/chain-expression/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/format/js/chain-expression/__snapshots__/jsfmt.spec.js.snap
@@ -1,5 +1,86 @@
// Jest Sna... | Different output for optional call/member expression using `typescript` parser vs `babel` and `babel-ts`
**Prettier 3.1.1**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEB6VACAwgQQMoCiGAjEgDpToYByEATgLYCGANhgEZwAWTAbgJb0ANBhhc4GAAb8AzgQCOAV1aSMYVm3Z04TANYyAdBQBmiqGBiCoGGRAZwAYmYtXqTewAoKGG3bgAZaA... | As an additional note, it looks like the parser hierarchy is set up to prefer `typescript` first and then use `babel-ts` otherwise: https://github.com/prettier/prettier/blob/c1ebae2e8303841e59bc02e9e719a93e964ab0e9/src/language-js/languages.evaluate.js#L61.
I wonder if preferring `babel-ts` first would make sense, t... | 2023-12-15T05:58:37Z | 3.2 | [] | [
"tests/format/js/chain-expression/jsfmt.spec.js",
"tests/format/typescript/chain-expression/jsfmt.spec.js"
] | JavaScript | [] | [
"https://prettier.io/playground/#N4Igxg9gdgLgprEAuEB6VACAwgQQMoCiGAjEgDpToYByEATgLYCGANhgEZwAWTAbgJb0ANBhhc4GAAb8AzgQCOAV1aSMYVm3Z04TANYyAdBQBmiqGBiCoGGRAZwAYmYtXqTewAoKGG3bgAZaABzACFtPX4oIIAFJjp3OHg6N3shbwwmKAgxODpAqNj4+ySUuDSoAEoMYHTtGEU6a1kFZRYPJgNmAAcPDwBtGBEAfQBdKoBeAD5RAH4DfgATCpF2TqYe-sGMUYnpmDnFioqAbgoAXwoK... |
prettier/prettier | 15,826 | prettier__prettier-15826 | [
"15168",
"13677"
] | ff9c0839ac618f0cdd10462bfd1d380da43d52e6 | diff --git a/src/language-js/comments/handle-comments.js b/src/language-js/comments/handle-comments.js
--- a/src/language-js/comments/handle-comments.js
+++ b/src/language-js/comments/handle-comments.js
@@ -21,7 +21,6 @@ import {
isObjectProperty,
isPrettierIgnoreComment,
isUnionType,
- markerForIfWithoutBloc... | diff --git a/tests/config/format-test.js b/tests/config/format-test.js
--- a/tests/config/format-test.js
+++ b/tests/config/format-test.js
@@ -46,6 +46,7 @@ const unstableTests = new Map(
"jsx/comments/in-attributes.js",
["js/ignore/semi/asi.js", (options) => options.semi === false],
"typescript/union/co... | Comment in `IfStatement` not printed.
**Prettier 3.0.0**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEAzArlMMCW0AEAhgBQCU+wAOlPvjqvsYeQG6EBO+Y+AvPgIz4A9ACouEALYSEMfADZC+EUIDc1WnAA2AZzj52cGOnY0ATGqgBfEABoQEAA65o25KA7sIAdwAKHBK4ohJpehACernYARuyEYADWhgDKhNIAMjhQcMiowbrRsQnJDnGZAObIMOzocHa6EjiV1bUg2... | Same problem with version 3.0.0 in the following **TypeScript** snippet:
```
for (const division of collidingDivisions) {
if (!division.properties.canRemove) {
if (division.canContainSingleParagraph(startParagraph)) continue; // selection starting in r/o div: always OK to delete
else if (endParagraph !== divi... | 2023-12-18T11:47:49Z | 3.2 | [] | [
"tests/format/js/if/jsfmt.spec.js"
] | JavaScript | [] | [
"https://prettier.io/playground-redirect",
"https://prettier.io/playground/#N4Igxg9gdgLgprEAuEAzArlMMCW0AEAhgBQCU+wAOlPvjqvsYeQG6EBO+Y+AvPgIz4A9ACouEALYSEMfADZC+EUIDc1WnAA2AZzj52cGOnY0ATGqgBfEABoQEAA65o25KA7sIAdwAKHBK4ohJpehACernYARuyEYADWhgDKhNIAMjhQcMiowbrRsQnJDnGZAObIMOzocHa6EjiV1bUg2uWacACK6BDwOXktAFbaAB5J7V0... |
prettier/prettier | 15,827 | prettier__prettier-15827 | [
"15810"
] | 66a23c9331e2c652f8e08fd05a65d2bea7fe5c1a | diff --git a/src/language-html/print/angular-control-flow-block.js b/src/language-html/print/angular-control-flow-block.js
--- a/src/language-html/print/angular-control-flow-block.js
+++ b/src/language-html/print/angular-control-flow-block.js
@@ -6,6 +6,7 @@ import {
line,
softline,
} from "../../document/builde... | diff --git a/tests/format/angular/control-flow/__snapshots__/jsfmt.spec.js.snap b/tests/format/angular/control-flow/__snapshots__/jsfmt.spec.js.snap
--- a/tests/format/angular/control-flow/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/format/angular/control-flow/__snapshots__/jsfmt.spec.js.snap
@@ -426,6 +426,48 @@ topS... | Angular block syntax + prettier-ignore prints extra closing brace
**Prettier 3.1.1**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEAeAhAWkwAgA4BOcMMAlnAZqQOZQRE7YB8AOlAAKkBmOAFJFAAmpMtACUOYGxw4AYhAhsAvjnZwANgGc4k6TgDyMABYVlIADQgIeUVE3JQAQwIEIAdwAKzhPZSP1bo4AnvaWAEYEjmAA1sQAyo4AtnAAMqRQcMhc-trhkTH... | 2023-12-18T13:05:40Z | 3.2 | [] | [
"tests/format/angular/control-flow/jsfmt.spec.js"
] | JavaScript | [] | [
"https://prettier.io/playground/#N4Igxg9gdgLgprEAuEAeAhAWkwAgA4BOcMMAlnAZqQOZQRE7YB8AOlAAKkBmOAFJFAAmpMtACUOYGxw4AYhAhsAvjnZwANgGc4k6TgDyMABYVlIADQgIeUVE3JQAQwIEIAdwAKzhPZSP1bo4AnvaWAEYEjmAA1sQAyo4AtnAAMqRQcMhc-trhkTHxeFHp1MgwBACucJbaiaRlldUgcAAeeBSkybD+ACoUUM7kvtlaTZol6nAAihUQ8Fk5TQBWmi1xE9Oz80gjuSAAjltwHq54viCOmp... | |
prettier/prettier | 15,870 | prettier__prettier-15870 | [
"14234"
] | 3a90b356530f713917240650f59289ddf303909f | diff --git a/src/language-graphql/printer-graphql.js b/src/language-graphql/printer-graphql.js
--- a/src/language-graphql/printer-graphql.js
+++ b/src/language-graphql/printer-graphql.js
@@ -384,7 +384,7 @@ function genericPrint(path, options, print) {
" =",
ifBreak("", " "),
... | diff --git a/tests/format/graphql/union-types/__snapshots__/jsfmt.spec.js.snap b/tests/format/graphql/union-types/__snapshots__/jsfmt.spec.js.snap
--- a/tests/format/graphql/union-types/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/format/graphql/union-types/__snapshots__/jsfmt.spec.js.snap
@@ -16,6 +16,8 @@ union myThi... | Improve GraphQL union types formatting
I think we can make consistency for printing union types (`|`) between TS and Gql. What do you think?
**Prettier 2.8.3**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEBXKBLaACAynAQwCcwALAJTgGdUAbGbAXgB0oAfbAYWgDM4iEYOBwBi1GBgBuBWtg7coQogw4A1BKjhyuvfoOHYxV... | HI @sosukesuzuki - can you please assigned this to me ? this will be my first contribution to prettier library :)
@ArchitGajjar Go ahead!
@sosukesuzuki - I made some changes and execute below commands.
> yarn build:website
> cd website/playground
> npm run start
Here, I'm seeing my changes are not reflecte... | 2024-01-03T08:56:40Z | 3.2 | [] | [
"tests/format/graphql/union-types/jsfmt.spec.js"
] | JavaScript | [] | [
"https://prettier.io/playground/#N4Igxg9gdgLgprEAuEBXKBLaACAynAQwCcwALAJTgGdUAbGbAXgB0oAfbAYWgDM4iEYOBwBi1GBgBuBWtg7coQogw4A1BKjhyuvfoOHYxVCdNnzoSldnVRNrEABoQEAA4ToVZKGJEIAdwAFYgRPFBk-AgBPTycAIyICMABrOBhcAgBbOAAZDCg4ZB4ZKjg4hOTU3BdEvIBzZBgiTSc4DNi4ABMOzuyCKFrUAlq4EQgiDIIYCX7kEAJUGAhHEFIYDNoAdVIMeCpqoXwoKh2pHcjZsCoY... |
prettier/prettier | 15,887 | prettier__prettier-15887 | [
"15784"
] | e9b8764fc4c770aaa8e5d9b982bda40a83a4cf2a | diff --git a/src/language-js/print/angular.js b/src/language-js/print/angular.js
--- a/src/language-js/print/angular.js
+++ b/src/language-js/print/angular.js
@@ -66,7 +66,7 @@ function printAngular(path, options, print) {
(node.key.name === "then" ||
node.key.name === "else" ||
nod... | diff --git a/tests/format/angular/control-flow/__snapshots__/jsfmt.spec.js.snap b/tests/format/angular/control-flow/__snapshots__/jsfmt.spec.js.snap
--- a/tests/format/angular/control-flow/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/format/angular/control-flow/__snapshots__/jsfmt.spec.js.snap
@@ -285,6 +285,12 @@ item... | Prettier adds a colon after 'track'
**Prettier 3.1.1**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEBLAtgBwgJxgAmHwGEALAQygHM4AROeMGVaAZRh3PioE8AaEhCzQEBAL74AZjiH4AOiAAClKgFcANuRwB6SDjgKA3HKgZseQvgCqsVOvoBnDhB74J02QsXUocLttVbdQBaABM4JxkeIxMTRRtmewjnHgAKAEo44iFsX1hU4BN8fDAKajoGOCYWKCQSMpp6RmY2Di4... | 2024-01-07T14:25:43Z | 3.2 | [] | [
"tests/format/angular/control-flow/jsfmt.spec.js"
] | JavaScript | [] | [
"https://prettier.io/playground/#N4Igxg9gdgLgprEAuEBLAtgBwgJxgAmHwGEALAQygHM4AROeMGVaAZRh3PioE8AaEhCzQEBAL74AZjiH4AOiAAClKgFcANuRwB6SDjgKA3HKgZseQvgCqsVOvoBnDhB74J02QsXUocLttVbdQBaABM4JxkeIxMTRRtmewjnHgAKAEo44iFsX1hU4BN8fDAKajoGOCYWKCQSMpp6RmY2Di44XgA6AHkoAAVVB1I+IvwHOHUqmFw6hTgAD3IsSYURqGL4Zfa6gANR4sVJXHxU1E38CEl8... | |
prettier/prettier | 15,888 | prettier__prettier-15888 | [
"15564",
"15563"
] | 4371840055b77d8bbf60f0c7fee8a75f2a777276 | diff --git a/src/language-js/clean.js b/src/language-js/clean.js
--- a/src/language-js/clean.js
+++ b/src/language-js/clean.js
@@ -79,7 +79,8 @@ function clean(original, cloned, parent) {
original.type === "PropertyDefinition" ||
original.type === "TSDeclareMethod" ||
original.type === "TSPropertyS... | diff --git a/tests/format/js/import-attributes/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/import-attributes/__snapshots__/jsfmt.spec.js.snap
--- a/tests/format/js/import-attributes/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/format/js/import-attributes/__snapshots__/jsfmt.spec.js.snap
@@ -24,6 +24,84 @@ export... | Safely remove quotes from keys in Import Attributes
## Description
<!-- Please provide a brief summary of your changes: -->
Fixes #15563
## Checklist
<!-- Please ensure youโve done all of these things (if applicable). -->
<!-- You can replace the `[ ]` with `[x]` to mark each task as done. -->
- [x] Iโve added tes... | For some reason FULL_TEST is failing. I'll investigate later.
It is intended to remove quotes from keys in object literals. Does Import Attribute keys have a different meaning depending on whether it is quoted or not?
---
**Prettier 3.0.3**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuc0DOM... | 2024-01-07T14:44:10Z | 3.3 | [] | [
"tests/format/js/import-attributes/jsfmt.spec.js"
] | JavaScript | [] | [
"https://prettier.io/playground/#N4Igxg9gdgLgprEAuEBLAtgBwgJxgAmAF98AzHCdfAcmvwHdUYALQ-AHRBgE9M5OknAFYBnaJ3xEQAGhARMMVNBHJQAQxwV6ABQ0IVKNQBt6a7itkAjHGrABrODADKa9HAAyqKHGSljIuCsbe0cnTFsvAHNkGBwAV0CQAPRUGPjEkSijOABFOIh4X39E0QAPJyzc-MKkPyMA2QBHarhtCkwDEDURAFpvOAATQZkuG1QjKIBhSnQ1ZC6jIxHMqEjsgEEYWNRLOPhtOBxPbyL6xOYYdCM... |
prettier/prettier | 15,915 | prettier__prettier-15915 | [
"15912"
] | 12f91dd1a9bbcd0a93f9f5bf91bf99f1af5f4bb9 | diff --git a/src/language-js/utils/index.js b/src/language-js/utils/index.js
--- a/src/language-js/utils/index.js
+++ b/src/language-js/utils/index.js
@@ -405,6 +405,16 @@ function isTestCall(node, parent) {
/** @return {(node: Node) => boolean} */
const skipChainExpression = (fn) => (node) => {
if (node?.type ===... | diff --git a/tests/format/js/chain-expression/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/chain-expression/__snapshots__/jsfmt.spec.js.snap
--- a/tests/format/js/chain-expression/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/format/js/chain-expression/__snapshots__/jsfmt.spec.js.snap
@@ -81,6 +81,22 @@ logger.log... | TypeError: Cannot read properties of undefined (reading 'type')
**Prettier 3.2.0**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuE8DOMAUBKAOlXGAOnRgCYd9CS4MKYALASygHMB+ItCAWzkZatsAbnwgANCAgAHGE2hpkoAIYAnVRADuABTUJFKZQBtNygJ6LJAI1XKwAa34BlZXwAyLOMgBmxtHGtbB2dpO0FkGFUAVwCQfx4mCOjYuAAPaThVJj5YYwAVTKg... | Thank you! I'll look into this | 2024-01-12T18:50:31Z | 3.3 | [] | [
"tests/format/js/chain-expression/jsfmt.spec.js"
] | JavaScript | [] | [
"https://prettier.io/playground/#N4Igxg9gdgLgprEAuE8DOMAUBKAOlXGAOnRgCYd9CS4MKYALASygHMB+ItCAWzkZatsAbnwgANCAgAHGE2hpkoAIYAnVRADuABTUJFKZQBtNygJ6LJAI1XKwAa34BlZXwAyLOMgBmxtHGtbB2dpO0FkGFUAVwCQfx4mCOjYuAAPaThVJj5YYwAVTKg1JlofP1i0QSM4AEUoiHgyo39JACs0VKcq2vrGpF9m2IBHXrhtDWkDEGU0AFooODgAE2WJVFsmI0EAYV4eZWRpoyM1yrZqgEEY... |
prettier/prettier | 15,920 | prettier__prettier-15920 | [
"15916"
] | 4ce96dd530613b99bb4a682ec93f719f3d4109f5 | diff --git a/src/language-js/utils/index.js b/src/language-js/utils/index.js
--- a/src/language-js/utils/index.js
+++ b/src/language-js/utils/index.js
@@ -405,16 +405,6 @@ function isTestCall(node, parent) {
/** @return {(node: Node) => boolean} */
const skipChainExpression = (fn) => (node) => {
if (node?.type ===... | diff --git a/tests/format/js/chain-expression/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/chain-expression/__snapshots__/jsfmt.spec.js.snap
--- a/tests/format/js/chain-expression/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/format/js/chain-expression/__snapshots__/jsfmt.spec.js.snap
@@ -97,6 +97,35 @@ test().tes... | TypeError: Cannot read properties of undefined (reading 'type')
**Prettier 3.2.1**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEACdrJQM41QJwEMoATCAWwDEBXKMAS2lQF5UAKAN0IBtq4BKJKg4R6JFgD5UwADpQMC1PQBm7LrzgA6Qv2lzFB1MtpgAgm32GrMkDYA0lqweN0AQhflOvJQgE8AVticPHzaAPyaMBAAyjD49FAA5mz8-I5eijIwWdokJGwAjH... | I'm getting the same error with `prettier@3.2.0` in my project, here is the minimal reproduction example :
```js
a(() => {}, c?.d);
```
The workaround is to introduce an additional variable:
```js
const b = c?.d;
a(() => {}, b);
``` | 2024-01-14T02:29:51Z | 3.3 | [] | [
"tests/format/js/chain-expression/jsfmt.spec.js"
] | JavaScript | [] | [
"https://prettier.io/playground/#N4Igxg9gdgLgprEAuEACdrJQM41QJwEMoATCAWwDEBXKMAS2lQF5UAKAN0IBtq4BKJKg4R6JFgD5UwADpQMC1PQBm7LrzgA6Qv2lzFB1MtpgAgm32GrMkDYA0lqweN0AQhflOvJQgE8AVticPHzaAPyaMBAAyjD49FAA5mz8-I5eijIwWdokJGwAjHaoNj6+NmmeGZnZMJEQAJLRAPKx8Ukp6dWV3QDcXRgAvumD-VAgdiAQAA4wjDjIoIT4+BAA7gAKywjYyCA8a367kwBGRGAA1nA... |
prettier/prettier | 15,926 | prettier__prettier-15926 | [
"15897"
] | c2e20fbae8ce1800ac0c8242c176d9379db5c001 | diff --git a/src/language-html/embed.js b/src/language-html/embed.js
--- a/src/language-html/embed.js
+++ b/src/language-html/embed.js
@@ -114,7 +114,6 @@ function embed(path, options) {
};
if (options.parser === "angular") {
textToDocOptions.parser = "__ng_interpolation";
- ... | diff --git a/tests/format/angular/angular/__snapshots__/format.test.js.snap b/tests/format/angular/angular/__snapshots__/format.test.js.snap
--- a/tests/format/angular/angular/__snapshots__/format.test.js.snap
+++ b/tests/format/angular/angular/__snapshots__/format.test.js.snap
@@ -451,10 +451,10 @@ printWidth: 80
[... | Object literals in Angular templates are missing trailing commas
**Prettier 3.1.1**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEAeAJgSwG4B0oAEBAVFAOYCSAZgLy4jD5FEDOADgIZiblIHtceZACQEAPgQ4sAnlDAAaJswCuLOACc+qjaIlTZCpQF9JLAmBgAPekoDa5AMIAbKSwC6dBkqIByNpYBaJzIfPgtLADoBbnICGhoCH2CfRUJmP0CAW3RQ8ysoz... | It's indented to not support `trailingComma`, https://github.com/prettier/prettier/blob/b4ed91bffb0a9140259f4190b77cce1b77284ca0/src/language-html/embed/angular-attributes.js#L23
But maybe it's supportted now?
Ah, supported since May, 2023. https://github.com/angular/angular/pull/49535
It seems still not supported ... | 2024-01-15T12:29:28Z | 3.3 | [] | [
"tests/format/angular/angular/format.test.js",
"tests/format/angular/trailing-comma/format.test.js"
] | JavaScript | [] | [
"https://prettier.io/playground/#N4Igxg9gdgLgprEAuEAeAJgSwG4B0oAEBAVFAOYCSAZgLy4jD5FEDOADgIZiblIHtceZACQEAPgQ4sAnlDAAaJswCuLOACc+qjaIlTZCpQF9JLAmBgAPekoDa5AMIAbKSwC6dBkqIByNpYBaJzIfPgtLADoBbnICGhoCH2CfRUJmP0CAW3RQ8ysozhiyOISfbJTvRP8AyxZc8ILBWPjE2oq0oxsoAD4lAAlMAgAFdTgYGEwNAgBCfFQAeixsbpB5EAg2CegWZFAOdXUIAHch-YQdlA4... |
prettier/prettier | 15,947 | prettier__prettier-15947 | [
"15945"
] | 6c6a332171f590a38c369673662d1a5baf765167 | diff --git a/src/language-json/languages.evaluate.js b/src/language-json/languages.evaluate.js
--- a/src/language-json/languages.evaluate.js
+++ b/src/language-json/languages.evaluate.js
@@ -14,10 +14,26 @@ const languages = [
parsers: ["json"],
vscodeLanguageIds: ["json"],
extensions: data.extensions.fi... | diff --git a/tests/integration/__tests__/__snapshots__/support-info.js.snap b/tests/integration/__tests__/__snapshots__/support-info.js.snap
--- a/tests/integration/__tests__/__snapshots__/support-info.js.snap
+++ b/tests/integration/__tests__/__snapshots__/support-info.js.snap
@@ -488,7 +488,12 @@ exports[`CLI --suppo... | Prettier 3.2.3 incorrectly formats `.estlintrc.json`
I'll check how it's loaded.
| Confirmed, we should not treat it as jsonc.
https://github.com/eslint/eslintrc/blob/a61384731aff386a8260a80d9710c912e4f62aaa/lib/config-array-factory.js#L188-L203
Before we work on it, let's double check and make sure [these files](https://github.com/prettier/prettier/blob/6c6a332171f590a38c369673662d1a5baf765167/tes... | 2024-01-17T09:29:19Z | 3.3 | [] | [
"tests/integration/__tests__/support-info.js"
] | JavaScript | [] | [] |
prettier/prettier | 15,968 | prettier__prettier-15968 | [
"15934"
] | 4b1965ae45dcaeb4208e8c7ee366f54372b69256 | diff --git a/src/language-js/embed/utils.js b/src/language-js/embed/utils.js
--- a/src/language-js/embed/utils.js
+++ b/src/language-js/embed/utils.js
@@ -30,15 +30,25 @@ const angularComponentObjectExpressionPredicates = [
* })
*/
function isAngularComponentStyles(path) {
- return path.match(
- (node) => node... | diff --git a/tests/format/typescript/angular-component-examples/15934-computed.component.ts b/tests/format/typescript/angular-component-examples/15934-computed.component.ts
new file mode 100644
--- /dev/null
+++ b/tests/format/typescript/angular-component-examples/15934-computed.component.ts
@@ -0,0 +1,13 @@
+import { ... | Angular inline styles are not formatted if specified as single string (new in v17)
**Prettier 3.2.2**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEBLAtgBwgJxgAmAGEItoEYBffAMx1PwHIABAQygHMBXAG1ZwD0kHHEYBuADpQpzEmSgUAFMCn58AZzg84YGLiRNWmTAFp6EGIwA0q-PCx94BgAYAJLTwjObUNepgAntrqLrZqSAAWEP4qvmrxkJ44S... | 2024-01-21T04:30:49Z | 3.3 | [] | [
"tests/format/typescript/angular-component-examples/jsfmt.spec.js"
] | JavaScript | [] | [
"https://prettier.io/playground/#N4Igxg9gdgLgprEAuEBLAtgBwgJxgAmAGEItoEYBffAMx1PwHIABAQygHMBXAG1ZwD0kHHEYBuADpQpzEmSgUAFMCn58AZzg84YGLiRNWmTAFp6EGIwA0q-PCx94BgAYAJLTwjObUNepgAntrqLrZqSAAWEP4qvmrxkJ44SABGPFxwYpS23lKUAJRScAAe2Hj4YHzq6vgAgsZy2AqwhNlQIFYgEJgwqNDqyKD89ADuAAr8CAMorDwjrAEDnSk4rGAA1nAwAMqs6HAAMqgKyDSzmsurG... | |
prettier/prettier | 15,972 | prettier__prettier-15972 | [
"15969"
] | 91a2e2513e11df4c89bca14199868b2e1b8f6777 | diff --git a/src/language-js/embed/utils.js b/src/language-js/embed/utils.js
--- a/src/language-js/embed/utils.js
+++ b/src/language-js/embed/utils.js
@@ -56,6 +56,7 @@ function isAngularComponentTemplate(path) {
(node) => node.type === "TemplateLiteral",
(node, name) =>
isObjectProperty(node) &&
+ ... | diff --git a/tests/format/typescript/angular-component-examples/15969-computed.component.ts b/tests/format/typescript/angular-component-examples/15969-computed.component.ts
new file mode 100644
--- /dev/null
+++ b/tests/format/typescript/angular-component-examples/15969-computed.component.ts
@@ -0,0 +1,8 @@
+import { C... | Unexpected embedded formatting for Angular template
**Prettier 3.2.4**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuc0DOMAE8C2AHAGwEN5MBeTAHRADMIIAjIgJ2oG5KpOABAYQnzQEMABTBOmTAG1chEnAC6STAAMAPAAsAjAD5gwSYcka4BAhEwBfS2oD02nSoA0nSwEpOcAB54IzLGDEaGiYAIJ4ePyCUMKYwJacIE4gEHgwAJboyKAszBAA7gAKLAhoyCBEBP... | Seems easy to fix. | 2024-01-22T13:16:28Z | 3.3 | [] | [
"tests/format/typescript/angular-component-examples/jsfmt.spec.js"
] | JavaScript | [] | [
"https://prettier.io/playground/#N4Igxg9gdgLgprEAuc0DOMAE8C2AHAGwEN5MBeTAHRADMIIAjIgJ2oG5KpOABAYQnzQEMABTBOmTAG1chEnAC6STAAMAPAAsAjAD5gwSYcka4BAhEwBfS2oD02nSoA0nSwEpOcAB54IzLGDEaGiYAIJ4ePyCUMKYwJacIE4gEHgwAJboyKAszBAA7gAKLAhoyCBEBPlEAJ5lyQzMRGAA1nAwAMpEOHAAMukxyDSVaHANTa3tHXjNAwDmyDDMAK5jIKM46Ysra954cMzpPbCVACoHUCz... |
prettier/prettier | 15,993 | prettier__prettier-15993 | [
"9503",
"9847"
] | 6d2418f637279998963d6e0cabcd3c63a313e707 | diff --git a/src/language-markdown/print-paragraph.js b/src/language-markdown/print-paragraph.js
new file mode 100644
--- /dev/null
+++ b/src/language-markdown/print-paragraph.js
@@ -0,0 +1,20 @@
+import { fill } from "../document/builders.js";
+import { normalizeDoc } from "../document/utils.js";
+
+/**
+ * @typedef {... | diff --git a/tests/format/markdown/code/__snapshots__/jsfmt.spec.js.snap b/tests/format/markdown/code/__snapshots__/jsfmt.spec.js.snap
--- a/tests/format/markdown/code/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/format/markdown/code/__snapshots__/jsfmt.spec.js.snap
@@ -339,9 +339,9 @@ const createCredentialDefaultArgs... | Inline React components in MDX cause line lengths to exceed print-width
<!--
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... | Thanks for reporting this. If you're interested in fixing it, use the "show doc" checkbox in the playground to check the intermediate representation that Prettier builds. It's described [here](https://github.com/prettier/prettier/blob/master/commands.md). The `fill` command has [certain expectations](https://github.com... | 2024-01-27T23:34:51Z | 3.3 | [] | [
"tests/format/mdx/mdx/jsfmt.spec.js",
"tests/format/markdown/code/jsfmt.spec.js"
] | JavaScript | [] | [
"https://prettier.io/playground",
"https://prettier.io/playground-redirect",
"https://prettier.io/playground/#N4Igxg9gdgLgprEAuEAeAogD3gJygQwBsAZASygGsACACxzgDMBeAHRBphgAckB6X-AHcAzgDp8AW3wAvaKMgTekACZwupLnELk4vNgD4AggHUAylQDCEVQAUNWnal5ZcBEuQr6qpYVXxVIWHIAVwhg31VtADc4HABPPyhlKnpCOHxhOD9gmAgpGFJoKkycKNIwLJgafBg... |
prettier/prettier | 16,031 | prettier__prettier-16031 | [
"15904"
] | d467987b4adbae803a62f7707c613f31769c2df9 | diff --git a/src/language-js/needs-parens.js b/src/language-js/needs-parens.js
--- a/src/language-js/needs-parens.js
+++ b/src/language-js/needs-parens.js
@@ -567,8 +567,20 @@ function needsParens(path, options) {
}
// fallthrough
case "TSInferType":
- if (node.type === "TSInferType" && parent.typ... | diff --git a/tests/format/typescript/infer-extends/__snapshots__/jsfmt.spec.js.snap b/tests/format/typescript/infer-extends/__snapshots__/jsfmt.spec.js.snap
--- a/tests/format/typescript/infer-extends/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/format/typescript/infer-extends/__snapshots__/jsfmt.spec.js.snap
@@ -13,6 ... | TS: Removal of necessary parentheses when using `infer U extends` syntax with multiple conditional checks
**Prettier 3.1.1**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEMCeAHOACAYhCAHgBUA+bAXm2OzgA94oATAZ2wAoBLKAMzgCdsAVVoMErbFACuAWwBGAgJTYAPtmDYAhkmzc+gkfUYTp8gdgC+2APzDsOqHABuAkABoQEDDE7QWyUE1... | 2024-02-04T10:55:26Z | 3.3 | [] | [
"tests/format/typescript/infer-extends/jsfmt.spec.js"
] | JavaScript | [] | [
"https://prettier.io/playground/#N4Igxg9gdgLgprEAuEMCeAHOACAYhCAHgBUA+bAXm2OzgA94oATAZ2wAoBLKAMzgCdsAVVoMErbFACuAWwBGAgJTYAPtmDYAhkmzc+gkfUYTp8gdgC+2APzDsOqHABuAkABoQEDDE7QWyUE1+fggAdwAFIIR-FE0AG1DNNH8POX5NMABrOBgAZU0ZOAAZbjhkHniWOFT0rJzcjAzuAHNkGH4papAqmU42jq76LH5OQth44gEoIM44GIq4qo8WFri4AEUpCHhyyq6AKxY6XNWNrZ2kBa... | |
prettier/prettier | 16,058 | prettier__prettier-16058 | [
"16057"
] | 99bc9d0b6d3a9bcc0de6e99786502fba2d29b4fe | diff --git a/src/language-js/print/property.js b/src/language-js/print/property.js
--- a/src/language-js/print/property.js
+++ b/src/language-js/print/property.js
@@ -44,8 +44,7 @@ function isStringKeySafeToUnquote(node, options) {
options.parser === "json" ||
options.parser === "jsonc" ||
!isStringLiter... | diff --git a/tests/format/js/quote-props/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/quote-props/__snapshots__/jsfmt.spec.js.snap
--- a/tests/format/js/quote-props/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/format/js/quote-props/__snapshots__/jsfmt.spec.js.snap
@@ -293,32 +293,32 @@ printWidth: 80
quoteProps:... | Unstable property key print
**Prettier 3.2.5**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEBDABAXncAOlddXEAMwgmKXQEYAafQ4gI111QCdL0AmeqAXxC0QEAA4wAltADOyUB3YQA7gAUOCWSlQAbJagCes4U3aowAazgwAyqgC2cADISocZCR3S4x0xavXRMxcAc2QYdgBXbxAvOwkwyOi4AA9ROHYJB1gdABV0qA4JOE0PbS9haRDtOABFCIh4d09ogCtpZOsq2vrGp... | 2024-02-07T08:55:53Z | 3.3 | [] | [
"tests/format/js/quote-props/jsfmt.spec.js"
] | JavaScript | [] | [
"https://prettier.io/playground/#N4Igxg9gdgLgprEAuEBDABAXncAOlddXEAMwgmKXQEYAafQ4gI111QCdL0AmeqAXxC0QEAA4wAltADOyUB3YQA7gAUOCWSlQAbJagCes4U3aowAazgwAyqgC2cADISocZCR3S4x0xavXRMxcAc2QYdgBXbxAvOwkwyOi4AA9ROHYJB1gdABV0qA4JOE0PbS9haRDtOABFCIh4d09ogCtpZOsq2vrGpFLykABHHrgVRVFNcBkJaXhEYXDUCW0QgGEIOztUZDRtbSEYroBBGHCJJgj4FX... | |
prettier/prettier | 16,063 | prettier__prettier-16063 | [
"8301"
] | 7250556e287922508d9f28c12a82165a60bab5d7 | diff --git a/src/language-markdown/printer-markdown.js b/src/language-markdown/printer-markdown.js
--- a/src/language-markdown/printer-markdown.js
+++ b/src/language-markdown/printer-markdown.js
@@ -41,11 +41,7 @@ import {
* @typedef {import("../document/builders.js").Doc} Doc
*/
-const SIBLING_NODE_TYPES = new S... | diff --git a/tests/format/markdown/footnoteDefinition/__snapshots__/format.test.js.snap b/tests/format/markdown/footnoteDefinition/__snapshots__/format.test.js.snap
--- a/tests/format/markdown/footnoteDefinition/__snapshots__/format.test.js.snap
+++ b/tests/format/markdown/footnoteDefinition/__snapshots__/format.test.j... | Whitespace is removed from between footnotes
**Prettier 2.0.5**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEBtAegRgLpIAQCyAhmACbREA2pANHgBIB0BjdATAAyYDMjeAwtBgAnAJYAjAK4xR0AM54IAMzxzJUSqIDmACxh4iUUnlKi4+mBDwA3UTCIBbUVDwARVfZiS5fflTCiSnwAKqJyanB4AJKwrHgAnGwAFGwAlHQADhmMmABs3AC0mADsuYwAOlCVGGy4hE... | Indeed, seems to be a bug.
From https://pandoc.org/MANUAL.html#footnotes:
> Each footnote should be separated from surrounding content (including other footnotes) by blank lines.
@Undistraction Work is currently underway to update the Markdown parser that Prettier uses. See #8140. Could you probably help with tes... | 2024-02-08T14:30:04Z | 3.3 | [] | [
"tests/format/markdown/footnoteDefinition/format.test.js"
] | JavaScript | [] | [
"https://prettier.io/playground/#N4Igxg9gdgLgprEAuEBtAegRgLpIAQCyAhmACbREA2pANHgBIB0BjdATAAyYDMjeAwtBgAnAJYAjAK4xR0AM54IAMzxzJUSqIDmACxh4iUUnlKi4+mBDwA3UTCIBbUVDwARVfZiS5fflTCiSnwAKqJyanB4AJKwrHgAnGwAFGwAlHQADhmMmABs3AC0mADsuYwAOlCVGGy4hETCMlBwRJJ0AIKMAEpxAFIQlJpKSnB0royddPQQEBlwwnQ9ADJxAOLCcAji81p0Kx2UEKJEdL2MAGJx... |
prettier/prettier | 16,064 | prettier__prettier-16064 | [
"16007"
] | 572452b89d3ccdad70f2b99de4af5d5c84be944a | diff --git a/src/language-js/embed/utils.js b/src/language-js/embed/utils.js
--- a/src/language-js/embed/utils.js
+++ b/src/language-js/embed/utils.js
@@ -80,6 +80,8 @@ function hasLanguageComment({ node, parent }, languageName) {
return (
hasLeadingBlockCommentWithName(node, languageName) ||
(isAsConstExp... | diff --git a/tests/format/js/multiparser-graphql/__snapshots__/jsfmt.spec.js.snap b/tests/format/js/multiparser-graphql/__snapshots__/jsfmt.spec.js.snap
--- a/tests/format/js/multiparser-graphql/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/format/js/multiparser-graphql/__snapshots__/jsfmt.spec.js.snap
@@ -16,6 +16,17 @... | Bare embedded GQL string in e.g. JS is not formatted
**Prettier 3.2.4**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuc0DOMAEAzCFMC8mA9AFSYDiATgIYAOAFgIoAympxmABgDpSaYAjgFc4VAJ448mYJgCWAE0wBfPlwDcfPmUq1Grdp178hoiVPyzFKtepAAaEBDow56ZKBpUqEAO4AFLwQ0ZBAaABtfGnEQxwAjWjAAazgYAGUaAFs4FjkoOGRsCLQ4eMSU9Lo... | To the best of my recollection, I don't believe this is either an intentional design or a limitation.
If that's a real-world use case, I think we can accept it.
Thanks - this may be trivial for someone who knows the codebase and has time to look at it, but otherwise, any pointers on where to look? I confess I haven't l... | 2024-02-08T19:35:18Z | 3.3 | [] | [
"tests/format/js/multiparser-graphql/jsfmt.spec.js"
] | JavaScript | [] | [
"https://prettier.io/playground/#N4Igxg9gdgLgprEAuc0DOMAEAzCFMC8mA9AFSYDiATgIYAOAFgIoAympxmABgDpSaYAjgFc4VAJ448mYJgCWAE0wBfPlwDcfPmUq1Grdp178hoiVPyzFKtepAAaEBDow56ZKBpUqEAO4AFLwQ0ZBAaABtfGnEQxwAjWjAAazgYAGUaAFs4FjkoOGRsCLQ4eMSU9LoaMDyAc2QYKlFHEsy5BqbSkDgADzoxOWzYCIAVMSgvOTgQpCLwkpa68LgmYQh4QuKugCs0HrSllbWN2a3HEXW4f... |
prettier/prettier | 16,158 | prettier__prettier-16158 | [
"15877"
] | d970deed6b6cabe21fdb35249265d766932b5718 | diff --git a/src/document/utils.js b/src/document/utils.js
--- a/src/document/utils.js
+++ b/src/document/utils.js
@@ -337,10 +337,11 @@ function cleanDocFn(doc) {
return doc;
}
-// A safer version of `normalizeDoc`
-// - `normalizeDoc` concat strings and flat array in `fill`, while `cleanDoc` don't
-// - On arra... | diff --git a/tests/format/markdown/break/__snapshots__/jsfmt.spec.js.snap b/tests/format/markdown/break/__snapshots__/jsfmt.spec.js.snap
--- a/tests/format/markdown/break/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/format/markdown/break/__snapshots__/jsfmt.spec.js.snap
@@ -28,3 +28,29 @@ proseWrap: "always"
=======... | Doc of paragraph in markdown violates a rule of `fill()`
**Prettier 3.1.1**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEBDABB9AdK6BGB6OeY6ZJuxIANCBAA4wCW0AzsqKgE7cQDuABR4IOKVABt+qAJ4c6+bqjABrODADKqALZwAMsyhxkAM0ls4CpavUaGywwHNkMbgFdLIC9uYv3nuAAPBjhuZl1YSQAVUKgeZjgxMwkLOjYnCTgARTcIeFNzTwArNkCNDO... | Oh it can be reproduced without `--prose-wrap: always`. I changed the issue title.
**Prettier 3.1.1**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEBDABKgOlARu3HMdMEAGhAgAcYBLaAZ2VFQCdWIB3ABTYSZSoANp1QBPJhVytUYANZwYAZVQBbOABlaUOMgBmwhnCkz5ipVVnaA5shisArsZBHVtO4+dwAHlTitadVhhABV-KDZaOAEDISMKBhs... | 2024-03-20T07:05:54Z | 3.3 | [] | [
"tests/format/markdown/break/jsfmt.spec.js"
] | JavaScript | [] | [
"https://prettier.io/playground/#N4Igxg9gdgLgprEAuEBDABB9AdK6BGB6OeY6ZJuxIANCBAA4wCW0AzsqKgE7cQDuABR4IOKVABt+qAJ4c6+bqjABrODADKqALZwAMsyhxkAM0ls4CpavUaGywwHNkMbgFdLIC9uYv3nuAAPBjhuZl1YSQAVUKgeZjgxMwkLOjYnCTgARTcIeFNzTwArNkCNDOzc-KRk1JAARyq4QT4GMTQ2AFojOAATPtoQV1RmCScAYQhtbVRkNAkJQfSoR0yAQRhXZnw3eEFQgyMClM8ACxhtCQB1... |
prettier/prettier | 16,267 | prettier__prettier-16267 | [
"16266"
] | 708bb1fe70263549cf7c85508e09b959d623b1de | diff --git a/src/language-js/print/call-expression.js b/src/language-js/print/call-expression.js
--- a/src/language-js/print/call-expression.js
+++ b/src/language-js/print/call-expression.js
@@ -45,7 +45,7 @@ function printCallExpression(path, options, print) {
if (!(isTemplateLiteralSingleArg && printed[0].label?... | diff --git a/tests/format/js/dynamic-import/__snapshots__/format.test.js.snap b/tests/format/js/dynamic-import/__snapshots__/format.test.js.snap
--- a/tests/format/js/dynamic-import/__snapshots__/format.test.js.snap
+++ b/tests/format/js/dynamic-import/__snapshots__/format.test.js.snap
@@ -45,6 +45,106 @@ import("./foo... | dynamic import keyword is removed when given multiline template 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 ... | 2024-05-08T07:37:47Z | 3.3 | [] | [
"tests/format/js/dynamic-import/format.test.js"
] | JavaScript | [] | [
"https://prettier.io/playground",
"https://prettier.io/playground/#N4Igxg9gdgLgprEAuc0DOMAEBbCATAVwBs5MBeTAQwHdKBLLO7ABwgCcYAKAAz0pkpJ4ADxgB6AFaUAbpTRg2dZjAA0AHSiYtmSFDQQSAOiIQA5pzUgASgFUAcpYCUAbg3cXIFSAjK66ZKCUbGwQ1AAKQQhoyCCURLQAntFeAEZslGAA1nAwAMqU2HAAMnRQcMgAZnFocKnpWTm5zBmlpsgwbAS1IDXYdO2d3XDCzHCKhbBxACpjUEF... | |
prettier/prettier | 16,347 | prettier__prettier-16347 | [
"16342"
] | b26f56bd316a3ed11c33f50cd4a3dac44a4ee529 | diff --git a/src/document/utils.js b/src/document/utils.js
--- a/src/document/utils.js
+++ b/src/document/utils.js
@@ -212,7 +212,6 @@ function stripTrailingHardlineFromParts(parts) {
function stripTrailingHardlineFromDoc(doc) {
switch (getDocType(doc)) {
- case DOC_TYPE_ALIGN:
case DOC_TYPE_INDENT:
... | diff --git a/tests/format/misc/embedded_language_formatting/in-markdown/__snapshots__/format.test.js.snap b/tests/format/misc/embedded_language_formatting/in-markdown/__snapshots__/format.test.js.snap
--- a/tests/format/misc/embedded_language_formatting/in-markdown/__snapshots__/format.test.js.snap
+++ b/tests/format/m... | Some empty lines is being removed in markdown YAML frontmatter
**Prettier 3.3.0**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEBadAdWBLGAbOJAAgCU4BDPIgBQCcIArOMGAZy20imNYAc8IMMAAssEWgBM4tYgEYsYcvADm4gJ5IsRIqiIAROAFsIWLBIhhWmqNt1RyhwkQDqlbFDhbtRKazDEAQSIAZWxDfjgAGhDyADM4IgBhCENHWBC1VnhDADovbQFVYm... | Interesting, thanks for reporting! A few shorter examples:
## Line gaps in the last list are removed
**Prettier 3.3.0**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEBadAdKAzCECMSWABMasQEYCGATvvliWZbfgEyNSnnV0DMnXBDZEuzXmwZQmPWmw7SxsmmwGKhfUdxY0+UmTr4KDvPmvSpOAWVoBrACYQA7lBAAaEBAAOMAJbQAZ2R... | 2024-06-04T07:41:01Z | 3.4 | [] | [
"tests/format/misc/embedded_language_formatting/in-markdown/format.test.js"
] | JavaScript | [] | [
"https://prettier.io/playground/#N4Igxg9gdgLgprEAuEBadAdWBLGAbOJAAgCU4BDPIgBQCcIArOMGAZy20imNYAc8IMMAAssEWgBM4tYgEYsYcvADm4gJ5IsRIqiIAROAFsIWLBIhhWmqNt1RyhwkQDqlbFDhbtRKazDEAQSIAZWxDfjgAGhDyADM4IgBhCENHWBC1VnhDADovbQFVYmEYGF4rAHoKgHc3DxyGVhzxZQrCiBzeKGV8ogBXWjxi0vKkKtq8dzgGppaKhAre2jheCGGyyorlXGE+gCMcyEMaurhGk8mPXt... |
prettier/prettier | 16,349 | prettier__prettier-16349 | [
"16340"
] | ddce4fb95ccfaaf4435ab5c1e052bf04704c9e3c | diff --git a/src/language-js/print/assignment.js b/src/language-js/print/assignment.js
--- a/src/language-js/print/assignment.js
+++ b/src/language-js/print/assignment.js
@@ -138,6 +138,7 @@ function chooseLayout(path, options, print, leftDoc, rightPropertyName) {
}
if (
+ node.type === "ImportAttribute" ||
... | diff --git a/tests/format/js/import-attributes/__snapshots__/format.test.js.snap b/tests/format/js/import-attributes/__snapshots__/format.test.js.snap
--- a/tests/format/js/import-attributes/__snapshots__/format.test.js.snap
+++ b/tests/format/js/import-attributes/__snapshots__/format.test.js.snap
@@ -159,6 +159,97 @@ ... | Unexpected line break in `assert { type: "json" }`
**Prettier 3.3.0**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEB6VACL2e7-gwo4rADgAYMwALAQwCcBnDQZMIMAdKASwFsAHCPRgZaARkoAzehB4cQAOlS1lK1fIBWjaOxAjGjOEIzAMMAJ584SOZu26AvgG5OvAUdoAmSdNk7FqgMCAjS0oHT0DIxNzS2sdWzCHZ25+QWFaAGZvGTl-IPyC4ITw2n1DYWiLKx... | 2024-06-04T08:54:03Z | 3.4 | [] | [
"tests/format/js/import-attributes/format.test.js"
] | JavaScript | [] | [
"https://prettier.io/playground/#N4Igxg9gdgLgprEAuEB6VACL2e7-gwo4rADgAYMwALAQwCcBnDQZMIMAdKASwFsAHCPRgZaARkoAzehB4cQAOlS1lK1fIBWjaOxAjGjOEIzAMMAJ584SOZu26AvgG5OvAUdoAmSdNk7FqgMCAjS0oHT0DIxNzS2sdWzCHZ25+QWFaAGZvGTl-IPyC4ITw2n1DYWiLKxtQ8KcXVPcAFmzfBSVCzq7AkLsI8uNTKriQYqSGt3SAVlbcju6FxZ6x-qih2Jq++pTJkQA2Wb95pZPT5drdUs... | |
prettier/prettier | 16,358 | prettier__prettier-16358 | [
"16356"
] | 13163d9b7543021d1f24edadbc0e5a2b1598d478 | diff --git a/src/language-handlebars/clean.js b/src/language-handlebars/clean.js
--- a/src/language-handlebars/clean.js
+++ b/src/language-handlebars/clean.js
@@ -32,6 +32,10 @@ function clean(original, cloned /*, parent*/) {
if (original.type === "AttrNode" && original.name.toLowerCase() === "class") {
delete ... | diff --git a/tests/format/handlebars/path-expressions/__snapshots__/format.test.js.snap b/tests/format/handlebars/path-expressions/__snapshots__/format.test.js.snap
--- a/tests/format/handlebars/path-expressions/__snapshots__/format.test.js.snap
+++ b/tests/format/handlebars/path-expressions/__snapshots__/format.test.j... | handlebars attrbutes changed: {{@x.y.z}} becomes {{@x}}
**Prettier 3.3.1**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEACVAeAJgSwG7qFgA2AhgM7kC8AOiAjAE4CedhqAfDVOhgBYBGDsGDoYOGMTjsAvjIwB6QVx6ZcBdCQrU6AIwhZWIFexEABAB4A6ZlYBec7u2eERhfYZeFHUReo6YCv4gADQgEAAO4tDkyKCkjIwQAO4ACgkIsSikxMmkzLFhuoykYADW... | Sorry for breaking your code, it's caused by #16346, print `node.tail` [here](https://github.com/prettier/prettier/blob/13163d9b7543021d1f24edadbc0e5a2b1598d478/src/language-handlebars/printer-glimmer.js#L796) should be able to fix it.
Do you want work on it?
| 2024-06-06T06:35:03Z | 3.4 | [] | [
"tests/unit/visitor-keys.js",
"tests/format/handlebars/path-expressions/format.test.js"
] | JavaScript | [] | [
"https://prettier.io/playground/#N4Igxg9gdgLgprEAuEACVAeAJgSwG7qFgA2AhgM7kC8AOiAjAE4CedhqAfDVOhgBYBGDsGDoYOGMTjsAvjIwB6QVx6ZcBdCQrU6AIwhZWIFexEABAB4A6ZlYBec7u2eERhfYZeFHUReo6YCv4gADQgEAAO4tDkyKCkjIwQAO4ACgkIsSikxMmkzLFhuoykYADWcDAAyqQAtnAAMjhQcMgAZjnkcEUl5ZVVEaXNAObITACu3SBdtThjjJNhcBYRcIw49bA5ACprUAk4cFkdxF1h5CNSA... |
prettier/prettier | 16,391 | prettier__prettier-16391 | [
"4873"
] | d6daeec0a382ffb9471075f839d12568a4e57100 | diff --git a/src/language-js/needs-parens.js b/src/language-js/needs-parens.js
--- a/src/language-js/needs-parens.js
+++ b/src/language-js/needs-parens.js
@@ -11,6 +11,7 @@ import {
isBitwiseOperator,
isCallExpression,
isMemberExpression,
+ isNullishCoalescing,
isObjectOrRecordExpression,
isObjectProper... | diff --git a/tests/format/js/nullish-coalescing/__snapshots__/format.test.js.snap b/tests/format/js/nullish-coalescing/__snapshots__/format.test.js.snap
--- a/tests/format/js/nullish-coalescing/__snapshots__/format.test.js.snap
+++ b/tests/format/js/nullish-coalescing/__snapshots__/format.test.js.snap
@@ -29,12 +29,16 ... | Parentheses around nullish coalescing operator within conditional expression
**Prettier 1.13.5**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuc0DOMAEA3AhgGwFc5MBeTSKAEwEsYbpMB+TACikP31wCN84AagWLMWAMwL4euMAGshROAEpMSTFGgA5Ttz6DhcANwgANCAgAHeumShcAJ3sQA7gAUHCNMhC5sEGlSmIDz2MrJwMADKFjI0UADmyDD2xGZxa... | We don't do this for other operators, like `||`. I'm not sure it makes sense to do this for `??`.
I've considered this argument as well, but I come to a different conclusion: I do think it's valuable to make the precedence clearer by adding explicit parentheses here โ clarity trumps brevity.
IMO this case is a little d... | 2024-06-12T17:55:55Z | 3.4 | [] | [
"tests/format/js/nullish-coalescing/format.test.js"
] | JavaScript | [] | [
"https://prettier.io/playground/#N4Igxg9gdgLgprEAuc0DOMAEA3AhgGwFc5MBeTSKAEwEsYbpMB+TACikP31wCN84AagWLMWAMwL4euMAGshROAEpMSTFGgA5Ttz6DhcANwgANCAgAHeumShcAJ3sQA7gAUHCNMhC5sEGlSmIDz2MrJwMADKFjI0UADmyDD2xGZxaHD2MK6h8QC2uMgS+BlmAFZoAB4AQqFyEZG4eXAAMnFwRQSlIDH2Gfbe0jwAnvjQQRb2cTAA6gEwABbIABwADGaTEBkzoRbek3D92B1m9nAAjoQ0... |
prettier/prettier | 6,644 | prettier__prettier-6644 | [
"5501"
] | 433d3303c169e8a2927580b3df7b1f443bb7f4a5 | diff --git a/src/common/common-options.js b/src/common/common-options.js
--- a/src/common/common-options.js
+++ b/src/common/common-options.js
@@ -54,4 +54,11 @@ module.exports = {
description:
"Put > of opening tags on the last line instead of on a new line.",
},
+ singleAttributePerLine: {
+ since:... | 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
--- /dev/null
+++ b/tests/format/html/single-attribute-per-line/__snapshots__/jsfmt.spec.js.snap
@@ -0,0 +1,135 @@
+// Jest Snapsh... | 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-13T16:53:37Z | 2.6 | [
"tests/integration/__tests__/help-options.js"
] | [
"tests/integration/__tests__/early-exit.js",
"tests/integration/__tests__/support-info.js",
"tests/integration/__tests__/schema.js",
"tests/format/jsx/single-attribute-per-line/jsfmt.spec.js",
"tests/format/html/single-attribute-per-line/jsfmt.spec.js",
"tests/format/vue/single-attribute-per-line/jsfmt.sp... | JavaScript | [] | [] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.