Skip to content
This repository has been archived by the owner on Jul 31, 2019. It is now read-only.

Update prettier to tilde range #2556

Merged
merged 1 commit into from Nov 15, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -93,7 +93,7 @@
"eslint": "^4.6.1",
"eslint-plugin-prettier": "^2.2.0",
"is-reachable": "^2.3.3",
"prettier": "^1.6.1",
"prettier": "~1.8.2",
"shx": "^0.2.2",
"stylelint": "^8.1.1",
"stylelint-config-standard": "^17.0.0"
Expand Down
6 changes: 3 additions & 3 deletions scripts/localize/index.js
Expand Up @@ -31,9 +31,9 @@ function writeFile(locale, file, properties, addWrapper) {
locale = locale.replace(/-/g, "_");
properties = JSON.stringify(properties, null, IS_DEVELOPMENT ? 2 : 0);
if (addWrapper) {
properties = `${IS_DEVELOPMENT
? JS_WRAPPER
: JS_WRAPPER_MIN}_values: ${properties}};`;
properties = `${IS_DEVELOPMENT ? JS_WRAPPER : JS_WRAPPER_MIN}_values: ${
properties
}};`;
}

return new Promise(function(resolve, reject) {
Expand Down
12 changes: 9 additions & 3 deletions server/lib/middleware.js
Expand Up @@ -183,7 +183,9 @@ module.exports = function middlewareConstructor(config) {
next(
HttpError.format(
{
message: `Data validation in middleware failed for ${req.originalUrl}`,
message: `Data validation in middleware failed for ${
req.originalUrl
}`,
context: {
expected: properties,
actual: req.body
Expand Down Expand Up @@ -239,7 +241,9 @@ module.exports = function middlewareConstructor(config) {
return next(
HttpError.format(
{
message: `Request to ${userUrl} returned a status of ${response.statusCode}`,
message: `Request to ${userUrl} returned a status of ${
response.statusCode
}`,
context: response.body
},
req
Expand Down Expand Up @@ -293,7 +297,9 @@ module.exports = function middlewareConstructor(config) {
return next(
HttpError.format(
{
message: `Request to ${projectUrl} returned a status of ${response.statusCode}`,
message: `Request to ${projectUrl} returned a status of ${
response.statusCode
}`,
context: response.body
},
req
Expand Down
16 changes: 12 additions & 4 deletions server/routes/auth/oauth2-callback.js
Expand Up @@ -95,7 +95,9 @@ module.exports = function(config, req, res, next) {
return next(
HttpError.format(
{
message: `Failed to send request to ${authURL}. Verify that the authentication server is up and running.`,
message: `Failed to send request to ${
authURL
}. Verify that the authentication server is up and running.`,
context: err
},
req
Expand All @@ -108,7 +110,9 @@ module.exports = function(config, req, res, next) {
return next(
HttpError.format(
{
message: `Request to ${authURL} returned a status of ${response.statusCode}`,
message: `Request to ${authURL} returned a status of ${
response.statusCode
}`,
context: response.body
},
req
Expand Down Expand Up @@ -151,7 +155,9 @@ module.exports = function(config, req, res, next) {
return next(
HttpError.format(
{
message: `Failed to send request to ${userURL}. Verify that the authentication server is up and running.`,
message: `Failed to send request to ${
userURL
}. Verify that the authentication server is up and running.`,
context: err
},
req
Expand All @@ -164,7 +170,9 @@ module.exports = function(config, req, res, next) {
return next(
HttpError.format(
{
message: `Request to ${userURL} returned a status of ${response.statusCode}`,
message: `Request to ${userURL} returned a status of ${
response.statusCode
}`,
context: response.body
},
req
Expand Down
20 changes: 15 additions & 5 deletions server/routes/files/create-update.js
Expand Up @@ -78,7 +78,9 @@ module.exports = function(config, req, res, next) {
next(
HttpError.format(
{
message: `Failed to initiate request to ${options.pathname} ${errorLogSuffix}`,
message: `Failed to initiate request to ${options.pathname} ${
errorLogSuffix
}`,
context: err
},
req
Expand All @@ -93,7 +95,9 @@ module.exports = function(config, req, res, next) {
next(
HttpError.format(
{
message: `Failed to send request to ${options.pathname} ${errorLogSuffix}`,
message: `Failed to send request to ${options.pathname} ${
errorLogSuffix
}`,
context: err
},
req
Expand All @@ -114,7 +118,9 @@ module.exports = function(config, req, res, next) {
next(
HttpError.format(
{
message: `Data sent by the publish server was in an invalid format. Failed to run \`JSON.parse\` ${errorLogSuffix}`,
message: `Data sent by the publish server was in an invalid format. Failed to run \`JSON.parse\` ${
errorLogSuffix
}`,
context: e.message,
stack: e.stack
},
Expand All @@ -130,7 +136,9 @@ module.exports = function(config, req, res, next) {
next(
HttpError.format(
{
message: `Request to ${options.pathname} returned a status of ${response.statusCode} ${errorLogSuffix}`,
message: `Request to ${options.pathname} returned a status of ${
response.statusCode
} ${errorLogSuffix}`,
context: body
},
req
Expand Down Expand Up @@ -163,7 +171,9 @@ module.exports = function(config, req, res, next) {
next(
HttpError.format(
{
message: `File data could not be read from stream ${errorLogSuffix}`,
message: `File data could not be read from stream ${
errorLogSuffix
}`,
context: err
},
req
Expand Down
4 changes: 3 additions & 1 deletion server/routes/files/delete.js
Expand Up @@ -37,7 +37,9 @@ module.exports = function(config, req, res, next) {
next(
HttpError.format(
{
message: `Request to ${url} returned a status of ${response.statusCode}`,
message: `Request to ${url} returned a status of ${
response.statusCode
}`,
context: response.body
},
req
Expand Down
16 changes: 6 additions & 10 deletions server/routes/projects/rename-folder.js
Expand Up @@ -27,11 +27,9 @@ module.exports = function(config, req, res, next) {
next(
HttpError.format(
{
message: `Failed to send request to ${uri}, paths sent: ${JSON.stringify(
req.body.paths,
null,
2
)}`,
message: `Failed to send request to ${
uri
}, paths sent: ${JSON.stringify(req.body.paths, null, 2)}`,
context: err
},
req
Expand All @@ -45,11 +43,9 @@ module.exports = function(config, req, res, next) {
next(
HttpError.format(
{
message: `Request to ${uri} returned a status of ${response.statusCode}. Paths sent: ${JSON.stringify(
req.body.paths,
null,
2
)}`,
message: `Request to ${uri} returned a status of ${
response.statusCode
}. Paths sent: ${JSON.stringify(req.body.paths, null, 2)}`,
context: response.body
},
req
Expand Down
12 changes: 9 additions & 3 deletions server/routes/utils.js
Expand Up @@ -272,7 +272,9 @@ function getRemixedProject(config, projectId, callback) {
} catch (e) {
callback(
{
message: `Project data received by the publish server for ${publishURL} was in an invalid format. Failed to run \`JSON.parse\``,
message: `Project data received by the publish server for ${
publishURL
} was in an invalid format. Failed to run \`JSON.parse\``,
context: e.message,
stack: e.stack
},
Expand Down Expand Up @@ -334,7 +336,9 @@ function getProjectFileMetadata(config, user, projectId, callback) {
} catch (e) {
callback(
{
message: `Project data received by the publish server for ${url} was in an invalid format. Failed to run \`JSON.parse\``,
message: `Project data received by the publish server for ${
url
} was in an invalid format. Failed to run \`JSON.parse\``,
context: e.message,
stack: e.stack
},
Expand Down Expand Up @@ -414,7 +418,9 @@ function getRemixedProjectFileMetadata(config, projectId, callback) {
} catch (e) {
callback(
{
message: `Project data received by the publish server for ${publishURL} was in an invalid format. Failed to run \`JSON.parse\``,
message: `Project data received by the publish server for ${
publishURL
} was in an invalid format. Failed to run \`JSON.parse\``,
context: e.message,
stack: e.stack
},
Expand Down