Skip to content

Commit

Permalink
Update prettier (#1191)
Browse files Browse the repository at this point in the history
Code changes are due to: prettier/prettier#3299
  • Loading branch information
IvanGoncharov authored and leebyron committed Jan 8, 2018
1 parent fd4a69c commit 67f947e
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 22 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"flow-bin": "0.61.0",
"isparta": "4.0.0",
"mocha": "3.5.0",
"prettier": "^1.8.2",
"prettier": "^1.9.2",
"sane": "2.0.0"
}
}
6 changes: 3 additions & 3 deletions src/execution/values.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ export function getVariableValues(
const coerced = coerceValue(value, varType, varDefNode);
const coercionErrors = coerced.errors;
if (coercionErrors) {
const messagePrelude = `Variable "$${
varName
}" got invalid value ${JSON.stringify(value)}; `;
const messagePrelude = `Variable "$${varName}" got invalid value ${JSON.stringify(
value,
)}; `;
coercionErrors.forEach(error => {
error.message = messagePrelude + error.message;
});
Expand Down
16 changes: 4 additions & 12 deletions src/type/__tests__/validation-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -760,9 +760,7 @@ describe('Type System: Object fields must have output types', () => {
const schema = schemaWithObjectFieldOfType(type);
expect(validateSchema(schema)).to.containSubset([
{
message: `The type of BadObject.badField must be Output Type but got: ${
type
}.`,
message: `The type of BadObject.badField must be Output Type but got: ${type}.`,
},
]);
});
Expand Down Expand Up @@ -902,9 +900,7 @@ describe('Type System: Interface fields must have output types', () => {
const schema = schemaWithInterfaceFieldOfType(type);
expect(validateSchema(schema)).to.containSubset([
{
message: `The type of BadInterface.badField must be Output Type but got: ${
type
}.`,
message: `The type of BadInterface.badField must be Output Type but got: ${type}.`,
},
]);
});
Expand Down Expand Up @@ -980,9 +976,7 @@ describe('Type System: Field arguments must have input types', () => {
const schema = schemaWithArgOfType(type);
expect(validateSchema(schema)).to.containSubset([
{
message: `The type of BadObject.badField(badArg:) must be Input Type but got: ${
type
}.`,
message: `The type of BadObject.badField(badArg:) must be Input Type but got: ${type}.`,
},
]);
});
Expand Down Expand Up @@ -1054,9 +1048,7 @@ describe('Type System: Input Object fields must have input types', () => {
const schema = schemaWithInputFieldOfType(type);
expect(validateSchema(schema)).to.containSubset([
{
message: `The type of BadInputObject.badField must be Input Type but got: ${
type
}.`,
message: `The type of BadInputObject.badField must be Input Type but got: ${type}.`,
},
]);
});
Expand Down
4 changes: 1 addition & 3 deletions src/validation/rules/KnownArgumentNames.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ export function unknownDirectiveArgMessage(
directiveName: string,
suggestedArgs: Array<string>,
): string {
let message = `Unknown argument "${argName}" on directive "@${
directiveName
}".`;
let message = `Unknown argument "${argName}" on directive "@${directiveName}".`;
if (suggestedArgs.length) {
message += ` Did you mean ${quotedOrList(suggestedArgs)}?`;
}
Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2218,9 +2218,9 @@ preserve@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"

prettier@^1.8.2:
version "1.8.2"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.8.2.tgz#bff83e7fd573933c607875e5ba3abbdffb96aeb8"
prettier@^1.9.2:
version "1.9.2"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.9.2.tgz#96bc2132f7a32338e6078aeb29727178c6335827"

private@^0.1.6, private@^0.1.7:
version "0.1.8"
Expand Down

0 comments on commit 67f947e

Please sign in to comment.