Skip to content

Commit

Permalink
Update copyright headers (#3086)
Browse files Browse the repository at this point in the history
Added and updated copyright headers.

Added some missing Flow types.

Removed an invalid prop-types import.
  • Loading branch information
Brian Vaughn committed Jul 7, 2020
1 parent 3fc860a commit 3e4f268
Show file tree
Hide file tree
Showing 95 changed files with 211 additions and 85 deletions.
4 changes: 4 additions & 0 deletions flow-typed/gatsby.js
@@ -1,3 +1,7 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*/

declare module 'gatsby' {
declare module.exports: any;
}
4 changes: 4 additions & 0 deletions flow-typed/glamor.js
@@ -1,3 +1,7 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*/

declare module 'glamor' {
declare module.exports: {
css: {
Expand Down
4 changes: 4 additions & 0 deletions 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;
}
4 changes: 4 additions & 0 deletions flow-typed/react-helmet.js
@@ -1,3 +1,7 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*/

declare module 'react-helmet' {
declare module.exports: any;
}
4 changes: 4 additions & 0 deletions flow-typed/slugify.js
@@ -1,3 +1,7 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*/

declare module 'slugify' {
declare module.exports: any;
}
2 changes: 1 addition & 1 deletion gatsby-browser.js
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
*/
Expand Down
2 changes: 1 addition & 1 deletion gatsby-config.js
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
*/
Expand Down
2 changes: 1 addition & 1 deletion gatsby-node.js
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
*/
Expand Down
2 changes: 1 addition & 1 deletion gatsby/createPages.js
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
*/
Expand Down
2 changes: 1 addition & 1 deletion gatsby/onCreateNode.js
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
*/
Expand Down
2 changes: 1 addition & 1 deletion gatsby/onCreatePage.js
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
*/
Expand Down
2 changes: 1 addition & 1 deletion gatsby/onCreateWebpackConfig.js
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
*/
Expand Down
4 changes: 4 additions & 0 deletions 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 => {
Expand Down
4 changes: 4 additions & 0 deletions 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 = {
Expand Down
4 changes: 4 additions & 0 deletions 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 <mathews.kyle@gmail.com>
Expand Down
4 changes: 4 additions & 0 deletions 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.
Expand Down
4 changes: 4 additions & 0 deletions 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 =
Expand Down
4 changes: 4 additions & 0 deletions 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;
Expand Down
4 changes: 4 additions & 0 deletions 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');

Expand Down
4 changes: 4 additions & 0 deletions 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`;
Expand Down
4 changes: 4 additions & 0 deletions 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;
Expand Down
4 changes: 4 additions & 0 deletions scripts/generateHeadingIDs.js
@@ -1,3 +1,7 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*/

const fs = require('fs');
const GithubSlugger = require('github-slugger');

Expand Down
2 changes: 1 addition & 1 deletion 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
*/
Expand Down
2 changes: 1 addition & 1 deletion 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
*/
Expand Down
2 changes: 1 addition & 1 deletion 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
*/
Expand Down
2 changes: 1 addition & 1 deletion 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
*/
Expand Down
23 changes: 15 additions & 8 deletions 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<Props> {
render() {
const {children, code, id, containerNodeID, loaded} = this.props;
return (
Expand Down Expand Up @@ -68,10 +81,4 @@ class CodeExample extends Component {
}
}

CodeExample.propTypes = {
children: PropTypes.node,
code: PropTypes.string.isRequired,
loaded: PropTypes.bool.isRequired,
};

export default CodeExample;
6 changes: 6 additions & 0 deletions src/components/CodeExample/index.js
@@ -1,3 +1,9 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @flow
*/

import CodeExample from './CodeExample';

export default CodeExample;
2 changes: 1 addition & 1 deletion 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
Expand Down
2 changes: 1 addition & 1 deletion 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
*/
Expand Down
2 changes: 1 addition & 1 deletion 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
Expand Down
2 changes: 1 addition & 1 deletion 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
*/
Expand Down
2 changes: 1 addition & 1 deletion 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
Expand Down
2 changes: 1 addition & 1 deletion 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
*/
Expand Down
2 changes: 1 addition & 1 deletion 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
Expand Down
2 changes: 1 addition & 1 deletion 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
*/
Expand Down
2 changes: 1 addition & 1 deletion 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
Expand Down
2 changes: 1 addition & 1 deletion 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
*/
Expand Down
2 changes: 1 addition & 1 deletion 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
Expand Down
2 changes: 1 addition & 1 deletion 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
Expand Down
2 changes: 1 addition & 1 deletion 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
Expand Down
2 changes: 1 addition & 1 deletion 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
Expand Down
15 changes: 15 additions & 0 deletions 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<Link>,
|};

const SectionLinks = ({links}: Props) =>
links.map(item => {
if (item.external) {
Expand Down
2 changes: 1 addition & 1 deletion 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
*/
Expand Down
2 changes: 1 addition & 1 deletion 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
Expand Down
2 changes: 1 addition & 1 deletion 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
Expand Down
2 changes: 1 addition & 1 deletion 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
Expand Down
2 changes: 1 addition & 1 deletion 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
*/
Expand Down

0 comments on commit 3e4f268

Please sign in to comment.