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

Autofix for "require-valid-file-annotation" inserts flow comment above hashbang #416

callumlocke opened this issue Jun 24, 2019 · 1 comment


Copy link

If you have a self-executable Node.js file, which starts with a Unix hashbang like #!/usr/bin/env node, and you run eslint . --fix (with flowtype/require-valid-file-annotation set to always), it inserts a // @flow comment on the top line above the hashbang, resulting in broken syntax.

In files that start with #!, this first line can never have abnything inserted before it. The actual JavaScript content effectively starts on the second line in these kind of files.

Copy link

gajus commented May 16, 2020

🎉 This issue has been resolved in version 5.0.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@gajus gajus added the released label May 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

2 participants