gajus / eslint-plugin-flowtype

Flow type linting rules for ESLint.
Other
1.08k stars 153 forks source link

object-type-curly-spacing should not trim multi-line expressions #480

Closed gajus closed 3 years ago

gajus commented 3 years ago

Input:

const slackUserSnackTimeEventInvitation: {|
  +id: DatabaseRecordIdType,
  +snackTimeEventId: DatabaseRecordIdType,
  +slackUserId: DatabaseConnectionType,
  +timezoneName: string,
|} = await connection.one(sql`

becomes:

const slackUserSnackTimeEventInvitation: {|
  +id: DatabaseRecordIdType,
  +snackTimeEventId: DatabaseRecordIdType,
  +slackUserId: DatabaseConnectionType,
  +timezoneName: string,|} = await connection.one(sql`

This seems undesirable.

gajus commented 3 years ago

@angelica-bocanegra

angelica-bocanegra commented 3 years ago

Ah okay I will fix this, looking at eslint's implementation of object-type-curly-spacing the rule is triggered only when the token and curly brace is on the same line. I will add a check see when it is on the same line or not 👍

gajus commented 3 years ago

Thank you

gajus commented 3 years ago

:tada: This issue has been resolved in version 5.7.2 :tada:

The release is available on:

Your semantic-release bot :package::rocket: