diff --git a/changelog_unreleased/misc/14516.md b/changelog_unreleased/misc/14516.md new file mode 100644 index 000000000..e05195a64 --- /dev/null +++ b/changelog_unreleased/misc/14516.md @@ -0,0 +1,21 @@ +#### Support `max_line_length=off` when parsing `.editorconfig` (#14516 by @josephfrazier) + +If an .editorconfig file is in your project and it sets `max_line_length=off` for the file you're formatting, +it will be interpreted as a `printWidth` of `Infinity` rather than being ignored +(which previously resulted in the default `printWidth` of 80 being applied, if not overridden by Prettier-specific configuration). + + +```html + +
+ + +
; + + +
; +``` diff --git a/package.json b/package.json index 8406222c5..205ebcf73 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ "dashify": "2.0.0", "diff": "5.1.0", "editorconfig": "0.15.3", - "editorconfig-to-prettier": "0.2.0", + "editorconfig-to-prettier": "1.0.0", "escape-string-regexp": "5.0.0", "espree": "9.5.0", "fast-glob": "3.2.12", diff --git a/yarn.lock b/yarn.lock index a159b8253..c86913dd5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3106,10 +3106,10 @@ __metadata: languageName: node linkType: hard -"editorconfig-to-prettier@npm:0.2.0": - version: 0.2.0 - resolution: "editorconfig-to-prettier@npm:0.2.0" - checksum: 9803934b0835fc57aa67c190de3a0b4c737e53c80424de7ac8ea183950190273a50e7b693932effacfb147109f2af8af5d5df5810dc13bd505cd6df50142a72a +"editorconfig-to-prettier@npm:1.0.0": + version: 1.0.0 + resolution: "editorconfig-to-prettier@npm:1.0.0" + checksum: 8054f8593c2f93abca9f3c6db91030fbd80a15fd36b076a5f3fbeb246267173e290817adfb3389d9066026bcc85822e72b7635596e9dda6e74927ae110cbc474 languageName: node linkType: hard @@ -6748,7 +6748,7 @@ __metadata: dashify: 2.0.0 diff: 5.1.0 editorconfig: 0.15.3 - editorconfig-to-prettier: 0.2.0 + editorconfig-to-prettier: 1.0.0 enquirer: 2.3.6 esbuild: 0.17.12 esbuild-visualizer: 0.4.0