diff --git a/.eslintrc b/.eslintrc index 3374c94..f4fdfb7 100644 --- a/.eslintrc +++ b/.eslintrc @@ -6,13 +6,13 @@ "import" ], "rules": { + "global-require": [0], "react/jsx-filename-extension": [0], "react/prefer-es6-class": [0], - "global-require": [0], "react/prefer-stateless-function": [0], /* to allow importing 'gatsby-helpers' */ "import/no-extraneous-dependencies": [0], "import/no-unresolved": [0], "import/extensions": [0] } -} \ No newline at end of file +} diff --git a/.gitignore b/.gitignore index 13532a8..d5769d3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,8 @@ node_modules/ npm-debug.log +.eslintcache + public .gatsby-context.js diff --git a/gatsby-browser.js b/gatsby-browser.js index 8ba7f29..e5fdf07 100644 --- a/gatsby-browser.js +++ b/gatsby-browser.js @@ -1,8 +1,8 @@ -import ReactGA from 'react-ga' -import {config} from 'config' +import ReactGA from 'react-ga'; +import { config } from 'config'; ReactGA.initialize(config.googleAnalyticsId); -exports.onRouteUpdate = (state, page, pages) => { +exports.onRouteUpdate = (state) => { ReactGA.pageview(state.pathname); -}; \ No newline at end of file +}; diff --git a/gatsby-node.js b/gatsby-node.js index e391fe1..0e71008 100644 --- a/gatsby-node.js +++ b/gatsby-node.js @@ -1,22 +1,22 @@ -var rucksack = require('rucksack-css') -var lost = require("lost") -var cssnext = require("postcss-cssnext") +const rucksack = require('rucksack-css'); +const lost = require('lost'); +const cssnext = require('postcss-cssnext'); -exports.modifyWebpackConfig = function(config, env) { - config.merge({ - postcss: [ - lost(), - rucksack(), - cssnext({ - browsers: ['>1%', 'last 2 versions'] - }) - ] - }) +exports.modifyWebpackConfig = function (config) { + config.merge({ + postcss: [ + lost(), + rucksack(), + cssnext({ + browsers: ['>1%', 'last 2 versions'], + }), + ], + }); - config.loader('svg', { - test: /\.(svg)(\?v=[0-9]\.[0-9]\.[0-9])?$/, - loader: 'file-loader', - }) + config.loader('svg', { + test: /\.(svg)(\?v=[0-9]\.[0-9]\.[0-9])?$/, + loader: 'file-loader', + }); - return config -}; \ No newline at end of file + return config; +};