diff --git a/package.json b/package.json index 3075eb44cc..c9fcd28f46 100644 --- a/package.json +++ b/package.json @@ -55,6 +55,6 @@ "flow-bin": "0.100.0", "mocha": "6.1.4", "nyc": "14.1.1", - "prettier": "1.17.1" + "prettier": "1.18.0" } } diff --git a/src/execution/execute.js b/src/execution/execute.js index 079dd0d441..e9da2a1166 100644 --- a/src/execution/execute.js +++ b/src/execution/execute.js @@ -855,9 +855,7 @@ function completeValue( ); if (completed === null) { throw new Error( - `Cannot return null for non-nullable field ${info.parentType.name}.${ - info.fieldName - }.`, + `Cannot return null for non-nullable field ${info.parentType.name}.${info.fieldName}.`, ); } return completed; @@ -934,9 +932,7 @@ function completeListValue( ): PromiseOrValue<$ReadOnlyArray> { invariant( isCollection(result), - `Expected Iterable, but did not find one for field ${ - info.parentType.name - }.${info.fieldName}.`, + `Expected Iterable, but did not find one for field ${info.parentType.name}.${info.fieldName}.`, ); // This is specified as a simple map, however we're optimizing the path diff --git a/src/jsutils/instanceOf.js b/src/jsutils/instanceOf.js index 2691ec5cc5..1aeee379f9 100644 --- a/src/jsutils/instanceOf.js +++ b/src/jsutils/instanceOf.js @@ -18,7 +18,7 @@ declare function instanceOf( // See: https://expressjs.com/en/advanced/best-practice-performance.html#set-node_env-to-production // See: https://webpack.js.org/guides/production/ -export default (process.env.NODE_ENV === 'production' +export default process.env.NODE_ENV === 'production' ? // eslint-disable-next-line no-shadow function instanceOf(value: mixed, constructor: mixed) { return value instanceof constructor; @@ -49,4 +49,4 @@ spurious results.`, } } return false; - }); + }; diff --git a/src/utilities/findBreakingChanges.js b/src/utilities/findBreakingChanges.js index 42e705b1b4..ddbd48e08c 100644 --- a/src/utilities/findBreakingChanges.js +++ b/src/utilities/findBreakingChanges.js @@ -269,9 +269,7 @@ function findUnionTypeChanges( for (const newPossibleType of possibleTypesDiff.added) { schemaChanges.push({ type: DangerousChangeType.TYPE_ADDED_TO_UNION, - description: `${newPossibleType.name} was added to union type ${ - oldType.name - }.`, + description: `${newPossibleType.name} was added to union type ${oldType.name}.`, }); } @@ -304,9 +302,7 @@ function findEnumTypeChanges( for (const oldValue of valuesDiff.removed) { schemaChanges.push({ type: BreakingChangeType.VALUE_REMOVED_FROM_ENUM, - description: `${oldValue.name} was removed from enum type ${ - oldType.name - }.`, + description: `${oldValue.name} was removed from enum type ${oldType.name}.`, }); } @@ -389,9 +385,7 @@ function findArgChanges( for (const oldArg of argsDiff.removed) { schemaChanges.push({ type: BreakingChangeType.ARG_REMOVED, - description: `${oldType.name}.${oldField.name} arg ${ - oldArg.name - } was removed.`, + description: `${oldType.name}.${oldField.name} arg ${oldArg.name} was removed.`, }); } diff --git a/yarn.lock b/yarn.lock index 0aa4e28b27..9ca5519315 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2141,10 +2141,10 @@ prettier-linter-helpers@^1.0.0: dependencies: fast-diff "^1.1.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.18.0: + version "1.18.0" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.18.0.tgz#d1701ca9b2941864b52f3262b35946d2c9cd88f0" + integrity sha512-YsdAD29M0+WY2xXZk3i0PA16olY9qZss+AuODxglXcJ+2ZBwFv+6k5tE8GS8/HKAthaajlS/WqhdgcjumOrPlg== private@^0.1.6: version "0.1.8"