diff --git a/examples/gatsbygram/src/layouts/index.js b/examples/gatsbygram/src/layouts/index.js index 270c231a1f633..6f6f1276bc955 100644 --- a/examples/gatsbygram/src/layouts/index.js +++ b/examples/gatsbygram/src/layouts/index.js @@ -22,35 +22,6 @@ class Layout extends React.Component { isModal: PropTypes.bool, } - componentDidMount() { - // Create references to html/body elements - // this.htmlElement = document.querySelector(`html`) - // this.bodyElement = document.querySelector(`body`) - // // Cache the window width. - // windowWidth = window.innerWidth - } - componentWillReceiveProps(nextProps) { - // if we're changing to a non-homepage page, put things in - // a modal (unless we're on mobile). - // if (windowWidth > 750) { - // // Freeze the background from scrolling. - // this.htmlElement.style.overflow = `hidden` - // this.bodyElement.style.overflow = `hidden` - // // Always set overflow-y to scroll so the scrollbar stays visible avoiding - // // weird jumping. - // this.htmlElement.style.overflowY = `scroll` - // } else { - // // Otherwise we're navigating back home so delete old home so the - // // modal can be destroyed. - // delete this.modalBackgroundChildren - // this.htmlElement.style.overflow = `visible` - // this.bodyElement.style.overflow = `visible` - // // Always set overflow-y to scroll so the scrollbar stays visible avoiding - // // weird jumping. - // this.htmlElement.style.overflowY = `scroll` - // } - } - render() { const { location } = this.props let isModal = false diff --git a/examples/gatsbygram/utils/download-file.js b/examples/gatsbygram/utils/download-file.js index 33532f7a00220..f9a525a7ac9e6 100644 --- a/examples/gatsbygram/utils/download-file.js +++ b/examples/gatsbygram/utils/download-file.js @@ -8,7 +8,8 @@ module.exports = function(url, dest, cb) { // verify response code sendReq.on(`response`, function(response) { if (response.statusCode !== 200) { - return cb(`Response status was ` + response.statusCode) + cb(`Response status was ` + response.statusCode) + return } }) @@ -17,7 +18,8 @@ module.exports = function(url, dest, cb) { fs.unlink(dest) if (cb) { - return cb(err.message) + cb(err.message) + return } }) @@ -33,7 +35,8 @@ module.exports = function(url, dest, cb) { // Delete the file async. (But we don't check the result) if (cb) { - return cb(err.message) + cb(err.message) + return } }) } diff --git a/examples/using-faker/src/pages/index.js b/examples/using-faker/src/pages/index.js index 06cb537c9ebfa..ff169420466d3 100644 --- a/examples/using-faker/src/pages/index.js +++ b/examples/using-faker/src/pages/index.js @@ -1,5 +1,5 @@ import React from "react" -import { Link, graphql } from "gatsby" +import { graphql } from "gatsby" import "./index.css" const IndexPage = ({ data }) => ( @@ -26,7 +26,7 @@ const IndexPage = ({ data }) => (

Worked at

{data.allCompanyData.edges.map(({ node }) => ( -
+
{node.company.companyName}
{node.company.companySuffix}
diff --git a/examples/using-gatsby-source-graphql/components/BlogPost.js b/examples/using-gatsby-source-graphql/components/BlogPost.js index 61b7b48421732..17d6c286f6a47 100644 --- a/examples/using-gatsby-source-graphql/components/BlogPost.js +++ b/examples/using-gatsby-source-graphql/components/BlogPost.js @@ -1,4 +1,5 @@ import React from "react" +import { graphql } from "gatsby" import ReactMarkdown from "react-markdown" import dateformat from "dateformat" diff --git a/examples/using-gatsby-source-graphql/index.js b/examples/using-gatsby-source-graphql/index.js index 18d87159154ed..0cdefa3767293 100644 --- a/examples/using-gatsby-source-graphql/index.js +++ b/examples/using-gatsby-source-graphql/index.js @@ -1,4 +1,5 @@ import React from "react" +import { graphql } from "gatsby" import { makeBlogPath } from "../utils" import dateformat from "dateformat" diff --git a/examples/using-gatsby-source-graphql/pages/index.js b/examples/using-gatsby-source-graphql/pages/index.js index 18d87159154ed..0cdefa3767293 100644 --- a/examples/using-gatsby-source-graphql/pages/index.js +++ b/examples/using-gatsby-source-graphql/pages/index.js @@ -1,4 +1,5 @@ import React from "react" +import { graphql } from "gatsby" import { makeBlogPath } from "../utils" import dateformat from "dateformat" diff --git a/examples/using-remark-copy-linked-files/src/pages/index.js b/examples/using-remark-copy-linked-files/src/pages/index.js index 6776ddabfce4e..2924521ef3a6f 100644 --- a/examples/using-remark-copy-linked-files/src/pages/index.js +++ b/examples/using-remark-copy-linked-files/src/pages/index.js @@ -18,8 +18,9 @@ class BlogIndex extends React.Component { - {posts.map(post => { - if (post.node.frontmatter.path !== `/404/`) { + {posts + .filter(post => post.node.frontmatter.path !== `/404/`) + .map(post => { const title = get(post, `node.frontmatter.title`) || post.node.path return (
@@ -39,8 +40,7 @@ class BlogIndex extends React.Component {

) - } - })} + })}
) } diff --git a/packages/gatsby-source-contentful/src/normalize.js b/packages/gatsby-source-contentful/src/normalize.js index b58e6bb97ba3d..bc40d002aa198 100644 --- a/packages/gatsby-source-contentful/src/normalize.js +++ b/packages/gatsby-source-contentful/src/normalize.js @@ -377,8 +377,6 @@ exports.createContentTypeNodes = ({ if (entryItemFieldKey.split(`___`).length > 1) { return } - - entryItemFields[entryItemFieldKey] = entryItemFields[entryItemFieldKey] }) // Replace text fields with text nodes so we can process their markdown diff --git a/packages/gatsby/cache-dir/load-directly-or-404.js b/packages/gatsby/cache-dir/load-directly-or-404.js index f195385ea27f3..f232c3f55c114 100644 --- a/packages/gatsby/cache-dir/load-directly-or-404.js +++ b/packages/gatsby/cache-dir/load-directly-or-404.js @@ -36,7 +36,10 @@ export function getRedirectUrl(path) { export default function(resources, path, replaceOnSuccess = false) { return new Promise((resolve, reject) => { const url = getRedirectUrl(path) - if (!url) return reject(url) + if (!url) { + reject(url) + return + } // Always navigate directly if a custom 404 page doesn't exist. if (!resources) { diff --git a/packages/gatsby/cache-dir/navigation.js b/packages/gatsby/cache-dir/navigation.js index fadd1c7685076..3eb6728c45298 100644 --- a/packages/gatsby/cache-dir/navigation.js +++ b/packages/gatsby/cache-dir/navigation.js @@ -1,6 +1,6 @@ import React from "react" import PropTypes from "prop-types" -import loader, { setApiRunnerForLoader } from "./loader" +import loader from "./loader" import redirects from "./redirects.json" import { apiRunner } from "./api-runner-browser" import emitter from "./emitter" diff --git a/packages/gatsby/cache-dir/prefetch.js b/packages/gatsby/cache-dir/prefetch.js index 182864e155b3c..82c119ccb5a43 100644 --- a/packages/gatsby/cache-dir/prefetch.js +++ b/packages/gatsby/cache-dir/prefetch.js @@ -10,6 +10,7 @@ const support = function(feature) { } catch (err) { return false } + return false } const linkPrefetchStrategy = function(url) { if (typeof document === `undefined`) { diff --git a/scripts/add-npm-owner/index.js b/scripts/add-npm-owner/index.js index 318f44a0c5739..7ecf3d0bcb561 100644 --- a/scripts/add-npm-owner/index.js +++ b/scripts/add-npm-owner/index.js @@ -1,4 +1,6 @@ #!/usr/bin/env node +const util = require(`util`) +const exec = util.promisify(require(`child_process`).exec) const argv = require(`yargs`) .command(`$0 `, `Add new owner to gatsby packages`) .help().argv diff --git a/www/gatsby-node.js b/www/gatsby-node.js index 08f984d0bde01..4298e77f17010 100644 --- a/www/gatsby-node.js +++ b/www/gatsby-node.js @@ -619,6 +619,7 @@ exports.onCreateNode = ({ node, actions, getNode, reporter }) => { createNodeField({ node, name: `slug`, value: slug }) } // end Community/Creators Pages + return null } exports.onCreatePage = ({ page, actions }) => { @@ -641,11 +642,3 @@ exports.onPostBuild = () => { `./public/gatsbygram.mp4` ) } - -// limited logging for debug purposes -let limitlogcount = 0 -function log(max) { - return function(...args) { - if (limitlogcount++ < max) console.log(...args) - } -} diff --git a/www/src/components/ecosystem/ecosystem-board.js b/www/src/components/ecosystem/ecosystem-board.js index 3c6b2943a3aea..a5f3f31cb4872 100644 --- a/www/src/components/ecosystem/ecosystem-board.js +++ b/www/src/components/ecosystem/ecosystem-board.js @@ -4,7 +4,7 @@ import styled from "react-emotion" import EcosystemSection from "./ecosystem-section" -import presets, { colors } from "../../utils/presets" +import presets from "../../utils/presets" const EcosystemBoardRoot = styled(`div`)` display: flex; diff --git a/www/src/components/evaluation-cell.js b/www/src/components/evaluation-cell.js index 284cf55e3571e..d972c39d65775 100644 --- a/www/src/components/evaluation-cell.js +++ b/www/src/components/evaluation-cell.js @@ -1,4 +1,4 @@ -import React, { Component } from "react" +import React from "react" import { rhythm } from "../utils/typography" import presets, { colors } from "../utils/presets" diff --git a/www/src/components/layout/layout-with-heading.js b/www/src/components/layout/layout-with-heading.js index 737839d91a6e9..4f14129dee7ab 100644 --- a/www/src/components/layout/layout-with-heading.js +++ b/www/src/components/layout/layout-with-heading.js @@ -2,14 +2,14 @@ import React from "react" import PropTypes from "prop-types" import Helmet from "react-helmet" import { SkipNavLink } from "@reach/skip-nav" -import styled, { css } from "react-emotion" +import styled from "react-emotion" import Banner from "../banner" import PageHeading from "./page-heading" import Navigation from "../navigation" import MobileNavigation from "../navigation-mobile" -import presets, { colors } from "../../utils/presets" +import presets from "../../utils/presets" // Import Futura PT typeface import "../../fonts/Webfonts/futurapt_book_macroman/stylesheet.css" diff --git a/www/src/components/page-with-plugin-searchbar.js b/www/src/components/page-with-plugin-searchbar.js index c98854804861f..f7a7bdb2eb4b4 100644 --- a/www/src/components/page-with-plugin-searchbar.js +++ b/www/src/components/page-with-plugin-searchbar.js @@ -1,4 +1,4 @@ -import React, { Component, Fragment } from "react" +import React, { Fragment } from "react" import PluginSearchBar from "./plugin-searchbar-body" import { rhythm } from "../utils/typography" import presets, { colors } from "../utils/presets" diff --git a/www/src/views/community/community-header.js b/www/src/views/community/community-header.js index f9874fcd163cf..58c7e3cde77db 100644 --- a/www/src/views/community/community-header.js +++ b/www/src/views/community/community-header.js @@ -6,33 +6,33 @@ import Checkmark from "./check.svg" import Button from "../../components/button" import ArrowForwardIcon from "react-icons/lib/md/arrow-forward" -const CommunityHeaderLink = ({ linkTo, children }) => ( -
  • - - {children} - -
  • -) +// const CommunityHeaderLink = ({ linkTo, children }) => ( +//
  • +// +// {children} +// +//
  • +// ) class CommunityHeader extends Component { render() { - const { forHire, hiring, submissionText } = this.props + const { /*forHire, hiring,*/ submissionText } = this.props return (
    this.props.setURLState({ s: value }) render() { - const { data, urlState, setURLState } = this.props + const { data, urlState } = this.props const { setFiltersCategory, setFiltersDependency, diff --git a/www/src/views/starter-library/starter-list.js b/www/src/views/starter-library/starter-list.js index 7cce21bc2015b..128d2a4dc14a7 100644 --- a/www/src/views/starter-library/starter-list.js +++ b/www/src/views/starter-library/starter-list.js @@ -57,7 +57,6 @@ const StartersList = ({ urlState, starters, count, sortRecent }) => { const { description, gatsbyMajorVersion, - gatsbyDependencies, name, githubFullName, lastUpdated, @@ -171,6 +170,7 @@ const StartersList = ({ urlState, starters, count, sortRecent }) => {
    ) } + return null } export default StartersList