Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade prettier, fix "format" CLI action, format files #93

Merged
merged 1 commit into from
May 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"build": "gatsby build",
"develop": "gatsby develop",
"dev": "yarn develop",
"format": "prettier --write 'src/**/*.js'",
"format": "prettier-eslint --write 'src/**/*.js'",
"lint": "eslint .",
"test": "echo \"Error: no test specified\" && exit 1"
},
Expand All @@ -44,8 +44,8 @@
"eslint-plugin-jsx-a11y": "^6.0.3",
"eslint-plugin-prettier": "^2.6.0",
"eslint-plugin-react": "^7.7.0",
"prettier": "^1.11.1",
"prettier-eslint": "^8.8.1",
"prettier": "^1.17.1",
"prettier-eslint": "^8.8.2",
"prettier-eslint-cli": "^4.7.1"
}
}
6 changes: 3 additions & 3 deletions src/components/Subheading.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";
import styled from "styled-components";
import { typography } from "./shared/styles";
import React from 'react';
import styled from 'styled-components';
import { typography } from './shared/styles';

// prettier-ignore
const Heading = styled.span`
Expand Down
4 changes: 2 additions & 2 deletions src/components/shared/global.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { injectGlobal, css } from "styled-components";
import { background, color, typography } from "./styles";
import { injectGlobal, css } from 'styled-components';
import { background, color, typography } from './styles';

export const bodyStyles = css`
font-family: ${typography.type.primary};
Expand Down
2 changes: 1 addition & 1 deletion src/pages/404.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from "react";
import React from 'react';

const NotFoundPage = () => (
<div>
Expand Down
33 changes: 22 additions & 11 deletions src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,58 +247,68 @@ export default ({ data: { site: { siteMetadata: { toc, defaultTranslation } }, p
<Actions>
<Link isGatsby to={`/react/en/${firstChapter}`}>
<Button inverse>
<ViewLayerImage src="/logo-react.svg" alt="React" />English
<ViewLayerImage src="/logo-react.svg" alt="React" />
English
</Button>
</Link>
<Link isGatsby to={`/react/es/${firstChapter}`}>
<Button inverse>
<ViewLayerImage src="/logo-react.svg" alt="React" />Español
<ViewLayerImage src="/logo-react.svg" alt="React" />
Español
</Button>
</Link>
<Link isGatsby to={`/react/zh-CN/${firstChapter}`}>
<Button inverse>
<ViewLayerImage src="/logo-react.svg" alt="React" />简体中文
<ViewLayerImage src="/logo-react.svg" alt="React" />
简体中文
</Button>
</Link>
<Link isGatsby to={`/react/zh-TW/${firstChapter}`}>
<Button inverse>
<ViewLayerImage src="/logo-react.svg" alt="React" />繁體中文
<ViewLayerImage src="/logo-react.svg" alt="React" />
繁體中文
</Button>
</Link>
<Link isGatsby to={`react/pt/${firstChapter}`}>
<Button inverse>
<ViewLayerImage src="/logo-react.svg" alt="React" />Português
<ViewLayerImage src="/logo-react.svg" alt="React" />
Português
</Button>
</Link>
</Actions>
<ActionHeading>Angular</ActionHeading>
<Actions>
<Link isGatsby to={`/angular/en/${firstChapter}`}>
<Button inverse>
<ViewLayerImage src="/logo-angular.svg" alt="Angular" />English
<ViewLayerImage src="/logo-angular.svg" alt="Angular" />
English
</Button>
</Link>
<Link isGatsby to={`/angular/es/${firstChapter}`}>
<Button inverse>
<ViewLayerImage src="/logo-angular.svg" alt="Angular" />Español
<ViewLayerImage src="/logo-angular.svg" alt="Angular" />
Español
</Button>
</Link>
<Link isGatsby to={`/angular/pt/${firstChapter}`}>
<Button inverse>
<ViewLayerImage src="/logo-angular.svg" alt="Angular" />Português
<ViewLayerImage src="/logo-angular.svg" alt="Angular" />
Português
</Button>
</Link>
</Actions>
<ActionHeading>Vue</ActionHeading>
<Actions>
<Link isGatsby to={`/vue/en/${firstChapter}`}>
<Button inverse>
<ViewLayerImage src="/logo-vue.svg" alt="Vue" />English
<ViewLayerImage src="/logo-vue.svg" alt="Vue" />
English
</Button>
</Link>
<Link isGatsby to={`/vue/pt/${firstChapter}`}>
<Button inverse>
<ViewLayerImage src="/logo-vue.svg" alt="Vue"/>Português
<ViewLayerImage src="/logo-vue.svg" alt="Vue" />
Português
</Button>
</Link>
</Actions>
Expand Down Expand Up @@ -352,7 +362,8 @@ export default ({ data: { site: { siteMetadata: { toc, defaultTranslation } }, p
you{' '}
<strong>
develop and design UI components outside your app in an isolated environment
</strong>.
</strong>
.
</p>
<p>
Professional developers at Airbnb, Dropbox, and Lonely Planet use Storybook to build
Expand Down
60 changes: 56 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3130,7 +3130,7 @@ esniff@^1.1:
d "1"
es5-ext "^0.10.12"

espree@^3.5.4:
espree@^3.5.2, espree@^3.5.4:
version "3.5.4"
resolved "https://registry.yarnpkg.com/espree/-/espree-3.5.4.tgz#b0f447187c8a8bed944b815a660bddf5deb5d1a7"
dependencies:
Expand Down Expand Up @@ -7229,7 +7229,7 @@ prettier-eslint-cli@^4.7.1:
rxjs "^5.3.0"
yargs "10.0.3"

prettier-eslint@^8.5.0, prettier-eslint@^8.8.1:
prettier-eslint@^8.5.0:
version "8.8.1"
resolved "https://registry.yarnpkg.com/prettier-eslint/-/prettier-eslint-8.8.1.tgz#38505163274742f2a0b31653c39e40f37ebd07da"
dependencies:
Expand All @@ -7246,7 +7246,31 @@ prettier-eslint@^8.5.0, prettier-eslint@^8.8.1:
typescript "^2.5.1"
typescript-eslint-parser "^11.0.0"

prettier@^1.11.1, prettier@^1.7.0:
prettier-eslint@^8.8.2:
version "8.8.2"
resolved "https://registry.yarnpkg.com/prettier-eslint/-/prettier-eslint-8.8.2.tgz#fcb29a48ab4524e234680797fe70e9d136ccaf0b"
integrity sha512-2UzApPuxi2yRoyMlXMazgR6UcH9DKJhNgCviIwY3ixZ9THWSSrUww5vkiZ3C48WvpFl1M1y/oU63deSy1puWEA==
dependencies:
babel-runtime "^6.26.0"
common-tags "^1.4.0"
dlv "^1.1.0"
eslint "^4.0.0"
indent-string "^3.2.0"
lodash.merge "^4.6.0"
loglevel-colored-level-prefix "^1.0.0"
prettier "^1.7.0"
pretty-format "^23.0.1"
require-relative "^0.8.7"
typescript "^2.5.1"
typescript-eslint-parser "^16.0.0"
vue-eslint-parser "^2.0.2"

prettier@^1.17.1:
version "1.17.1"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.17.1.tgz#ed64b4e93e370cb8a25b9ef7fef3e4fd1c0995db"
integrity sha512-TzGRNvuUSmPgwivDqkZ9tM/qTGW9hqDKWOE9YHiyQdixlKbv7kvEqsmDPrcHJTKwthU774TQwZXVtaQ/mMsvjg==

prettier@^1.7.0:
version "1.11.1"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.11.1.tgz#61e43fc4cd44e68f2b0dfc2c38cd4bb0fccdcc75"

Expand All @@ -7268,6 +7292,14 @@ pretty-format@^22.0.3:
ansi-regex "^3.0.0"
ansi-styles "^3.2.0"

pretty-format@^23.0.1:
version "23.6.0"
resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-23.6.0.tgz#5eaac8eeb6b33b987b7fe6097ea6a8a146ab5760"
integrity sha512-zf9NV1NSlDLDjycnwm6hpFATCGl/K1lt0R/GdkAK2O5LN/rwJoB+Mh93gGJjut4YbmecbfgLWVGSTCr0Ewvvbw==
dependencies:
ansi-regex "^3.0.0"
ansi-styles "^3.2.0"

prismjs@^1.13.0:
version "1.13.0"
resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.13.0.tgz#edcc14a90bbd72a03e5ffd2bab81a04c79a607a6"
Expand Down Expand Up @@ -8286,7 +8318,7 @@ semver-diff@^2.0.0:
dependencies:
semver "^5.0.3"

"semver@2 || 3 || 4 || 5", semver@^5.0.1, semver@^5.0.3, semver@^5.1.0, semver@^5.3.0:
"semver@2 || 3 || 4 || 5", semver@5.5.0, semver@^5.0.1, semver@^5.0.3, semver@^5.1.0, semver@^5.3.0:
version "5.5.0"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab"

Expand Down Expand Up @@ -9240,6 +9272,14 @@ typescript-eslint-parser@^11.0.0:
lodash.unescape "4.0.1"
semver "5.4.1"

typescript-eslint-parser@^16.0.0:
version "16.0.1"
resolved "https://registry.yarnpkg.com/typescript-eslint-parser/-/typescript-eslint-parser-16.0.1.tgz#b40681c7043b222b9772748b700a000b241c031b"
integrity sha512-IKawLTu4A2xN3aN/cPLxvZ0bhxZHILGDKTZWvWNJ3sLNhJ3PjfMEDQmR2VMpdRPrmWOadgWXRwjLBzSA8AGsaQ==
dependencies:
lodash.unescape "4.0.1"
semver "5.5.0"

typescript@^2.5.1:
version "2.8.1"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.8.1.tgz#6160e4f8f195d5ba81d4876f9c0cc1fbc0820624"
Expand Down Expand Up @@ -9600,6 +9640,18 @@ [email protected]:
dependencies:
indexof "0.0.1"

vue-eslint-parser@^2.0.2:
version "2.0.3"
resolved "https://registry.yarnpkg.com/vue-eslint-parser/-/vue-eslint-parser-2.0.3.tgz#c268c96c6d94cfe3d938a5f7593959b0ca3360d1"
integrity sha512-ZezcU71Owm84xVF6gfurBQUGg8WQ+WZGxgDEQu1IHFBZNx7BFZg3L1yHxrCBNNwbwFtE1GuvfJKMtb6Xuwc/Bw==
dependencies:
debug "^3.1.0"
eslint-scope "^3.7.1"
eslint-visitor-keys "^1.0.0"
espree "^3.5.2"
esquery "^1.0.0"
lodash "^4.17.4"

walker@~1.0.5:
version "1.0.7"
resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.7.tgz#2f7f9b8fd10d677262b18a884e28d19618e028fb"
Expand Down