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

[flow] Update the documentation and the example #9679

Merged
merged 1 commit into from
Dec 31, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ module.ignore_non_literal_requires=true
module.system.node.resolve_dirname=node_modules
module.system.node.resolve_dirname=.

suppress_type=$FlowFixMe
suppress_comment= \\(.\\|\n\\)*\\$FlowFixMe
suppress_comment= \\(.\\|\n\\)*\\$FlowExpectedError
suppress_type=$FlowToDo

[lints]

Expand Down
22 changes: 11 additions & 11 deletions docs/src/modules/components/withRoot.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,38 +66,38 @@ const pages = [
title: 'API',
},
{
pathname: '/guides/composition',
pathname: '/guides/minimizing-bundle-size',
},
{
pathname: '/guides/minimizing-bundle-size',
pathname: '/guides/interoperability',
title: 'Style Library Interoperability',
},
{
pathname: '/guides/server-rendering',
pathname: '/guides/migration-v0.x',
title: 'Migration from v0.x',
},
{
pathname: '/guides/testing',
pathname: '/guides/server-rendering',
},
{
pathname: '/guides/migration-v0.x',
title: 'Migration from v0.x',
pathname: '/guides/composition',
},
{
pathname: '/guides/comparison',
},
{
pathname: '/guides/flow',
pathname: '/guides/testing',
},
{
pathname: '/guides/typescript',
title: 'TypeScript',
},
{
pathname: '/guides/right-to-left',
title: 'Right-to-left',
pathname: '/guides/flow',
},
{
pathname: '/guides/interoperability',
title: 'Style Library Interoperability',
pathname: '/guides/right-to-left',
title: 'Right-to-left',
},
],
},
Expand Down
5 changes: 5 additions & 0 deletions docs/src/pages/guides/flow.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
You can add static typing to JavaScript to improve developer productivity and code quality thanks to [Flow](https://github.com/facebook/flow).
Have a look at the [Create React App with Flow](https://github.com/mui-org/material-ui/tree/v1-beta/examples/create-react-app-with-flow) example.

## flow-typed

[flow-typed](https://github.com/flowtype/flow-typed) is a repository of third-party library interface definitions for use with Flow.
The community is maintaining [the definitions under this project](https://github.com/flowtype/flow-typed/tree/master/definitions/npm/material-ui_v1.x.x).

## Warning

An [existing bug in flow regarding the use of higher order components (HOC)](https://github.com/facebook/flow/issues/5382)
Expand Down
31 changes: 16 additions & 15 deletions examples/create-react-app-with-flow/.flowconfig
Original file line number Diff line number Diff line change
@@ -1,35 +1,36 @@
[ignore]
<PROJECT_ROOT>/build/.*
.*/node_modules/editions
.*/node_modules/babel-plugin-flow-react-proptypes
.*/node_modules/babel-plugin-transform-react-remove-prop-types
.*/node_modules/eslint-plugin-jsx-a11y
.*/node_modules/graphql
.*/node_modules/kefir
.*/node_modules/react-event-listener/src

; Comment this line if you do not use enzyme.
.*/node_modules/material-ui/test-utils

; flow 55

<PROJECT_ROOT>/build
; FIXME: we should be flow checking against jss
.*/node_modules/jss/lib/.*\.js\.flow

[include]

[libs]

# local/custom libdefs
./flow
;./node_modules/jss/flow-typed

[options]

include_warnings=true
esproposal.class_static_fields=enable
esproposal.class_instance_fields=enable
esproposal.export_star_as=enable
esproposal.decorators=ignore

unsafe.enable_getters_and_setters=true

suppress_type=$FlowFixMe
suppress_comment= \\(.\\|\n\\)*\\$FlowFixMe
suppress_comment= \\(.\\|\n\\)*\\$FlowIgnore

[lints]

all=error
sketchy-null-bool=off
sketchy-null-mixed=off
sketchy-null-number=off
sketchy-null-string=off
unclear-type=off
untyped-import=off
untyped-type-import=off
6 changes: 3 additions & 3 deletions examples/create-react-app-with-flow/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Create React App example with Flow

## Warning
An [existing bug in flow regarding the use of higher order components (HOC)](https://github.com/facebook/flow/issues/5382)
limits the usefulness of flow by an application. As of November 27, 2017 we cannot recommend the use of flow
## Warning
An [existing bug in flow regarding the use of higher order components (HOC)](https://github.com/facebook/flow/issues/5382)
limits the usefulness of flow by an application. As of November 27, 2017 we cannot recommend the use of flow
typing in your application in conjunction with `material-ui`.

This issue is under discussion in [#9312](https://github.com/mui-org/material-ui/issues/9312).
Expand Down
249 changes: 0 additions & 249 deletions examples/create-react-app-with-flow/flow-typed/npm/enzyme_vx.x.x.js

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// flow-typed signature: 80f037b2a5143b759b6803da758cefe8
// flow-typed version: <<STUB>>/jss-preset-default_v^3.0.0/flow_v0.55.0
// flow-typed signature: d802715bad60306334f6654afd9ac46d
// flow-typed version: <<STUB>>/jss-preset-default_v^4.0.0/flow_v0.56.0

/**
* This is an autogenerated libdef stub for:
Expand Down
Loading