Skip to content

Add markers to spaced-comment block for Flow types#1966

Merged
ljharb merged 1 commit intoairbnb:masterfrom
jeffvandyke:patch-2
Aug 10, 2019
Merged

Add markers to spaced-comment block for Flow types#1966
ljharb merged 1 commit intoairbnb:masterfrom
jeffvandyke:patch-2

Conversation

@jeffvandyke
Copy link
Contributor

Tested in one of my projects - Flow allows a syntax for typing in comments, but these markers have to be added to not throw errors. Flow could do it with a space in between, but it seems like an easy enough style to allow, and a good one to follow.

@jeffvandyke
Copy link
Contributor Author

To bump this, and to make it easier to view the original motivation for this PR, I'll link to the page that describes how Flow can work with type declarations inside these comments: https://flow.org/en/docs/types/comments/

Copy link
Collaborator

@ljharb ljharb left a comment

Choose a reason for hiding this comment

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

Looks fine overall.

line: {
exceptions: ['-', '+'],
markers: ['=', '!'], // space here to support sprockets directives
// support sprockets directives
Copy link
Collaborator

Choose a reason for hiding this comment

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

please move the comments back to being inline; line length isn't worth worrying about.

Copy link
Collaborator

@ljharb ljharb left a comment

Choose a reason for hiding this comment

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

Rebased and fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants