Skip to content

Commit 67c596a

Browse files
committed
Update the prettier dev dependency.
1 parent 4035284 commit 67c596a

24 files changed

+155
-154
lines changed

babelPluginAddBabelRuntimeFileExtensions.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ module.exports = function babelPluginAddBabelRuntimeFileExtensions({ types }) {
2020
path
2121
.get('source')
2222
.replaceWith(types.stringLiteral(`${path.node.source.value}.js`))
23-
}
24-
}
23+
},
24+
},
2525
}
2626
}

changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
- Removed the [`object-assign`](https://npm.im/object-assign) dependency and several Babel dev dependencies after simplifying the Babel config.
1515
- Added a new [`babel-plugin-transform-require-extensions`](https://npm.im/babel-plugin-transform-require-extensions) dev dependency and ensured ESM import specifiers in both source and published `.mjs` files contain file names with extensions, which [are mandatory in the final Node.js ESM implementation](https://nodejs.org/api/esm.html#esm_mandatory_file_extensions). Published CJS `.js` files now also have file extensions in `require` paths.
1616
- Stop using [`husky`](https://npm.im/husky) and [`lint-staged`](https://npm.im/lint-staged).
17+
- Lint fixes for [`prettier`](https://npm.im/prettier) v2.
1718
- Tidied Babel configs.
1819
- Ensure GitHub Actions run on pull request.
1920
- Use strict mode for scripts.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
"jsdoc-md": "^5.0.1",
7676
"koa": "^2.7.0",
7777
"koa-bodyparser": "^4.3.0",
78-
"prettier": "^1.18.2",
78+
"prettier": "^2.0.2",
7979
"react": "^16.13.1",
8080
"react-dom": "^16.13.1",
8181
"react-test-renderer": "^16.13.1",

readme.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ const PokemonImage = ({ name }) => {
6666
// additional properties can be used; all are JSON encoded and sent to the
6767
// GraphQL server in the fetch request body.
6868
operation: {
69-
query: `{ pokemon(name: "${name}") { image } }`
69+
query: `{ pokemon(name: "${name}") { image } }`,
7070
},
7171

7272
// Load the query whenever the component mounts. This is desirable for
@@ -79,7 +79,7 @@ const PokemonImage = ({ name }) => {
7979

8080
// Reload the query whenever the global cache is reset. Resets immediately
8181
// delete the cache and are mostly only used when logging out the user.
82-
loadOnReset: true
82+
loadOnReset: true,
8383
})
8484

8585
return cacheValue.data ? (
@@ -421,11 +421,11 @@ _A component that displays a Pokémon image._
421421
> options.url = 'https://graphql-pokemon.now.sh'
422422
> },
423423
> operation: {
424-
> query: `{ pokemon(name: "${name}") { image } }`
424+
> query: `{ pokemon(name: "${name}") { image } }`,
425425
> },
426426
> loadOnMount: true,
427427
> loadOnReload: true,
428-
> loadOnReset: true
428+
> loadOnReset: true,
429429
> })
430430
>
431431
> return cacheValue.data ? (
@@ -559,7 +559,7 @@ Overrides default [GraphQL `fetch` options](#type-graphqlfetchoptions). Mutate t
559559
_Setting [GraphQL `fetch` options](#type-graphqlfetchoptions) for an imaginary API._
560560
561561
> ```js
562-
> options => {
562+
> ;(options) => {
563563
> options.url = 'https://api.example.com/graphql'
564564
> options.credentials = 'include'
565565
> }

size-limit-entries/browser.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ export {
33
GraphQLContext,
44
GraphQLProvider,
55
useGraphQL,
6-
reportCacheErrors
6+
reportCacheErrors,
77
} from '../universal/index.mjs'

size-limit-entries/server.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ export {
33
GraphQLContext,
44
GraphQLProvider,
55
useGraphQL,
6-
reportCacheErrors
6+
reportCacheErrors,
77
} from '..'
88
export { ssr } from '../server/index.mjs'

src/server/.babelrc.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ module.exports = {
1515
targets: 'Node >= 10',
1616
modules: process.env.BABEL_ESM ? false : 'cjs',
1717
shippedProposals: true,
18-
loose: true
19-
}
20-
]
21-
]
18+
loose: true,
19+
},
20+
],
21+
],
2222
}

src/test/.babelrc.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ module.exports = {
1515
targets: { node: true },
1616
modules: process.env.BABEL_ESM ? false : 'cjs',
1717
shippedProposals: true,
18-
loose: true
19-
}
18+
loose: true,
19+
},
2020
],
21-
'@babel/react'
22-
]
21+
'@babel/react',
22+
],
2323
}

src/test/createGraphQLKoaApp.mjs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const {
77
GraphQLNonNull,
88
GraphQLObjectType,
99
GraphQLSchema,
10-
GraphQLString
10+
GraphQLString,
1111
} = graphql
1212

1313
/**
@@ -23,11 +23,11 @@ export const createGraphQLKoaApp = (
2323
args: {
2424
phrase: {
2525
type: GraphQLString,
26-
defaultValue: 'hello'
27-
}
26+
defaultValue: 'hello',
27+
},
2828
},
29-
resolve: (root, { phrase }) => phrase
30-
}
29+
resolve: (root, { phrase }) => phrase,
30+
},
3131
}
3232
) =>
3333
new Koa()
@@ -38,8 +38,8 @@ export const createGraphQLKoaApp = (
3838
schema: new GraphQLSchema({
3939
query: new GraphQLObjectType({
4040
name: 'Query',
41-
fields
42-
})
43-
})
41+
fields,
42+
}),
43+
}),
4444
})
4545
)

src/test/listen.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
*/
77
export function listen(server) {
88
return new Promise((resolve, reject) => {
9-
server.listen(function(error) {
9+
server.listen(function (error) {
1010
if (error) reject(error)
1111
else
1212
resolve({
1313
port: this.address().port,
14-
close: () => this.close()
14+
close: () => this.close(),
1515
})
1616
})
1717
})

0 commit comments

Comments
 (0)