Update copyright headers (#3086)

Added and updated copyright headers.

Added some missing Flow types.

Removed an invalid prop-types import.
This commit is contained in:
Brian Vaughn
2020-07-07 10:35:57 -04:00
committed by GitHub
parent 3fc860ae8d
commit 3e4f2687c6
95 changed files with 211 additions and 85 deletions

View File

@@ -1,3 +1,7 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*/
declare module 'gatsby' {
declare module.exports: any;
}

View File

@@ -1,3 +1,7 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*/
declare module 'glamor' {
declare module.exports: {
css: {

View File

@@ -1,3 +1,7 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*/
declare module 'hex2rgba' {
declare module.exports: (hex: string, alpha?: number) => string;
}

View File

@@ -1,3 +1,7 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*/
declare module 'react-helmet' {
declare module.exports: any;
}

View File

@@ -1,3 +1,7 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*/
declare module 'slugify' {
declare module.exports: any;
}

View File

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
*/

View File

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
*/

View File

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
*/

View File

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
*/

View File

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
*/

View File

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
*/

View File

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
*/

View File

@@ -1,3 +1,7 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*/
let offsetY = 0;
const getTargetOffset = hash => {

View File

@@ -1,3 +1,7 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*/
const React = require(`react`);
const pluginDefaults = {

View File

@@ -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>

View File

@@ -1,3 +1,7 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*/
const visit = require('unist-util-visit');
// Always treat JS blocks as JSX.

View File

@@ -1,3 +1,7 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*/
const request = require('request-promise');
const errorCodesUrl =

View File

@@ -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;

View File

@@ -1,3 +1,7 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*/
const crypto = require('crypto');
const path = require('path');

View File

@@ -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`;

View File

@@ -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;

View File

@@ -1,3 +1,7 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*/
const fs = require('fs');
const GithubSlugger = require('github-slugger');

View File

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
*/

View File

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
*/

View File

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
*/

View File

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
*/

View File

@@ -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 (
@@ -68,10 +81,4 @@ class CodeExample extends Component {
}
}
CodeExample.propTypes = {
children: PropTypes.node,
code: PropTypes.string.isRequired,
loaded: PropTypes.bool.isRequired,
};
export default CodeExample;

View File

@@ -1,3 +1,9 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @flow
*/
import CodeExample from './CodeExample';
export default CodeExample;

View File

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
* @flow

View File

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
*/

View File

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
* @flow

View File

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
*/

View File

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
* @flow

View File

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
*/

View File

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
* @flow

View File

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
*/

View File

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
* @flow

View File

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
*/

View File

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
* @flow

View File

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
* @flow

View File

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
* @flow

View File

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
* @flow

View File

@@ -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) {

View File

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
*/

View File

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
* @flow

View File

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
* @flow

View File

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
* @flow

View File

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
*/

View File

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
*/

View File

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
* @flow

View File

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
*/

View File

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
* @flow

View File

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
*/

View File

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
* @flow

View File

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
*/

View File

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
* @flow

View File

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
*/

View File

@@ -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<Props> {
render() {
return (
<html lang="en" {...this.props.htmlAttributes}>

View File

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
* @flow

View File

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
*/

View File

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
* @flow

View File

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
* @flow

View File

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
*/

View File

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
* @flow

View File

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
* @flow

View File

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
* @flow

View File

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
* @flow

View File

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @providesModule site-constants
* @flow

View File

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
*/

View File

@@ -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<Props> {
_form: HTMLFormElement | null = null;
componentDidMount() {
this.codepenForm.submit();
((this._form: any): HTMLFormElement).submit();
}
render() {
@@ -38,7 +54,7 @@ class CodepenExample extends Component {
<form
style={{paddingBottom: '50px'}}
ref={form => {
this.codepenForm = form;
this._form = form;
}}
action={action}
method="POST">

View File

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
*/

View File

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
* @flow

View File

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
*/

View File

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
*/

View File

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
*/

View File

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
*/

View File

@@ -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.

View File

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
*/

View File

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
*/

View File

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
*/

View File

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
*/

View File

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
*/

View File

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @providesModule theme
* @flow

View File

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
* @flow

View File

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
* @flow

View File

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
* @flow

View File

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
* @flow

View File

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
* @flow

View File

@@ -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.

View File

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
* @flow

View File

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
* @flow

View File

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
* @flow

View File

@@ -1,5 +1,5 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @emails react-core
* @flow

View File

@@ -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() {

View File

@@ -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() {