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: object-type-curly-spacing should not trim multi-line expressions #481

Merged

Conversation

angelica-bocanegra
Copy link
Contributor

@angelica-bocanegra angelica-bocanegra commented Apr 23, 2021

closes #480
object-type-curly-spacing does not get triggered when the token and brace are not on the same line.

2 Scenarios:

  • opening brace & first token must be on the same line
  • closing brace & last token must be on the same line

The following are valid under the object-type-curly-spacing rule:

Option: Never

type bar = {
  rew: string,
  yup: string,}

type bar = {
  rew: string,
  yup: string,
}

type bar = {
  rew: string,
  yup: string,
                }

Option: Always

type bar = {
  rew: string,
  yup: string, }

type bar = {
  rew: string,
  yup: string,
}

type bar = { 
  rew: string,
  yup: string,
                }

@gajus

@gajus gajus merged commit d2f6d9b into gajus:master Apr 23, 2021
@gajus
Copy link
Owner

gajus commented Apr 23, 2021

🎉 This PR is included in version 5.7.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@gajus gajus added the released label Apr 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

object-type-curly-spacing should not trim multi-line expressions
2 participants