Skip to content
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

Don’t remove generics in object methods in TS #5824

Closed
wants to merge 4 commits into from

Conversation

j-f1
Copy link
Member

@j-f1 j-f1 commented Feb 2, 2019

Fixes #5817.

  • I’ve added tests to confirm my change works.
  • (If not an internal change) I’ve added my changes to the CHANGELOG.unreleased.md file following the template.
  • I’ve read the contributing guidelines.

Try the playground for this PR

@j-f1 j-f1 requested a review from ikatyang February 2, 2019 13:04
JamesHenry
JamesHenry previously approved these changes Feb 2, 2019
src/language-js/printer-estree.js Outdated Show resolved Hide resolved
@@ -84,3 +84,29 @@ Examples:
// Output (Prettier master)
<my-element data-for={value}></my-element>
```

- TypeScript: Don’t remove generics in object methods in TS ([#5824] by [@j-f1])
Copy link
Member

Choose a reason for hiding this comment

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

Given that this bug was "fixed" in 1.16.x (#5818), I'm not sure if we should document it here since it could be considered an internal change (#5799 + this PR).

@JamesHenry JamesHenry dismissed their stale review February 4, 2019 23:50

@armano2 pointed out other issues and we have an AST update

Copy link
Collaborator

@JamesHenry JamesHenry left a comment

Choose a reason for hiding this comment

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

We should try with the latest canary release, we have fixed the AST regressions, and add missing coverage pointed out by @armano2

The release is 1.2.1-alpha.11

@JamesHenry
Copy link
Collaborator

JamesHenry commented Feb 5, 2019

@j-f1 I tried to save you some time and make the changes, but I don't have permission to push to your fork

Here are the changes: https://github.com/prettier/prettier/compare/pr/j-f1/5824-patches?expand=1

As you can see, it is basically just bump typescript-estree, revert all your other changes, add extra coverage.

The tests all pass locally for me with AST_COMPARE

@armano2
Copy link
Contributor

armano2 commented Feb 8, 2019

1.3.0 of @typescript-eslint/typescript-estree got released

brodybits pushed a commit to bangkokjs/prettierx-0.4.x-fork that referenced this pull request Mar 19, 2019
taken from the following PR: prettier#5824

Note that this test is not expected to succeed with outdated
@typescript-eslint/typescript-estree dependendcy.

Co-authored-by: Jed Fox <git@twopointzero.us>
Co-authored-by: Christopher J. Brody <chris@brody.consulting>
brodybits pushed a commit to bangkokjs/prettierx-0.4.x-fork that referenced this pull request Mar 19, 2019
as proposed in the following PR: prettier#5824

Note that this test is not expected to succeed without code changes
when using an outdated version of the following dependency:
@typescript-eslint/typescript-estree

Co-authored-by: Jed Fox <git@twopointzero.us>
Co-authored-by: Christopher J. Brody <chris@brody.consulting>
brodybits pushed a commit to bangkokjs/prettierx-0.4.x-fork that referenced this pull request Mar 19, 2019
resolves the issue with generics in object methods in TypeScript

and passes the test proposed in the following PR: prettier#5824

resolves prettier#5817
brodybits pushed a commit to bangkokjs/prettierx-0.4.x-fork that referenced this pull request Apr 4, 2019
as proposed in the following PR: prettier#5824

Note that this test is not expected to succeed without code changes
when using an outdated version of the following dependency:
@typescript-eslint/typescript-estree

Co-authored-by: Jed Fox <git@twopointzero.us>
Co-authored-by: Christopher J. Brody <chris@brody.consulting>
brodybits pushed a commit to bangkokjs/prettierx-0.4.x-fork that referenced this pull request Apr 4, 2019
as proposed by @j-f1 in the following PR: prettier#5824

should validate that prettier#5817 does not reappear

Co-authored-by: Jed Fox <git@twopointzero.us>
Co-authored-by: Christopher J. Brody <chris@brody.consulting>
brodybits pushed a commit to bangkokjs/prettierx-0.4.x-fork that referenced this pull request Apr 4, 2019
as proposed by @j-f1 in the following PR: prettier#5824

should validate that issue prettier#5817 does not reappear

closes prettier#5817 as resolved and tested

Co-authored-by: Jed Fox <git@twopointzero.us>
Co-authored-by: Christopher J. Brody <chris@brody.consulting>
brodybits pushed a commit to bangkokjs/prettierx-0.4.x-fork that referenced this pull request Apr 4, 2019
as proposed by @j-f1 in the following PR: prettier#5824

should validate that issue prettier#5817 does not reappear

this change closes prettier#5817 as resolved and tested

this change closes prettier#5824 (PR prettier#5824) as superseded

Co-authored-by: Jed Fox <git@twopointzero.us>
Co-authored-by: Christopher J. Brody <chris@brody.consulting>
@brodybits
Copy link
Contributor

I think this proposal should be closed as superseded by the following changes:

The change proposed in PR #5989 should close this one if it is merged.

@duailibe duailibe closed this Apr 8, 2019
@lock lock bot added the locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. label Jul 8, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jul 8, 2019
@fisker
Copy link
Sponsor Member

fisker commented Sep 10, 2020

I'm going to delete the branch for this PR, pr/j-f1/5824-patches

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TypeScript generics are removed incorrectly
9 participants