Skip to content

Commit

Permalink
Pin prettier and add formatting changes
Browse files Browse the repository at this point in the history
Signed-off-by: Cameron Diver <cameron@balena.io>
  • Loading branch information
Cameron Diver committed Jun 10, 2019
1 parent 24e49bf commit 8b5ebe0
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 13 deletions.
4 changes: 3 additions & 1 deletion automation/capitanodoc/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,9 @@ export class MarkdownFileParser {
} else {
reject(
new Error(
`Markdown section not found: title="${title}" file="${this.mdFilePath}"`,
`Markdown section not found: title="${title}" file="${
this.mdFilePath
}"`,
),
);
}
Expand Down
4 changes: 3 additions & 1 deletion lib/actions/push.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,9 @@ async function getAppOwner(sdk: BalenaSDK, appName: string) {
});

const selected = await selectFromList(
`${entries.length} applications found with that name, please select the application you would like to push to`,
`${
entries.length
} applications found with that name, please select the application you would like to push to`,
entries,
);

Expand Down
8 changes: 6 additions & 2 deletions lib/actions/ssh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,17 @@ async function getContainerId(
});
if (request.status !== 200) {
throw new Error(
`There was an error connecting to device ${uuid}, HTTP response code: ${request.status}.`,
`There was an error connecting to device ${uuid}, HTTP response code: ${
request.status
}.`,
);
}
const body = request.body;
if (body.status !== 'success') {
throw new Error(
`There was an error communicating with device ${uuid}.\n\tError: ${body.message}`,
`There was an error communicating with device ${uuid}.\n\tError: ${
body.message
}`,
);
}
containerId = body.services[serviceName];
Expand Down
4 changes: 3 additions & 1 deletion lib/actions/tunnel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,9 @@ export const tunnel: CommandDefinition<Args, Options> = {
)
.then(() => {
logger.logInfo(
` - tunnelling ${localAddress}:${localPort} to ${device.uuid}:${remotePort}`,
` - tunnelling ${localAddress}:${localPort} to ${
device.uuid
}:${remotePort}`,
);

return true;
Expand Down
4 changes: 3 additions & 1 deletion lib/app-common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ function checkNodeVersion() {
const { stripIndent } = require('common-tags');
console.warn(stripIndent`
------------------------------------------------------------------------------
Warning: Node version "${process.version}" does not match required versions "${validNodeVersions}".
Warning: Node version "${
process.version
}" does not match required versions "${validNodeVersions}".
This may cause unexpected behaviour. To upgrade Node, visit:
https://nodejs.org/en/download/
------------------------------------------------------------------------------
Expand Down
4 changes: 3 additions & 1 deletion lib/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ import { exitWithExpectedError } from './utils/patterns';
function routeCliFramework(argv: string[]): void {
if (process.env.DEBUG) {
console.log(
`Debug: original argv0="${process.argv0}" argv=[${argv}] length=${argv.length}`,
`Debug: original argv0="${process.argv0}" argv=[${argv}] length=${
argv.length
}`,
);
}
const cmdSlice = argv.slice(2);
Expand Down
8 changes: 6 additions & 2 deletions lib/utils/compose_ts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ export async function parseRegistrySecrets(
return registrySecrets;
} catch (error) {
return exitWithExpectedError(
`Error validating registry secrets file "${secretsFilename}":\n${error.message}`,
`Error validating registry secrets file "${secretsFilename}":\n${
error.message
}`,
);
}
}
Expand Down Expand Up @@ -142,7 +144,9 @@ async function performResolution(
buildTask.buildStream = clonedStream;
if (!buildTask.external && !buildTask.resolved) {
throw new Error(
`Project type for service "${buildTask.serviceName}" could not be determined. Missing a Dockerfile?`,
`Project type for service "${
buildTask.serviceName
}" could not be determined. Missing a Dockerfile?`,
);
}
return buildTask;
Expand Down
8 changes: 6 additions & 2 deletions lib/utils/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,13 @@ export function stateToString(state: OperationState) {

switch (state.operation.command) {
case 'copy':
return `${result} ${state.operation.from.path} -> ${state.operation.to.path}`;
return `${result} ${state.operation.from.path} -> ${
state.operation.to.path
}`;
case 'replace':
return `${result} ${state.operation.file.path}, ${state.operation.copy} -> ${state.operation.replace}`;
return `${result} ${state.operation.file.path}, ${
state.operation.copy
} -> ${state.operation.replace}`;
case 'run-script':
return `${result} ${state.operation.script}`;
default:
Expand Down
4 changes: 3 additions & 1 deletion lib/utils/remote-build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,9 @@ function createRemoteBuildRequest(
if (response.statusCode >= 100 && response.statusCode < 400) {
if (DEBUG_MODE) {
console.log(
`[debug] received HTTP ${response.statusCode} ${response.statusMessage}`,
`[debug] received HTTP ${response.statusCode} ${
response.statusMessage
}`,
);
}
} else {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
"gulp-shell": "^0.5.2",
"mochainon": "^2.0.0",
"pkg": "~4.3.8",
"prettier": "^1.17.0",
"prettier": "1.17.0",
"publish-release": "^1.6.0",
"resin-lint": "^3.0.1",
"rewire": "^3.0.2",
Expand Down

0 comments on commit 8b5ebe0

Please sign in to comment.