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

Implement a Flow plugin for Razzle #676

Closed

Conversation

pugnascotia
Copy link

This PR adds a plugin that adds Flow typing. The plugin:

  • Adds a webpack plugin to run Flow typing during the Webpack build
  • Amends the Babel config to add the Flow preset
  • Amends the ESLint config to add the Flow preset and recommended rules

To test:

  1. Create a Razzle app
  2. Add the plugin.
  3. Start it (it should start cleanly)
  4. Edit src/App.js and add the line const foo: number = 's'; e.g. after the imports
  5. ESLint will complain about the unused variable but cope with the Flow syntax.
  6. Flow will complain about a type mismatch

@jaredpalmer
Copy link
Owner

👋🏻 Hey! Thanks for this PR. It looks good. Unfortunately, beyond being a breaking change, I am not able to commit resources to maintaining any Flow or Flow-related code at this time. If you’d like to publish this as a standalone plugin, feel free.

@pugnascotia
Copy link
Author

Thanks, I've done as you suggested - https://www.npmjs.com/package/razzle-plugin-flow

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.

2 participants