Skip to content

Remove claim, untrue since over 5 years ago, that cursorOffset is incompatible with rangeStart/rangeEnd#15750

Merged
thorn0 merged 12 commits intoprettier:mainfrom
ExplodingCabbage:remove-false-claim-about-incompatible-options
Dec 8, 2023
Merged

Remove claim, untrue since over 5 years ago, that cursorOffset is incompatible with rangeStart/rangeEnd#15750
thorn0 merged 12 commits intoprettier:mainfrom
ExplodingCabbage:remove-false-claim-about-incompatible-options

Conversation

@ExplodingCabbage
Copy link
Copy Markdown
Contributor

@ExplodingCabbage ExplodingCabbage commented Dec 4, 2023

Description

In May 2017, @josephfrazier added the cursorOffset option. This initial implementation of cursorOffset was incompatible with rangeStart/rangeEnd, and so Joseph added lines to the docs about cursorOffset and rangeStart/rangeEnd saying:

This option ... cannot be used with rangeStart and rangeEnd.

and

This option cannot be used with cursorOffset.

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

  • I’ve added tests to confirm my change works. - No reason to, though I've updated existing snapshots as needed.
  • (If changing the API or CLI) I’ve documented the changes I’ve made (in the docs/ directory). - N/A
  • (If the change is user-facing) I’ve added my changes to changelog_unreleased/*/XXXX.md file following changelog_unreleased/TEMPLATE.md.
  • I’ve read the contributing guidelines.

Try the playground for this PR

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants