Skip to content

Commit ff911e2

Browse files
Update prettier (gatsbyjs#22520)
* Update prettier to latest version * Run 'yarn format' from root of project * Remove prettier-ignore for nested markdown * Fix starters * Fix benchmarks * Fix examples * Fix integration-tests * Update eslint-config-prettier & eslint-plugin-prettier * Fix linting * Update all .prettierrc * Run Prettier on full codebase * Remove unnecessary .prettierrc & .prettierignore files * Update Prettier script * Update snapshots * Revert snapshot * Revert "Update Prettier script" This reverts commit 008eb99 * Update snapshot * Update docs/blog/2018-08-09-swag-store/index.md Co-Authored-By: Dima An <[email protected]> Co-authored-by: Dima An <[email protected]>
1 parent 936fa40 commit ff911e2

File tree

481 files changed

+138269
-138471
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

481 files changed

+138269
-138471
lines changed

.github/actions/high-priority-prs/src/filter.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ const filter = (queues, team) => {
1313
.map(node => {
1414
if (node.requestedReviewer) {
1515
tools.log.info(
16-
`Review request for team ${node.requestedReviewer.name} on PR: ${
17-
pr.title
18-
}`
16+
`Review request for team ${node.requestedReviewer.name} on PR: ${pr.title}`
1917
)
2018
return node.requestedReviewer.id
2119
}

.github/actions/high-priority-prs/src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const teams = [
1717
},
1818
]
1919

20-
const start = async function() {
20+
const start = async function () {
2121
const data = await fetch()
2222
if (data) {
2323
const queues = processData(data)

.prettierrc.js

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
module.exports = {
2-
endOfLine: "lf",
2+
arrowParens: "avoid",
33
semi: false,
4-
singleQuote: false,
5-
tabWidth: 2,
6-
trailingComma: "es5",
74
overrides: [
85
{
96
// This file uses semicolons. It's needed here because `documentation`
@@ -16,10 +13,10 @@ module.exports = {
1613
},
1714
},
1815
{
19-
"files": "docs/**/*.md",
20-
"options": {
21-
"parser": "mdx"
22-
}
16+
files: "docs/**/*.md",
17+
options: {
18+
parser: "mdx",
19+
},
2320
},
2421
],
2522
}

benchmarks/create-pages/gatsby-config.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,5 @@ module.exports = {
44
description: `The createPages benchmark`,
55
author: `@gatsbyjs`,
66
},
7-
plugins: [
8-
`gatsby-plugin-benchmark-reporting`,
9-
],
7+
plugins: [`gatsby-plugin-benchmark-reporting`],
108
}

benchmarks/image-processing/plugins/gatsby-source-remote-images/urls.json

Lines changed: 136207 additions & 136207 deletions
Large diffs are not rendered by default.

benchmarks/markdown_id/md.tpl.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@ module.exports = index => `${matter
88
title: faker.lorem.sentence(),
99
description: faker.lorem.sentence(),
1010
path: `/${faker.helpers.slugify(faker.lorem.sentence())}`,
11-
date: faker.date
12-
.recent(1000)
13-
.toISOString()
14-
.slice(0, 10),
11+
date: faker.date.recent(1000).toISOString().slice(0, 10),
1512
tags: `[${faker.random
1613
.words(3)
1714
.split(` `)

benchmarks/markdown_slug/md.tpl.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@ module.exports = index => `${matter
88
title: faker.lorem.sentence(),
99
description: faker.lorem.sentence(),
1010
path: `/${faker.helpers.slugify(faker.lorem.sentence())}`,
11-
date: faker.date
12-
.recent(1000)
13-
.toISOString()
14-
.slice(0, 10),
11+
date: faker.date.recent(1000).toISOString().slice(0, 10),
1512
tags: `[${faker.random
1613
.words(3)
1714
.split(` `)

benchmarks/mdx/.prettierignore

Lines changed: 0 additions & 4 deletions
This file was deleted.

benchmarks/mdx/gatsby-browser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
import "./styles.css"
1+
import "./styles.css"

benchmarks/mdx/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"devDependencies": {
3636
"cross-env": "^7.0.0",
3737
"gatsby-plugin-benchmark-reporting": "*",
38-
"prettier": "^1.19.1",
38+
"prettier": "2.0.4",
3939
"willit": "*"
4040
},
4141
"repository": {

0 commit comments

Comments
 (0)