New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support max_line_length=off
when parsing .editorconfig
#14516
Support max_line_length=off
when parsing .editorconfig
#14516
Conversation
This fixes prettier#14514 by upgrading `editorconfig-to-prettier` with the fix from josephfrazier/editorconfig-to-prettier#10
Thanks for the approval, @fisker! Just to confirm, you're ok with this being merged despite not having tests, documentation, or changelog items? I can try to add those if needed, wanted to make sure. |
It’d be nice to have a quick changelog item because we have a mini new feature here (or even a breaking change?). Do we want to merge the PR into |
Sure, I added one in https://github.com/prettier/prettier/pull/14516/files?short_path=785b7f6#diff-785b7f6797d53004d9169af9a6c1c8aefa95a2512665c7032c8bc51bd5c46c3f, let me know what you think.
Thanks! Yeah... I was wondering if it should be considered breaking. It does require that the user had explicitly specified |
I don't think it will break anything since api support
You already added changelog, which is good.
I trust your judgement, we may not even release v2 anymore. |
Ah, I see the tests with
Similarly, the documentation already mentions the general support for
Oh, are there no plans to continue further v2 releases? I don't think this should be considered a breaking change, so if it could get released in |
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [prettier](https://prettier.io) ([source](https://github.com/prettier/prettier)) | devDependencies | patch | [`2.8.4` -> `2.8.7`](https://renovatebot.com/diffs/npm/prettier/2.8.4/2.8.7) | --- ### Release Notes <details> <summary>prettier/prettier</summary> ### [`v2.8.7`](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#​287) [Compare Source](prettier/prettier@2.8.6...2.8.7) [diff](prettier/prettier@2.8.6...2.8.7) ##### Allow multiple decorators on same getter/setter ([#​14584](prettier/prettier#14584) by [@​fisker](https://github.com/fisker)) <!-- prettier-ignore --> ```ts // Input class A { @​decorator() get foo () {} @​decorator() set foo (value) {} } // Prettier 2.8.6 SyntaxError: Decorators cannot be applied to multiple get/set accessors of the same name. (5:3) 3 | get foo () {} 4 | > 5 | @​decorator() | ^^^^^^^^^^^^ 6 | set foo (value) {} 7 | } // Prettier 2.8.7 class A { @​decorator() get foo() {} @​decorator() set foo(value) {} } ``` ### [`v2.8.6`](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#​286) [Compare Source](prettier/prettier@2.8.5...2.8.6) [diff](prettier/prettier@2.8.5...2.8.6) ##### Allow decorators on private members and class expressions ([#​14548](prettier/prettier#14548) by [@​fisker](https://github.com/fisker)) <!-- prettier-ignore --> ```ts // Input class A { @​decorator() #privateMethod () {} } // Prettier 2.8.5 SyntaxError: Decorators are not valid here. (2:3) 1 | class A { > 2 | @​decorator() | ^^^^^^^^^^^^ 3 | #privateMethod () {} 4 | } // Prettier 2.8.6 class A { @​decorator() #privateMethod() {} } ``` ### [`v2.8.5`](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#​285) [Compare Source](prettier/prettier@2.8.4...2.8.5) [diff](prettier/prettier@2.8.4...2.8.5) ##### Support TypeScript 5.0 ([#​14391](prettier/prettier#14391) by [@​fisker](https://github.com/fisker), [#​13819](prettier/prettier#13819) by [@​fisker](https://github.com/fisker), [@​sosukesuzuki](https://github.com/sosukesuzuki)) TypeScript 5.0 introduces two new syntactic features: - `const` modifiers for type parameters - `export type *` declarations ##### Add missing parentheses for decorator ([#​14393](prettier/prettier#14393) by [@​fisker](https://github.com/fisker)) <!-- prettier-ignore --> ```jsx // Input class Person { @​(myDecoratorArray[0]) greet() {} } // Prettier 2.8.4 class Person { @​myDecoratorArray[0] greet() {} } // Prettier 2.8.5 class Person { @​(myDecoratorArray[0]) greet() {} } ``` ##### Add parentheses for `TypeofTypeAnnotation` to improve readability ([#​14458](prettier/prettier#14458) by [@​fisker](https://github.com/fisker)) <!-- prettier-ignore --> ```tsx // Input type A = (typeof node.children)[]; // Prettier 2.8.4 type A = typeof node.children[]; // Prettier 2.8.5 type A = (typeof node.children)[]; ``` ##### Support `max_line_length=off` when parsing `.editorconfig` ([#​14516](prettier/prettier#14516) by [@​josephfrazier](https://github.com/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). <!-- prettier-ignore --> ```html <!-- Input --> <div className='HelloWorld' title={`You are visitor number ${ num }`} onMouseOver={onMouseOver}/> <!-- Prettier 2.8.4 --> <div className="HelloWorld" title={`You are visitor number ${num}`} onMouseOver={onMouseOver} />; <!-- Prettier 2.8.5 --> <div className="HelloWorld" title={`You are visitor number ${num}`} onMouseOver={onMouseOver} />; ``` </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS4yNC4yIiwidXBkYXRlZEluVmVyIjoiMzUuMjQuMiJ9--> Co-authored-by: cabr2-bot <cabr2.help@gmail.com> Reviewed-on: https://codeberg.org/Calciumdibromid/CaBr2/pulls/1832 Reviewed-by: Epsilon_02 <epsilon_02@noreply.codeberg.org> Co-authored-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org> Co-committed-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>
…14516) This fixes prettier#14514 by upgrading `editorconfig-to-prettier` with the fix from josephfrazier/editorconfig-to-prettier#10
Description
This fixes #14514 by upgrading
editorconfig-to-prettier
with the fix from josephfrazier/editorconfig-to-prettier#10Checklist
docs/
directory).changelog_unreleased/*/XXXX.md
file followingchangelog_unreleased/TEMPLATE.md
.✨Try the playground for this PR✨