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

fix(javascript): inline property decorator should stay inline (part 2) #5423

Merged
merged 6 commits into from Nov 10, 2018

Conversation

ikatyang
Copy link
Member

@ikatyang ikatyang commented Nov 9, 2018

Fixes cases mentioned in #5360 (comment)

  • 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)
  • I’ve read the contributing guidelines.

Try the playground for this PR

@ikatyang ikatyang changed the title fix(javascript): inline property decorator should stay inline (part 2) fix(javascript): inline decorator should stay inline Nov 9, 2018
@@ -99,24 +99,6 @@ class HeroButtonComponent {
}
```

There's one exception: classes. We don't think it ever makes sense to inline the decorators for them, so they are always moved to their own line.
Copy link
Member Author

Choose a reason for hiding this comment

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

@ikatyang ikatyang requested a review from lydell November 9, 2018 12:38
Copy link
Member

@duailibe duailibe left a comment

Choose a reason for hiding this comment

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

I agree with the property changes, but the classes I don't think we should change 🤷‍♂️

It was one person who "complained" and also noted the mobx docs have example of both kinds, but I'm not willing do die on any particular hill these days, so you all are free to decide which is best.

@ikatyang
Copy link
Member Author

ikatyang commented Nov 9, 2018

OK, let's bisect them from this PR and see how people think about it.

@ikatyang ikatyang changed the title fix(javascript): inline decorator should stay inline fix(javascript): inline property decorator should stay inline (part 2) Nov 9, 2018
@ikatyang ikatyang merged commit 8b1260a into prettier:master Nov 10, 2018
@ikatyang ikatyang deleted the fix/javascript/inline-decorator branch November 10, 2018 08:44
@lock lock bot added the locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. label Feb 8, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Feb 8, 2019
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.

None yet

4 participants