-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Remove claim, untrue since over 5 years ago, that cursorOffset is incompatible with rangeStart/rangeEnd #15750
Remove claim, untrue since over 5 years ago, that cursorOffset is incompatible with rangeStart/rangeEnd #15750
Conversation
…ompatible with rangeStart/rangeEnd
Thanks! Could you also change the types ( |
…ompanying cursorOffset
…b.com:ExplodingCabbage/prettier into remove-false-claim-about-incompatible-options
5d20c84
to
43c6944
Compare
Ah, interesting - I hadn't looked at the types and hadn't noticed that Hmm... but wait, there's nothing special any more about (One conceivable objection I see to this is that it might break compatibility with packages that are currently importing Tangential aside: what is the sense in which |
In |
... and therefore you'd like to keep a separate (If I'm not inferring your wishes correctly, please go ahead and just edit the PR as you see fit - I've got it set to allow edits by maintainers!) |
…y other option" This reverts commit 43c6944.
…b.com:ExplodingCabbage/prettier into remove-false-claim-about-incompatible-options
I can't see the type changes in the resulting diff |
@ExplodingCabbage Oops, somehow overlooked it |
Type test is failing, don't know why. https://github.com/prettier/prettier/tree/main/tests/dts/unit |
Figured it out #15766 |
@thorn0 done - and |
Thanks for catching and fixing this, @ExplodingCabbage! |
…ompatible with rangeStart/rangeEnd (prettier#15750)
Description
In May 2017, @josephfrazier added the
cursorOffset
option. This initial implementation ofcursorOffset
was incompatible withrangeStart
/rangeEnd
, and so Joseph added lines to the docs aboutcursorOffset
andrangeStart
/rangeEnd
saying:and
This was all true and reasonable at the time, but the next year, in April 2018, the actual incompatibility was fixed by @ds300 in #4397. But I guess that neither he nor anyone who reviewed his PR noticed the documentation about the incompatibility still exists, because it wasn't removed at the time and still exists to this day, even though David's fix made it obsolete.
I suggest we finally remove those false statements, 5 years later. This PR does that. :)
Checklist
docs/
directory). - N/Achangelog_unreleased/*/XXXX.md
file followingchangelog_unreleased/TEMPLATE.md
.✨Try the playground for this PR✨