Skip to content

Instantly share code, notes, and snippets.

@jptcnde
Forked from jorilallo/.flowconfig
Created April 8, 2017 04:08
Show Gist options
  • Save jptcnde/a958d7bbc99f251f83ecb0ed0bd9138d to your computer and use it in GitHub Desktop.
Save jptcnde/a958d7bbc99f251f83ecb0ed0bd9138d 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