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

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

Merged
merged 1 commit into from
Aug 10, 2019

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.

@@ -491,11 +491,13 @@ module.exports = {
'spaced-comment': ['error', 'always', {
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.

None yet

2 participants