diff --git a/flow-typed/gatsby.js b/flow-typed/gatsby.js index 8fec2756..b7b8bcaa 100644 --- a/flow-typed/gatsby.js +++ b/flow-typed/gatsby.js @@ -1,3 +1,7 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. + */ + declare module 'gatsby' { declare module.exports: any; } diff --git a/flow-typed/glamor.js b/flow-typed/glamor.js index 1c87bfc2..973abe92 100644 --- a/flow-typed/glamor.js +++ b/flow-typed/glamor.js @@ -1,3 +1,7 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. + */ + declare module 'glamor' { declare module.exports: { css: { diff --git a/flow-typed/hex2rgba.js b/flow-typed/hex2rgba.js index 3d67cf8d..1d7395e0 100644 --- a/flow-typed/hex2rgba.js +++ b/flow-typed/hex2rgba.js @@ -1,3 +1,7 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. + */ + declare module 'hex2rgba' { declare module.exports: (hex: string, alpha?: number) => string; } diff --git a/flow-typed/react-helmet.js b/flow-typed/react-helmet.js index a614e9ad..c2cbcb24 100644 --- a/flow-typed/react-helmet.js +++ b/flow-typed/react-helmet.js @@ -1,3 +1,7 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. + */ + declare module 'react-helmet' { declare module.exports: any; } diff --git a/flow-typed/slugify.js b/flow-typed/slugify.js index 82a44ce4..c1fb6e19 100644 --- a/flow-typed/slugify.js +++ b/flow-typed/slugify.js @@ -1,3 +1,7 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. + */ + declare module 'slugify' { declare module.exports: any; } diff --git a/gatsby-browser.js b/gatsby-browser.js index 83d72722..a6d4cffe 100644 --- a/gatsby-browser.js +++ b/gatsby-browser.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * @emails react-core */ diff --git a/gatsby-config.js b/gatsby-config.js index 2637eac9..5cc37952 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * @emails react-core */ diff --git a/gatsby-node.js b/gatsby-node.js index 83d7ae0f..b8943349 100644 --- a/gatsby-node.js +++ b/gatsby-node.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * @emails react-core */ diff --git a/gatsby/createPages.js b/gatsby/createPages.js index 88302896..38092c7f 100644 --- a/gatsby/createPages.js +++ b/gatsby/createPages.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * @emails react-core */ diff --git a/gatsby/onCreateNode.js b/gatsby/onCreateNode.js index 0e6e9934..66625420 100644 --- a/gatsby/onCreateNode.js +++ b/gatsby/onCreateNode.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * @emails react-core */ diff --git a/gatsby/onCreatePage.js b/gatsby/onCreatePage.js index 7776438f..81914edd 100644 --- a/gatsby/onCreatePage.js +++ b/gatsby/onCreatePage.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * @emails react-core */ diff --git a/gatsby/onCreateWebpackConfig.js b/gatsby/onCreateWebpackConfig.js index 61f858bf..f1d282d1 100644 --- a/gatsby/onCreateWebpackConfig.js +++ b/gatsby/onCreateWebpackConfig.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * @emails react-core */ diff --git a/plugins/gatsby-remark-header-custom-ids/gatsby-client.js b/plugins/gatsby-remark-header-custom-ids/gatsby-client.js index 6b24d0b1..c0e8cf28 100644 --- a/plugins/gatsby-remark-header-custom-ids/gatsby-client.js +++ b/plugins/gatsby-remark-header-custom-ids/gatsby-client.js @@ -1,3 +1,7 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. + */ + let offsetY = 0; const getTargetOffset = hash => { diff --git a/plugins/gatsby-remark-header-custom-ids/gatsby-ssr.js b/plugins/gatsby-remark-header-custom-ids/gatsby-ssr.js index c616fc28..60bce60a 100644 --- a/plugins/gatsby-remark-header-custom-ids/gatsby-ssr.js +++ b/plugins/gatsby-remark-header-custom-ids/gatsby-ssr.js @@ -1,3 +1,7 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. + */ + const React = require(`react`); const pluginDefaults = { diff --git a/plugins/gatsby-remark-header-custom-ids/index.js b/plugins/gatsby-remark-header-custom-ids/index.js index df645707..aa24fdcc 100644 --- a/plugins/gatsby-remark-header-custom-ids/index.js +++ b/plugins/gatsby-remark-header-custom-ids/index.js @@ -1,3 +1,7 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. + */ + /*! * Based on 'gatsby-remark-autolink-headers' * Original Author: Kyle Mathews diff --git a/plugins/gatsby-remark-use-jsx/index.js b/plugins/gatsby-remark-use-jsx/index.js index c76a2276..0bf0380a 100644 --- a/plugins/gatsby-remark-use-jsx/index.js +++ b/plugins/gatsby-remark-use-jsx/index.js @@ -1,3 +1,7 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. + */ + const visit = require('unist-util-visit'); // Always treat JS blocks as JSX. diff --git a/plugins/gatsby-source-react-error-codes/gatsby-node.js b/plugins/gatsby-source-react-error-codes/gatsby-node.js index a02cdf9c..b3c04722 100644 --- a/plugins/gatsby-source-react-error-codes/gatsby-node.js +++ b/plugins/gatsby-source-react-error-codes/gatsby-node.js @@ -1,3 +1,7 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. + */ + const request = require('request-promise'); const errorCodesUrl = diff --git a/plugins/gatsby-transformer-authors-yaml/gatsby-node.js b/plugins/gatsby-transformer-authors-yaml/gatsby-node.js index bb5ca8bc..04bfc98e 100644 --- a/plugins/gatsby-transformer-authors-yaml/gatsby-node.js +++ b/plugins/gatsby-transformer-authors-yaml/gatsby-node.js @@ -1,3 +1,7 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. + */ + const readFileSync = require('fs').readFileSync; const resolve = require('path').resolve; const safeLoad = require('js-yaml').safeLoad; diff --git a/plugins/gatsby-transformer-home-example-code/gatsby-node.js b/plugins/gatsby-transformer-home-example-code/gatsby-node.js index 4e273ce2..815ea29d 100644 --- a/plugins/gatsby-transformer-home-example-code/gatsby-node.js +++ b/plugins/gatsby-transformer-home-example-code/gatsby-node.js @@ -1,3 +1,7 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. + */ + const crypto = require('crypto'); const path = require('path'); diff --git a/plugins/gatsby-transformer-versions-yaml/create-redirects.js b/plugins/gatsby-transformer-versions-yaml/create-redirects.js index af9c49a5..29a25c32 100644 --- a/plugins/gatsby-transformer-versions-yaml/create-redirects.js +++ b/plugins/gatsby-transformer-versions-yaml/create-redirects.js @@ -1,3 +1,7 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. + */ + const {appendFile, exists, readFile, writeFile} = require('fs-extra'); const HEADER_COMMENT = `## Created with gatsby-transformer-versions-yaml`; diff --git a/plugins/gatsby-transformer-versions-yaml/gatsby-node.js b/plugins/gatsby-transformer-versions-yaml/gatsby-node.js index a5396891..e4baa888 100644 --- a/plugins/gatsby-transformer-versions-yaml/gatsby-node.js +++ b/plugins/gatsby-transformer-versions-yaml/gatsby-node.js @@ -1,3 +1,7 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. + */ + const readFileSync = require('fs').readFileSync; const resolve = require('path').resolve; const safeLoad = require('js-yaml').safeLoad; diff --git a/scripts/generateHeadingIDs.js b/scripts/generateHeadingIDs.js index a8130edf..2a051764 100644 --- a/scripts/generateHeadingIDs.js +++ b/scripts/generateHeadingIDs.js @@ -1,3 +1,7 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. + */ + const fs = require('fs'); const GithubSlugger = require('github-slugger'); diff --git a/src/components/ButtonLink/ButtonLink.js b/src/components/ButtonLink/ButtonLink.js index 9367fe2b..0732aa05 100644 --- a/src/components/ButtonLink/ButtonLink.js +++ b/src/components/ButtonLink/ButtonLink.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * @emails react-core */ diff --git a/src/components/ButtonLink/index.js b/src/components/ButtonLink/index.js index f4ed7b7a..4125bb2e 100644 --- a/src/components/ButtonLink/index.js +++ b/src/components/ButtonLink/index.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * @emails react-core */ diff --git a/src/components/CodeEditor/CodeEditor.js b/src/components/CodeEditor/CodeEditor.js index 2abb8ad4..881865bc 100644 --- a/src/components/CodeEditor/CodeEditor.js +++ b/src/components/CodeEditor/CodeEditor.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * @emails react-core */ diff --git a/src/components/CodeEditor/index.js b/src/components/CodeEditor/index.js index 4cd1787d..cc755885 100644 --- a/src/components/CodeEditor/index.js +++ b/src/components/CodeEditor/index.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * @emails react-core */ diff --git a/src/components/CodeExample/CodeExample.js b/src/components/CodeExample/CodeExample.js index bc5d6ed1..6bb7e1ab 100644 --- a/src/components/CodeExample/CodeExample.js +++ b/src/components/CodeExample/CodeExample.js @@ -1,10 +1,23 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. + * + * @flow + */ + import React, {Component} from 'react'; -import PropTypes from 'prop-types'; import {colors, media} from 'theme'; import CodeEditor from '../CodeEditor/CodeEditor'; -class CodeExample extends Component { +type Props = {| + children: React$Node, + code: boolean, + containerNodeID: string, + id: string, + loaded: boolean, +|}; + +class CodeExample extends Component { render() { const {children, code, id, containerNodeID, loaded} = this.props; return ( @@ -68,10 +81,4 @@ class CodeExample extends Component { } } -CodeExample.propTypes = { - children: PropTypes.node, - code: PropTypes.string.isRequired, - loaded: PropTypes.bool.isRequired, -}; - export default CodeExample; diff --git a/src/components/CodeExample/index.js b/src/components/CodeExample/index.js index 6bff868c..201835a1 100644 --- a/src/components/CodeExample/index.js +++ b/src/components/CodeExample/index.js @@ -1,3 +1,9 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. + * + * @flow + */ + import CodeExample from './CodeExample'; export default CodeExample; diff --git a/src/components/Container/Container.js b/src/components/Container/Container.js index 36c932ea..c03560e5 100644 --- a/src/components/Container/Container.js +++ b/src/components/Container/Container.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * @emails react-core * @flow diff --git a/src/components/Container/index.js b/src/components/Container/index.js index 6270e9c6..da0bada2 100644 --- a/src/components/Container/index.js +++ b/src/components/Container/index.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * @emails react-core */ diff --git a/src/components/ErrorDecoder/ErrorDecoder.js b/src/components/ErrorDecoder/ErrorDecoder.js index d179a09b..f9d2a738 100644 --- a/src/components/ErrorDecoder/ErrorDecoder.js +++ b/src/components/ErrorDecoder/ErrorDecoder.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * @emails react-core * @flow diff --git a/src/components/ErrorDecoder/index.js b/src/components/ErrorDecoder/index.js index a3762d42..1a9113b3 100644 --- a/src/components/ErrorDecoder/index.js +++ b/src/components/ErrorDecoder/index.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * @emails react-core */ diff --git a/src/components/Flex/Flex.js b/src/components/Flex/Flex.js index 4d7e74ae..da93feca 100644 --- a/src/components/Flex/Flex.js +++ b/src/components/Flex/Flex.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * @emails react-core * @flow diff --git a/src/components/Flex/index.js b/src/components/Flex/index.js index 47818263..8de05559 100644 --- a/src/components/Flex/index.js +++ b/src/components/Flex/index.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * @emails react-core */ diff --git a/src/components/Header/Header.js b/src/components/Header/Header.js index 39422d95..66a05718 100644 --- a/src/components/Header/Header.js +++ b/src/components/Header/Header.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * @emails react-core * @flow diff --git a/src/components/Header/index.js b/src/components/Header/index.js index 239c1152..057fc4c8 100644 --- a/src/components/Header/index.js +++ b/src/components/Header/index.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * @emails react-core */ diff --git a/src/components/Layout/Layout.js b/src/components/Layout/Layout.js index dc727c08..82e2e128 100644 --- a/src/components/Layout/Layout.js +++ b/src/components/Layout/Layout.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * @emails react-core * @flow diff --git a/src/components/Layout/index.js b/src/components/Layout/index.js index 67d6127d..c5e951e6 100644 --- a/src/components/Layout/index.js +++ b/src/components/Layout/index.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * @emails react-core */ diff --git a/src/components/LayoutFooter/ExternalFooterLink.js b/src/components/LayoutFooter/ExternalFooterLink.js index db061f4a..600f0d1a 100644 --- a/src/components/LayoutFooter/ExternalFooterLink.js +++ b/src/components/LayoutFooter/ExternalFooterLink.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * @emails react-core * @flow diff --git a/src/components/LayoutFooter/Footer.js b/src/components/LayoutFooter/Footer.js index 34c44db6..59418872 100644 --- a/src/components/LayoutFooter/Footer.js +++ b/src/components/LayoutFooter/Footer.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * @emails react-core * @flow diff --git a/src/components/LayoutFooter/FooterLink.js b/src/components/LayoutFooter/FooterLink.js index 5469e4a0..5606c4e0 100644 --- a/src/components/LayoutFooter/FooterLink.js +++ b/src/components/LayoutFooter/FooterLink.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * @emails react-core * @flow diff --git a/src/components/LayoutFooter/FooterNav.js b/src/components/LayoutFooter/FooterNav.js index d94c7db6..2a2deda1 100644 --- a/src/components/LayoutFooter/FooterNav.js +++ b/src/components/LayoutFooter/FooterNav.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * @emails react-core * @flow diff --git a/src/components/LayoutFooter/SectionLinks.js b/src/components/LayoutFooter/SectionLinks.js index 6bc75889..a5e30311 100644 --- a/src/components/LayoutFooter/SectionLinks.js +++ b/src/components/LayoutFooter/SectionLinks.js @@ -1,7 +1,22 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. + * + * @flow + */ + import React from 'react'; import ExternalFooterLink from './ExternalFooterLink'; import FooterLink from './FooterLink'; +type Link = {| + title: string, + to: string, +|}; + +type Props = {| + links: Array, +|}; + const SectionLinks = ({links}: Props) => links.map(item => { if (item.external) { diff --git a/src/components/LayoutFooter/index.js b/src/components/LayoutFooter/index.js index 1ffbe907..e301318f 100644 --- a/src/components/LayoutFooter/index.js +++ b/src/components/LayoutFooter/index.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * @emails react-core */ diff --git a/src/components/LayoutHeader/DocSearch.js b/src/components/LayoutHeader/DocSearch.js index f9827fc5..f9b2e576 100644 --- a/src/components/LayoutHeader/DocSearch.js +++ b/src/components/LayoutHeader/DocSearch.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * @emails react-core * @flow diff --git a/src/components/LayoutHeader/Header.js b/src/components/LayoutHeader/Header.js index 9a49192e..b7f3ec7b 100644 --- a/src/components/LayoutHeader/Header.js +++ b/src/components/LayoutHeader/Header.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * @emails react-core * @flow diff --git a/src/components/LayoutHeader/HeaderLink.js b/src/components/LayoutHeader/HeaderLink.js index 0534238f..28c14497 100644 --- a/src/components/LayoutHeader/HeaderLink.js +++ b/src/components/LayoutHeader/HeaderLink.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * @emails react-core * @flow diff --git a/src/components/LayoutHeader/SearchSvg.js b/src/components/LayoutHeader/SearchSvg.js index e3604b32..6d407a1a 100644 --- a/src/components/LayoutHeader/SearchSvg.js +++ b/src/components/LayoutHeader/SearchSvg.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * @emails react-core */ diff --git a/src/components/LayoutHeader/index.js b/src/components/LayoutHeader/index.js index 239c1152..057fc4c8 100644 --- a/src/components/LayoutHeader/index.js +++ b/src/components/LayoutHeader/index.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * @emails react-core */ diff --git a/src/components/MarkdownHeader/MarkdownHeader.js b/src/components/MarkdownHeader/MarkdownHeader.js index 029e0bc5..a73fed5e 100644 --- a/src/components/MarkdownHeader/MarkdownHeader.js +++ b/src/components/MarkdownHeader/MarkdownHeader.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * @emails react-core * @flow diff --git a/src/components/MarkdownHeader/index.js b/src/components/MarkdownHeader/index.js index 9455e3c6..3bd95041 100644 --- a/src/components/MarkdownHeader/index.js +++ b/src/components/MarkdownHeader/index.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * @emails react-core */ diff --git a/src/components/MarkdownPage/MarkdownPage.js b/src/components/MarkdownPage/MarkdownPage.js index 1c098c9d..26c3b363 100644 --- a/src/components/MarkdownPage/MarkdownPage.js +++ b/src/components/MarkdownPage/MarkdownPage.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * @emails react-core * @flow diff --git a/src/components/MarkdownPage/index.js b/src/components/MarkdownPage/index.js index 83f7c3fb..f4a81283 100644 --- a/src/components/MarkdownPage/index.js +++ b/src/components/MarkdownPage/index.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * @emails react-core */ diff --git a/src/components/StickyResponsiveSidebar/StickyResponsiveSidebar.js b/src/components/StickyResponsiveSidebar/StickyResponsiveSidebar.js index 9f31cdd6..8944f403 100644 --- a/src/components/StickyResponsiveSidebar/StickyResponsiveSidebar.js +++ b/src/components/StickyResponsiveSidebar/StickyResponsiveSidebar.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * @emails react-core * @flow diff --git a/src/components/StickyResponsiveSidebar/index.js b/src/components/StickyResponsiveSidebar/index.js index 7c0650c6..c19b5ef3 100644 --- a/src/components/StickyResponsiveSidebar/index.js +++ b/src/components/StickyResponsiveSidebar/index.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * @emails react-core */ diff --git a/src/components/TitleAndMetaTags/TitleAndMetaTags.js b/src/components/TitleAndMetaTags/TitleAndMetaTags.js index e54e8c64..09f96aa1 100644 --- a/src/components/TitleAndMetaTags/TitleAndMetaTags.js +++ b/src/components/TitleAndMetaTags/TitleAndMetaTags.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * @emails react-core * @flow diff --git a/src/components/TitleAndMetaTags/index.js b/src/components/TitleAndMetaTags/index.js index f85ab40b..b61c6cfa 100644 --- a/src/components/TitleAndMetaTags/index.js +++ b/src/components/TitleAndMetaTags/index.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * @emails react-core */ diff --git a/src/html.js b/src/html.js index b41c3d2a..9683e820 100644 --- a/src/html.js +++ b/src/html.js @@ -1,10 +1,24 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. + * + * @flow + */ + import React from 'react'; const JS_NPM_URLS = [ 'https://unpkg.com/docsearch.js@2.4.1/dist/cdn/docsearch.min.js', ]; -export default class HTML extends React.Component { +type Props = {| + htmlAttributes: any, + headComponents: React$Node, + bodyAttributes: any, + body: string, + postBodyComponents: React$Node, +|}; + +export default class HTML extends React.Component { render() { return ( diff --git a/src/pages/404.js b/src/pages/404.js index b5977ce6..08684f15 100644 --- a/src/pages/404.js +++ b/src/pages/404.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * @emails react-core * @flow diff --git a/src/pages/acknowledgements.html.js b/src/pages/acknowledgements.html.js index 7a67b4c2..87b3e884 100644 --- a/src/pages/acknowledgements.html.js +++ b/src/pages/acknowledgements.html.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * @emails react-core */ diff --git a/src/pages/blog/all.html.js b/src/pages/blog/all.html.js index 35734b5b..f74b093b 100644 --- a/src/pages/blog/all.html.js +++ b/src/pages/blog/all.html.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * @emails react-core * @flow diff --git a/src/pages/docs/error-decoder.html.js b/src/pages/docs/error-decoder.html.js index e51abe51..bc4c2236 100644 --- a/src/pages/docs/error-decoder.html.js +++ b/src/pages/docs/error-decoder.html.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * @emails react-core * @flow diff --git a/src/pages/index.js b/src/pages/index.js index f6d18d6b..df48d05d 100644 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * @emails react-core */ diff --git a/src/pages/jsx-compiler.html.js b/src/pages/jsx-compiler.html.js index acdcfd9e..1551f7c2 100644 --- a/src/pages/jsx-compiler.html.js +++ b/src/pages/jsx-compiler.html.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * @emails react-core * @flow diff --git a/src/pages/languages.js b/src/pages/languages.js index f0309a3b..5157baa6 100644 --- a/src/pages/languages.js +++ b/src/pages/languages.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * @emails react-core * @flow diff --git a/src/pages/versions.js b/src/pages/versions.js index c4e3532b..3c85c02f 100644 --- a/src/pages/versions.js +++ b/src/pages/versions.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * @emails react-core * @flow diff --git a/src/prism-styles.js b/src/prism-styles.js index 9772895d..0fee9167 100644 --- a/src/prism-styles.js +++ b/src/prism-styles.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * @emails react-core * @flow diff --git a/src/site-constants.js b/src/site-constants.js index bf1f04f7..c64dba1b 100644 --- a/src/site-constants.js +++ b/src/site-constants.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * @providesModule site-constants * @flow diff --git a/src/templates/blog.js b/src/templates/blog.js index 57967afc..edac15cd 100644 --- a/src/templates/blog.js +++ b/src/templates/blog.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * @emails react-core */ diff --git a/src/templates/codepen-example.js b/src/templates/codepen-example.js index 9b752aee..92ba1d97 100644 --- a/src/templates/codepen-example.js +++ b/src/templates/codepen-example.js @@ -1,8 +1,22 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. + * + * @flow + */ + import React, {Component} from 'react'; import Container from 'components/Container'; import Layout from 'components/Layout'; import {colors} from 'theme'; +type Props = { + location: Location, + pageContext: {| + action: string, + payload: string, + |}, +}; + // Copied over styles from ButtonLink for the submit btn const primaryStyle = { backgroundColor: colors.brand, @@ -22,9 +36,11 @@ const primaryStyle = { fontSize: 16, }; -class CodepenExample extends Component { +class CodepenExample extends Component { + _form: HTMLFormElement | null = null; + componentDidMount() { - this.codepenForm.submit(); + ((this._form: any): HTMLFormElement).submit(); } render() { @@ -38,7 +54,7 @@ class CodepenExample extends Component {
{ - this.codepenForm = form; + this._form = form; }} action={action} method="POST"> diff --git a/src/templates/community.js b/src/templates/community.js index 05f7ca91..bc39db33 100644 --- a/src/templates/community.js +++ b/src/templates/community.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * @emails react-core */ diff --git a/src/templates/components/ChevronSvg/index.js b/src/templates/components/ChevronSvg/index.js index f6c8fe53..5d72445b 100644 --- a/src/templates/components/ChevronSvg/index.js +++ b/src/templates/components/ChevronSvg/index.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * @emails react-core * @flow diff --git a/src/templates/components/ExternalLinkSvg/index.js b/src/templates/components/ExternalLinkSvg/index.js index 08a8f592..23dec0b7 100644 --- a/src/templates/components/ExternalLinkSvg/index.js +++ b/src/templates/components/ExternalLinkSvg/index.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * @emails react-core */ diff --git a/src/templates/components/MetaTitle/index.js b/src/templates/components/MetaTitle/index.js index 4a8adddd..cb7f0807 100644 --- a/src/templates/components/MetaTitle/index.js +++ b/src/templates/components/MetaTitle/index.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * @emails react-core */ diff --git a/src/templates/components/NavigationFooter/NavigationFooter.js b/src/templates/components/NavigationFooter/NavigationFooter.js index 9ee0e951..6672ec3c 100644 --- a/src/templates/components/NavigationFooter/NavigationFooter.js +++ b/src/templates/components/NavigationFooter/NavigationFooter.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * @emails react-core */ diff --git a/src/templates/components/NavigationFooter/index.js b/src/templates/components/NavigationFooter/index.js index bf848789..61b9a431 100644 --- a/src/templates/components/NavigationFooter/index.js +++ b/src/templates/components/NavigationFooter/index.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * @emails react-core */ diff --git a/src/templates/components/Sidebar/ScrollSyncSection.js b/src/templates/components/Sidebar/ScrollSyncSection.js index 62e2b88d..9fef1b5f 100644 --- a/src/templates/components/Sidebar/ScrollSyncSection.js +++ b/src/templates/components/Sidebar/ScrollSyncSection.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the CC-BY-4.0 license found * in the LICENSE file in the root directory of this source tree. diff --git a/src/templates/components/Sidebar/Section.js b/src/templates/components/Sidebar/Section.js index d48ed8e4..c0996e11 100644 --- a/src/templates/components/Sidebar/Section.js +++ b/src/templates/components/Sidebar/Section.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * @emails react-core */ diff --git a/src/templates/components/Sidebar/Sidebar.js b/src/templates/components/Sidebar/Sidebar.js index b4199931..13ab5606 100644 --- a/src/templates/components/Sidebar/Sidebar.js +++ b/src/templates/components/Sidebar/Sidebar.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * @emails react-core */ diff --git a/src/templates/components/Sidebar/index.js b/src/templates/components/Sidebar/index.js index e1d4ef6f..18570020 100644 --- a/src/templates/components/Sidebar/index.js +++ b/src/templates/components/Sidebar/index.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * @emails react-core */ diff --git a/src/templates/docs.js b/src/templates/docs.js index b874201d..6095d58b 100644 --- a/src/templates/docs.js +++ b/src/templates/docs.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * @emails react-core */ diff --git a/src/templates/tutorial.js b/src/templates/tutorial.js index 79a4b2c8..91220548 100644 --- a/src/templates/tutorial.js +++ b/src/templates/tutorial.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * @emails react-core */ diff --git a/src/theme.js b/src/theme.js index 50500e00..e7a0c23a 100644 --- a/src/theme.js +++ b/src/theme.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * @providesModule theme * @flow diff --git a/src/types.js b/src/types.js index 782a5b6f..2573f79e 100644 --- a/src/types.js +++ b/src/types.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * @emails react-core * @flow diff --git a/src/utils/createCanonicalUrl.js b/src/utils/createCanonicalUrl.js index 0fafad59..2ee9c80a 100644 --- a/src/utils/createCanonicalUrl.js +++ b/src/utils/createCanonicalUrl.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * @emails react-core * @flow diff --git a/src/utils/createLink.js b/src/utils/createLink.js index eee6db08..efefe0b2 100644 --- a/src/utils/createLink.js +++ b/src/utils/createLink.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * @emails react-core * @flow diff --git a/src/utils/findSectionForPath.js b/src/utils/findSectionForPath.js index eedffc0a..15953de2 100644 --- a/src/utils/findSectionForPath.js +++ b/src/utils/findSectionForPath.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * @emails react-core * @flow diff --git a/src/utils/isItemActive.js b/src/utils/isItemActive.js index 754db4b8..d4e29a2b 100644 --- a/src/utils/isItemActive.js +++ b/src/utils/isItemActive.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * @emails react-core * @flow diff --git a/src/utils/loadScript.js b/src/utils/loadScript.js index 83fa80a6..ee2a1d21 100644 --- a/src/utils/loadScript.js +++ b/src/utils/loadScript.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. diff --git a/src/utils/patchDOMForGoogleTranslate.js b/src/utils/patchDOMForGoogleTranslate.js index 35b9153a..ad844527 100644 --- a/src/utils/patchDOMForGoogleTranslate.js +++ b/src/utils/patchDOMForGoogleTranslate.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * @emails react-core * @flow diff --git a/src/utils/sectionList.js b/src/utils/sectionList.js index a52f28b9..3f8ab386 100644 --- a/src/utils/sectionList.js +++ b/src/utils/sectionList.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * @emails react-core * @flow diff --git a/src/utils/slugify.js b/src/utils/slugify.js index cf2ef384..1bcd3bae 100644 --- a/src/utils/slugify.js +++ b/src/utils/slugify.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * @emails react-core * @flow diff --git a/src/utils/toCommaSeparatedList.js b/src/utils/toCommaSeparatedList.js index e70da06f..5dd03662 100644 --- a/src/utils/toCommaSeparatedList.js +++ b/src/utils/toCommaSeparatedList.js @@ -1,5 +1,5 @@ /** - * Copyright (c) 2013-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * @emails react-core * @flow diff --git a/static/js/jsfiddle-integration-babel.js b/static/js/jsfiddle-integration-babel.js index 5dc66b1d..006c79c8 100644 --- a/static/js/jsfiddle-integration-babel.js +++ b/static/js/jsfiddle-integration-babel.js @@ -1,3 +1,7 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. + */ + // Do not delete or move this file. // Many fiddles reference it so we have to keep it here. (function() { diff --git a/static/js/jsfiddle-integration.js b/static/js/jsfiddle-integration.js index d4a06669..fcf09e43 100644 --- a/static/js/jsfiddle-integration.js +++ b/static/js/jsfiddle-integration.js @@ -1,3 +1,7 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. + */ + // Do not delete or move this file. // Many fiddles reference it so we have to keep it here. (function() {