Skip to content

Instantly share code, notes, and snippets.

@jorilallo
Created June 30, 2016 18:03
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jorilallo/57b8a39a66ad6008463a1d4b0225ab55 to your computer and use it in GitHub Desktop.
Save jorilallo/57b8a39a66ad6008463a1d4b0225ab55 to your computer and use it in GitHub Desktop.
Flowtype config for Webpack and ES6/7
[ignore]
.*/node_modules/fbjs/.*
.*/node_modules/editions/.*
[include]
[libs]
[options]
# Support webpack's resolve.root
module.system.node.resolve_dirname=node_modules
module.system.node.resolve_dirname=src
# Support importing non-js files with webpack
module.name_mapper='^\(.*\)\.s?css$' -> '<PROJECT_ROOT>/src/interfaces/CSSModule.js.flow'
module.name_mapper.extension='jpg' -> '<PROJECT_ROOT>/src/interfaces/WebpackAsset.js.flow'
module.name_mapper.extension='png' -> '<PROJECT_ROOT>/src/interfaces/WebpackAsset.js.flow'
module.name_mapper.extension='svg' -> '<PROJECT_ROOT>/src/interfaces/WebpackAsset.js.flow'
# Support for ES7 classes
esproposal.class_static_fields=enable
esproposal.class_instance_fields=enable
# Support @decorators
esproposal.decorators=ignore
# Allow skipping individual lines
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue
suppress_comment=\\(.\\|\n\\)*\\$IgnoreGlobal
# For more docs:
# https://blog.iansinnott.com/getting-started-with-flow-and-webpack/
// @flow
// Default export
declare export default { [key: string]: string }
// @flow
declare export default string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment