Update prettier to 1.9.1 (#273)

This commit is contained in:
Jan Kassens 2017-12-12 12:47:52 -08:00 committed by Héctor Ramos
parent c22203523f
commit b174ee2d2a
9 changed files with 23 additions and 44 deletions

View file

@ -98,14 +98,10 @@ files.forEach(file => {
if (!metadata.original_id) {
console.error(
`No 'original_id' field found in ${
file
}. Perhaps you forgot to add it when importing prior versions of your docs?`
`No 'original_id' field found in ${file}. Perhaps you forgot to add it when importing prior versions of your docs?`
);
throw new Error(
`No 'original_id' field found in ${
file
}. Perhaps you forgot to add it when importing prior versions of your docs?`
`No 'original_id' field found in ${file}. Perhaps you forgot to add it when importing prior versions of your docs?`
);
}
if (!metadata.id) {
@ -113,14 +109,10 @@ files.forEach(file => {
throw new Error(`No 'id' field found in ${file}.`);
} else if (metadata.id.indexOf('version-') === -1) {
console.error(
`The 'id' field in ${
file
} is missing the expected 'version-XX-' prefix. Perhaps you forgot to add it when importing prior versions of your docs?`
`The 'id' field in ${file} is missing the expected 'version-XX-' prefix. Perhaps you forgot to add it when importing prior versions of your docs?`
);
throw new Error(
`The 'id' field in ${
file
} is missing the expected 'version-XX-' prefix. Perhaps you forgot to add it when importing prior versions of your docs?`
`The 'id' field in ${file} is missing the expected 'version-XX-' prefix. Perhaps you forgot to add it when importing prior versions of your docs?`
);
}
@ -141,9 +133,7 @@ files.forEach(file => {
function docVersion(id, req_version) {
if (!available[id]) {
throw new Error(
`Document with id '${
id
}' was requested but no document with that id could be located.`
`Document with id '${id}' was requested but no document with that id could be located.`
);
}
// iterate through versions until a version less than or equal to the requested
@ -286,9 +276,7 @@ function sidebarVersion(req_version) {
}
}
throw new Error(
`No sidebar file available to use for version ${
req_version
}. Verify that 'version-${req_version}-sidebars.json' exists.`
`No sidebar file available to use for version ${req_version}. Verify that 'version-${req_version}-sidebars.json' exists.`
);
}