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 respect to @noflow annotation #451

Merged
merged 3 commits into from Jun 30, 2020
Merged

Conversation

andrejs-sisojevs
Copy link
Contributor

Fixes #450
Added respect to @noflow annotation.
Notice: npm run create-readme didn't work for me - failed with error Branch ("master") definition does not exist in the config

andrejs.sisojevs added 2 commits June 29, 2020 17:08
…onlyFilesWithFlowAnnotation` should not be enabled and file not marked with @noflow
…leAnnotation` - respect onlyFilesWithFlowAnnotation == true
@@ -88,7 +88,7 @@ export default {
recommended,
},
rules: _.mapValues(rules, (rule, key) => {
if (key === 'no-types-missing-file-annotation') {
if (['no-types-missing-file-annotation', 'require-valid-file-annotation'].includes(key)) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Had to change the way how require-valid-file-annotation works with onlyFilesWithFlowAnnotation setting, because of breaking change in checkFlowFileAnnotation.js

return false;
}

return !strict || match[0] === '@noflow';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This file is a copy of "isFlowFileAnnotation.js" with only changes in regex and on this line

@andrejs-sisojevs
Copy link
Contributor Author

@gajus is there any way I can help advance this PR?

@gajus gajus merged commit e93f1c0 into gajus:master Jun 30, 2020
@gajus
Copy link
Owner

gajus commented Jun 30, 2020

🎉 This PR is included in version 5.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

require-return-type should not trigger, if file is annotated with @noflow
2 participants