Skip to content

Conversation

@thorn0
Copy link
Member

@thorn0 thorn0 commented Feb 18, 2020

closes #7615

  • I’ve added tests to confirm my change works.
  • (If changing the API or CLI) I’ve documented the changes I’ve made (in the docs/ directory)
  • (If the change is user-facing) I’ve added my changes to changelog_unreleased/*/pr-XXXX.md file following changelog_unreleased/TEMPLATE.md.
  • I’ve read the contributing guidelines.

Try the playground for this PR

@fisker
Copy link
Member

fisker commented Feb 18, 2020

We may want switch those support infos to JSON scheme some day.

@thorn0
Copy link
Member Author

thorn0 commented Feb 18, 2020

@fisker Would we need that version parameter for that?

@fisker
Copy link
Member

fisker commented Feb 18, 2020

I agree that we don't need it. I mean after removing this, support info is just some property validate info, we can use ajv to validate.

// we need to treat it as the normal one so as to test new features.
version = currentVersion.split("-", 1)[0];
function getSupportInfo(
_,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove this parameter, and wrap in the export?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would break type inference and overall I think the code is cleaner (less confusing) the way it is now.

Copy link
Member Author

@thorn0 thorn0 Feb 18, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nevertheless, I did something with this. (I don't like it though. Adding types to that will be difficult.)

@thorn0 thorn0 marked this pull request as ready for review February 19, 2020 09:51
Copy link
Contributor

@sosukesuzuki sosukesuzuki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job! We should fix the type definition after release.

@thorn0
Copy link
Member Author

thorn0 commented Feb 23, 2020

Merging this to move forward with other changes.

@thorn0 thorn0 merged commit cf3d9f0 into prettier:next Feb 23, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants