Skip to content

Commit

Permalink
chore: update Prettier, ESLint, SVGO and plugins (gatsbyjs#14307)
Browse files Browse the repository at this point in the history
  • Loading branch information
lipis authored and wardpeet committed May 28, 2019
1 parent c40bc4b commit 67ff2b9
Show file tree
Hide file tree
Showing 7 changed files with 453 additions and 159 deletions.
4 changes: 3 additions & 1 deletion docs/docs/how-code-splitting-works.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ During the [Write Out Pages](/docs/write-pages/#async-requiresjs) bootstrap phas
```javascript
exports.components = {
"component--src-blog-js": () =>
import("/home/site/src/blog.js" /* webpackChunkName: "component---src-blog-js" */),
import(
"/home/site/src/blog.js" /* webpackChunkName: "component---src-blog-js" */
),
// more components
}
```
Expand Down
4 changes: 3 additions & 1 deletion docs/docs/write-pages.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@ An example of async-requires is:
```javascript
exports.components = {
"component---src-blog-2-js": () =>
import("/home/site/src/blog/2.js" /* webpackChunkName: "component---src-blog-2-js" */),
import(
"/home/site/src/blog/2.js" /* webpackChunkName: "component---src-blog-2-js" */
),
// more components
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import React from "react"
class DynamicComponent extends React.Component {
handleClick = () => {
console.log(`Sync-Click!`)
import(/* webpackChunkName: "async-console", webpackPreload: true */ `../utils/async-console`).then(
module => {
const asyncConsole = module.default
asyncConsole(`Async-Log!`)
}
)
import(
/* webpackChunkName: "async-console", webpackPreload: true */ `../utils/async-console`
).then(module => {
const asyncConsole = module.default
asyncConsole(`Async-Log!`)
})
}

render() {
Expand Down
12 changes: 6 additions & 6 deletions examples/using-prefetching-preloading-modules/src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ const Wrapper = styled.section`
class IndexPage extends React.Component {
handleClick = () => {
console.log(`Sync-Click!`)
import(/* webpackChunkName: "async-alert", webpackPrefetch: true */ `../utils/async-alert`).then(
module => {
const asyncAlert = module.default
asyncAlert(`Async-Click!`)
}
)
import(
/* webpackChunkName: "async-alert", webpackPrefetch: true */ `../utils/async-alert`
).then(module => {
const asyncAlert = module.default
asyncAlert(`Async-Click!`)
})
}

render() {
Expand Down
26 changes: 13 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,36 @@
"@babel/core": "^7.0.0",
"@babel/node": "^7.0.0",
"@babel/runtime": "^7.0.0",
"babel-eslint": "^10.0.0",
"babel-eslint": "^10.0.1",
"babel-jest": "^24.0.0",
"chokidar": "^1.7.0",
"cross-env": "^5.1.4",
"eslint": "^5.13.0",
"eslint-config-google": "^0.10.0",
"eslint-config-prettier": "^4.0.0",
"eslint": "^5.16.0",
"eslint-config-google": "^0.13.0",
"eslint-config-prettier": "^4.3.0",
"eslint-plugin-filenames": "^1.3.2",
"eslint-plugin-flowtype": "^2.50.3",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-jsx-a11y": "^6.1.2",
"eslint-plugin-prettier": "^3.0.1",
"eslint-plugin-react": "^7.11.1",
"eslint-plugin-flowtype": "^3.9.1",
"eslint-plugin-import": "^2.17.2",
"eslint-plugin-jsx-a11y": "^6.2.1",
"eslint-plugin-prettier": "^3.1.0",
"eslint-plugin-react": "^7.13.0",
"flow-bin": "^0.42.0",
"fs-extra": "^7.0.0",
"glob": "^7.1.1",
"husky": "1.1.1",
"husky": "2.3.0",
"jest": "^24.0.0",
"jest-cli": "^24.0.0",
"jest-environment-jsdom-fourteen": "^0.1.0",
"jest-junit": "^6.1.0",
"jest-serializer-path": "^0.1.15",
"lerna": "^3.10.7",
"lint-staged": "^8.0.4",
"lint-staged": "^8.1.7",
"markdown-magic": "^0.1.25",
"npm-run-all": "4.1.5",
"plop": "^1.8.1",
"prettier": "^1.16.4",
"prettier": "1.17.1",
"rimraf": "^2.6.1",
"svgo": "^1.1.1",
"svgo": "1.2.2",
"yargs": "^10.0.3"
},
"engines": {
Expand Down
4 changes: 2 additions & 2 deletions packages/gatsby-plugin-manifest/src/__tests__/gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jest.mock(`fs`, () => {
jest.mock(`sharp`, () => {
let sharp = jest.fn(
() =>
new class {
new (class {
resize() {
return this
}
Expand All @@ -28,7 +28,7 @@ jest.mock(`sharp`, () => {
height: 128,
}
}
}()
})()
)

sharp.simd = jest.fn()
Expand Down
Loading

0 comments on commit 67ff2b9

Please sign in to comment.