Skip to content

[Request For Comments] fix: @flow flag does not need to be first comment#240

Merged
gajus merged 1 commit into
gajus:masterfrom
scott-silver:silver/check-all-comments
Jun 28, 2017
Merged

[Request For Comments] fix: @flow flag does not need to be first comment#240
gajus merged 1 commit into
gajus:masterfrom
scott-silver:silver/check-all-comments

Conversation

@scott-silver

@scott-silver scott-silver commented Jun 8, 2017

Copy link
Copy Markdown
Contributor

eslint-plugin-flowtype rules require that the // @flow comment be the first line of a file.

This is stricter than Flow requires (emphasis in original), which simply requires the comment appear before any code:

The Flow background process monitors all Flow files. However, how does it know which files are Flow files and, thus, should be checked? Placing the following before any code in a JavaScript file is the flag the process uses to answer that question.

1 // @flow

This PR updates noTypesMissingFileAnnotation to allows a comment to appear before the @flow comment.

This likely has more implications for requireValidFileAnnotation, however.

@scott-silver

Copy link
Copy Markdown
Contributor Author

ping @gajus

@julienw

julienw commented Jun 29, 2017

Copy link
Copy Markdown

thx ! Now I just need a new release :D

@gajus

gajus commented Jun 30, 2017

Copy link
Copy Markdown
Owner

The release is done automatically after the commit is merged.

@julienw

julienw commented Jun 30, 2017

Copy link
Copy Markdown

oh I see, thanks ! I didn't see any change to package.json, that's why I was confused.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants