Browse Source
build(flow): add name mappers for resolved imports
renovate/lint-staged-8.x
Tom Kirkpatrick
7 years ago
No known key found for this signature in database
GPG Key ID: 72203A8EC5967EA8
1 changed files with
13 additions and
3 deletions
-
.flowconfig
|
|
@ -19,11 +19,21 @@ flow-typed |
|
|
|
esproposal.class_static_fields=enable |
|
|
|
esproposal.class_instance_fields=enable |
|
|
|
esproposal.export_star_as=enable |
|
|
|
|
|
|
|
# Map stylesheets to csssmodule tyoe def |
|
|
|
module.name_mapper.extension='css' -> '<PROJECT_ROOT>/internals/flow/CSSModule.js.flow' |
|
|
|
module.name_mapper.extension='styl' -> '<PROJECT_ROOT>/internals/flow/CSSModule.js.flow' |
|
|
|
module.name_mapper.extension='scss' -> '<PROJECT_ROOT>/internals/flow/CSSModule.js.flow' |
|
|
|
|
|
|
|
# Map stylesheets to csssmodule tyoe def |
|
|
|
module.name_mapper.extension='png' -> '<PROJECT_ROOT>/internals/flow/WebpackAsset.js.flow' |
|
|
|
module.name_mapper.extension='jpg' -> '<PROJECT_ROOT>/internals/flow/WebpackAsset.js.flow' |
|
|
|
module.system.node.resolve_dirname=app |
|
|
|
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe |
|
|
|
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue |
|
|
|
|
|
|
|
# Map webpack resolved module imports to the app directory |
|
|
|
# Example: components/Foo -> `<project_root>/app/components/Foo` |
|
|
|
module.name_mapper='^components/\(.*\)$' -> '<PROJECT_ROOT>/app/components/\1' |
|
|
|
module.name_mapper='^containers/\(.*\)$' -> '<PROJECT_ROOT>/app/containers/\1' |
|
|
|
module.name_mapper='^lib/\(.*\)$' -> '<PROJECT_ROOT>/app/lib/\1' |
|
|
|
module.name_mapper='^reducers/\(.*\)$' -> '<PROJECT_ROOT>/app/reducers/\1' |
|
|
|
module.name_mapper='^routes/\(.*\)$' -> '<PROJECT_ROOT>/app/routes/\1' |
|
|
|
module.name_mapper='^store/\(.*\)$' -> '<PROJECT_ROOT>/app/store/\1' |
|
|
|