diff --git a/.eslintrc b/.eslintrc new file mode 100644 index 0000000..ba7ce0e --- /dev/null +++ b/.eslintrc @@ -0,0 +1,6 @@ +{ + "extends": ["standard", "standard-react"], + "rules": { + "react/prop-types": "off" + } +} diff --git a/package.json b/package.json index 24083f0..0c1b8c8 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,13 @@ "version": "0.1.1", "private": true, "devDependencies": { + "eslint-config-standard": "^10.2.1", + "eslint-config-standard-react": "^5.0.0", + "eslint-plugin-import": "^2.3.0", + "eslint-plugin-node": "^5.0.0", + "eslint-plugin-promise": "^3.5.0", + "eslint-plugin-react": "^7.1.0", + "eslint-plugin-standard": "^3.0.1", "react-scripts": "^1.0.10", "snazzy": "^7.0.0", "standard": "^10.0.2", diff --git a/src/components/NavLink.js b/src/components/NavLink.js index 38913c3..093a5b9 100644 --- a/src/components/NavLink.js +++ b/src/components/NavLink.js @@ -20,7 +20,7 @@ const NavLink = styled.span` } ` -export default ({path, exact, ...props}) => ( +export default ({ path, exact, ...props }) => ( ( {props.title} diff --git a/src/components/Page.js b/src/components/Page.js index d714a55..8470b7c 100644 --- a/src/components/Page.js +++ b/src/components/Page.js @@ -1,7 +1,7 @@ import styled from 'styled-components' export default styled.div` - p{ + p { margin-bottom: 1rem; } ` diff --git a/src/components/PageHeader.js b/src/components/PageHeader.js index e4224e9..11bef65 100644 --- a/src/components/PageHeader.js +++ b/src/components/PageHeader.js @@ -15,18 +15,18 @@ const Header = styled(Section)` } ` -const PageHeader = (props) => ( +const PageHeader = ({ title, subtitle }) => (
-

{props.title}

- {props.subtitle ?

{props.subtitle}

: ''} +

{title}

+ {subtitle ?

{subtitle}

: ''}
) PageHeader.propTypes = { title: PropTypes.string, - subTitle: PropTypes.string + subtitle: PropTypes.string } export default PageHeader diff --git a/src/registerServiceWorker.js b/src/registerServiceWorker.js index e907b6f..c70cdc1 100644 --- a/src/registerServiceWorker.js +++ b/src/registerServiceWorker.js @@ -1,3 +1,4 @@ +/* global URL, fetch */ // In production, we register a service worker to serve assets from local cache. // This lets the app load faster on subsequent visits in production, and gives diff --git a/src/views/About.js b/src/views/About.js index abb56e0..0fb7f6d 100644 --- a/src/views/About.js +++ b/src/views/About.js @@ -4,7 +4,7 @@ import Page from '../components/Page' import PageHeader from '../components/PageHeader' import { Container, Section } from '../components/common' -export default ({title}) => ( +export default ({ title }) => (
diff --git a/src/views/Home.js b/src/views/Home.js index 548f4a0..3c77a4f 100644 --- a/src/views/Home.js +++ b/src/views/Home.js @@ -16,7 +16,7 @@ const content = ` - **React Snapshot** for pre-rendering to static html so it works without Javascript ⭐️ ` -export default ({title}) => { +export default ({ title }) => { return ( diff --git a/yarn.lock b/yarn.lock index aa349fe..fc93977 100644 --- a/yarn.lock +++ b/yarn.lock @@ -975,6 +975,10 @@ balanced-match@^0.4.1, balanced-match@^0.4.2: version "0.4.2" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" +balanced-match@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" + base64-js@^1.0.2: version "1.2.0" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.2.0.tgz#a39992d723584811982be5e290bb6a53d86700f1" @@ -1053,6 +1057,13 @@ brace-expansion@^1.0.0: balanced-match "^0.4.1" concat-map "0.0.1" +brace-expansion@^1.1.7: + version "1.1.8" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.8.tgz#c07b211c7c952ec1f8efd51a77ef0d1d3990a292" + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + braces@^1.8.2: version "1.8.5" resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" @@ -2200,7 +2211,17 @@ eslint-config-standard-jsx@4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/eslint-config-standard-jsx/-/eslint-config-standard-jsx-4.0.1.tgz#cd4e463d0268e2d9e707f61f42f73f5b3333c642" -eslint-config-standard@10.2.1: +eslint-config-standard-jsx@^4.0.0: + version "4.0.2" + resolved "https://registry.yarnpkg.com/eslint-config-standard-jsx/-/eslint-config-standard-jsx-4.0.2.tgz#009e53c4ddb1e9ee70b4650ffe63a7f39f8836e1" + +eslint-config-standard-react@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/eslint-config-standard-react/-/eslint-config-standard-react-5.0.0.tgz#64c7b8140172852be810a53d48ee87649ff178e3" + dependencies: + eslint-config-standard-jsx "^4.0.0" + +eslint-config-standard@10.2.1, eslint-config-standard@^10.2.1: version "10.2.1" resolved "https://registry.yarnpkg.com/eslint-config-standard/-/eslint-config-standard-10.2.1.tgz#c061e4d066f379dc17cd562c64e819b4dd454591" @@ -2212,6 +2233,13 @@ eslint-import-resolver-node@^0.2.0: object-assign "^4.0.1" resolve "^1.1.6" +eslint-import-resolver-node@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.1.tgz#4422574cde66a9a7b099938ee4d508a199e0e3cc" + dependencies: + debug "^2.6.8" + resolve "^1.2.0" + eslint-loader@1.7.1: version "1.7.1" resolved "https://registry.yarnpkg.com/eslint-loader/-/eslint-loader-1.7.1.tgz#50b158dd6272dcefb97e984254837f81a5802ce0" @@ -2251,6 +2279,21 @@ eslint-plugin-import@2.2.0, eslint-plugin-import@~2.2.0: minimatch "^3.0.3" pkg-up "^1.0.0" +eslint-plugin-import@^2.3.0: + version "2.6.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.6.1.tgz#f580be62bb809421d46e338372764afcc9f59bf6" + dependencies: + builtin-modules "^1.1.1" + contains-path "^0.1.0" + debug "^2.6.8" + doctrine "1.5.0" + eslint-import-resolver-node "^0.3.1" + eslint-module-utils "^2.0.0" + has "^1.0.1" + lodash.cond "^4.3.0" + minimatch "^3.0.3" + read-pkg-up "^2.0.0" + eslint-plugin-jsx-a11y@5.0.3: version "5.0.3" resolved "https://registry.yarnpkg.com/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-5.0.3.tgz#4a939f76ec125010528823331bf948cc573380b6" @@ -2263,6 +2306,15 @@ eslint-plugin-jsx-a11y@5.0.3: emoji-regex "^6.1.0" jsx-ast-utils "^1.4.0" +eslint-plugin-node@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-node/-/eslint-plugin-node-5.1.0.tgz#bc8cdb85180d0b4d946a2531640e2a4dd7a4e6d4" + dependencies: + ignore "^3.3.3" + minimatch "^3.0.4" + resolve "^1.3.3" + semver "5.3.0" + eslint-plugin-node@~4.2.2: version "4.2.2" resolved "https://registry.yarnpkg.com/eslint-plugin-node/-/eslint-plugin-node-4.2.2.tgz#82959ca9aed79fcbd28bb1b188d05cac04fb3363" @@ -2273,11 +2325,11 @@ eslint-plugin-node@~4.2.2: resolve "^1.1.7" semver "5.3.0" -eslint-plugin-promise@~3.5.0: +eslint-plugin-promise@^3.5.0, eslint-plugin-promise@~3.5.0: version "3.5.0" resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-3.5.0.tgz#78fbb6ffe047201627569e85a6c5373af2a68fca" -eslint-plugin-react@7.1.0: +eslint-plugin-react@7.1.0, eslint-plugin-react@^7.1.0: version "7.1.0" resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.1.0.tgz#27770acf39f5fd49cd0af4083ce58104eb390d4c" dependencies: @@ -2295,7 +2347,7 @@ eslint-plugin-react@~6.10.0: jsx-ast-utils "^1.3.4" object.assign "^4.0.4" -eslint-plugin-standard@~3.0.1: +eslint-plugin-standard@^3.0.1, eslint-plugin-standard@~3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/eslint-plugin-standard/-/eslint-plugin-standard-3.0.1.tgz#34d0c915b45edc6f010393c7eef3823b08565cf2" @@ -3131,6 +3183,10 @@ ignore@^3.0.11, ignore@^3.0.9, ignore@^3.2.0: version "3.2.2" resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.2.2.tgz#1c51e1ef53bab6ddc15db4d9ac4ec139eceb3410" +ignore@^3.3.3: + version "3.3.3" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.3.tgz#432352e57accd87ab3110e82d3fea0e47812156d" + imurmurhash@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" @@ -4235,6 +4291,12 @@ minimatch@3.0.3, minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3: dependencies: brace-expansion "^1.0.0" +minimatch@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + dependencies: + brace-expansion "^1.1.7" + minimist@0.0.8, minimist@~0.0.1: version "0.0.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" @@ -4673,6 +4735,12 @@ path-type@^1.0.0: pify "^2.0.0" pinkie-promise "^2.0.0" +path-type@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-2.0.0.tgz#f012ccb8415b7096fc2daa1054c3d72389594c73" + dependencies: + pify "^2.0.0" + pbkdf2@^3.0.3: version "3.0.12" resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.0.12.tgz#be36785c5067ea48d806ff923288c5f750b6b8a2" @@ -5360,6 +5428,13 @@ read-pkg-up@^1.0.1: find-up "^1.0.0" read-pkg "^1.0.0" +read-pkg-up@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-2.0.0.tgz#6b72a8048984e0c41e79510fd5e9fa99b3b549be" + dependencies: + find-up "^2.0.0" + read-pkg "^2.0.0" + read-pkg@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" @@ -5368,6 +5443,14 @@ read-pkg@^1.0.0: normalize-package-data "^2.3.2" path-type "^1.0.0" +read-pkg@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-2.0.0.tgz#8ef1c0623c6a6db0dc6713c4bfac46332b2368f8" + dependencies: + load-json-file "^2.0.0" + normalize-package-data "^2.3.2" + path-type "^2.0.0" + readable-stream@1.0: version "1.0.34" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" @@ -5632,7 +5715,7 @@ resolve@^1.1.6, resolve@^1.1.7: version "1.2.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.2.0.tgz#9589c3f2f6149d1417a40becc1663db6ec6bc26c" -resolve@^1.3.2: +resolve@^1.2.0, resolve@^1.3.2, resolve@^1.3.3: version "1.3.3" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.3.3.tgz#655907c3469a8680dc2de3a275a8fdd69691f0e5" dependencies: