chore: Update flow just far enough to get hooks libdefs (#1348)

This commit is contained in:
Tom Moor
2020-07-13 20:23:15 -07:00
committed by GitHub
parent f4a4f034cf
commit 943a290b83
8 changed files with 5 additions and 13 deletions

View File

@ -154,7 +154,6 @@ function Button({
); );
} }
// $FlowFixMe - need to upgrade to get forwardRef
export default React.forwardRef((props, ref) => ( export default React.forwardRef((props, ref) => (
<Button {...props} innerRef={ref} /> <Button {...props} innerRef={ref} />
)); ));

View File

@ -110,7 +110,6 @@ const EditorTooltip = ({ children, ...props }) => (
const EditorWithRouterAndTheme = withRouter(withTheme(Editor)); const EditorWithRouterAndTheme = withRouter(withTheme(Editor));
// $FlowIssue - https://github.com/facebook/flow/issues/6103
export default React.forwardRef((props, ref) => ( export default React.forwardRef((props, ref) => (
<EditorWithRouterAndTheme {...props} forwardedRef={ref} /> <EditorWithRouterAndTheme {...props} forwardedRef={ref} />
)); ));

View File

@ -20,7 +20,6 @@ const Button = styled.button`
} }
`; `;
// $FlowFixMe - need to upgrade to get forwardRef
export default React.forwardRef((props, ref) => ( export default React.forwardRef((props, ref) => (
<Button {...props} ref={ref} /> <Button {...props} ref={ref} />
)); ));

View File

@ -6,10 +6,8 @@ import SidebarLink from "./SidebarLink";
import { version } from "../../../../package.json"; import { version } from "../../../../package.json";
export default function Version() { export default function Version() {
// $FlowFixMe
const [releasesBehind, setReleasesBehind] = React.useState(0); const [releasesBehind, setReleasesBehind] = React.useState(0);
// $FlowFixMe
React.useEffect(() => { React.useEffect(() => {
async function loadReleases() { async function loadReleases() {
let out = 0; let out = 0;

View File

@ -79,7 +79,6 @@ const StyledIframe = styled(Iframe)`
border-radius: 3px; border-radius: 3px;
`; `;
// $FlowIssue - https://github.com/facebook/flow/issues/6103
export default React.forwardRef((props, ref) => ( export default React.forwardRef((props, ref) => (
<Frame {...props} forwardedRef={ref} /> <Frame {...props} forwardedRef={ref} />
)); ));

View File

@ -13,11 +13,9 @@ type Props = {
}; };
export default function Contents({ headings }: Props) { export default function Contents({ headings }: Props) {
// $FlowFixMe
const [activeSlug, setActiveSlug] = React.useState(); const [activeSlug, setActiveSlug] = React.useState();
const position = useWindowScrollPosition({ throttle: 100 }); const position = useWindowScrollPosition({ throttle: 100 });
// $FlowFixMe
React.useEffect( React.useEffect(
() => { () => {
for (let key = 0; key < headings.length; key++) { for (let key = 0; key < headings.length; key++) {

View File

@ -176,7 +176,7 @@
"eslint-plugin-prettier": "^2.4.0", "eslint-plugin-prettier": "^2.4.0",
"eslint-plugin-react": "^7.12.4", "eslint-plugin-react": "^7.12.4",
"fetch-test-server": "^1.1.0", "fetch-test-server": "^1.1.0",
"flow-bin": "^0.86.0", "flow-bin": "^0.88.0",
"identity-obj-proxy": "^3.0.0", "identity-obj-proxy": "^3.0.0",
"jest-cli": "^22.0.0", "jest-cli": "^22.0.0",
"koa-webpack-dev-middleware": "^1.4.5", "koa-webpack-dev-middleware": "^1.4.5",

View File

@ -3959,10 +3959,10 @@ flatted@^2.0.0:
resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.2.tgz#4575b21e2bcee7434aa9be662f4b7b5f9c2b5138" resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.2.tgz#4575b21e2bcee7434aa9be662f4b7b5f9c2b5138"
integrity sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA== integrity sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==
flow-bin@^0.86.0: flow-bin@^0.88.0:
version "0.86.0" version "0.88.0"
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.86.0.tgz#153a28722b4dc13b7200c74b644dd4d9f4969a11" resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.88.0.tgz#e4c7bd93da2331f6ac1733fbe484b1b0c52eb548"
integrity sha512-ulRvFH3ewGIYwg+qPk/OJXoe3Nhqi0RyR0wqgK0b1NzUDEC6O99zU39MBTickXvlrr6iwRO6Wm4lVGeDmnzbew== integrity sha512-SnUCuhHP0JZaXQ83w4iTthfTInAg8DIBZCo1xIqDhFmQ6XNEMYMwYhPoMQyELRrkbTpyCYmf4g93y0UQw0dibw==
flow-typed@^2.6.2: flow-typed@^2.6.2:
version "2.6.2" version "2.6.2"