Skip to content

Commit f936fa7

Browse files
committed
style: format files touched by the ignore-comments cleanup
1 parent dfb2370 commit f936fa7

4 files changed

Lines changed: 15 additions & 23 deletions

File tree

lib/fs.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,7 @@ export function mkdirp(path: string): void {
104104
* @param {string} path - path to file to create
105105
* @param {string} [content] - file contents to put in
106106
*/
107-
export function touch(
108-
path: string,
109-
content: string = '',
110-
): void {
107+
export function touch(path: string, content: string = ''): void {
111108
if (!fs.existsSync(path)) {
112109
mkdirp(p.dirname(path));
113110
fs.writeFileSync(path, content);

lib/github.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,7 @@ export async function createRepository(
166166
description: string,
167167
isPrivate: boolean = true,
168168
) {
169-
const [owner, repo] = (
170-
url.split(':').reverse().shift() || ''
171-
).split('/');
169+
const [owner, repo] = (url.split(':').reverse().shift() || '').split('/');
172170

173171
if (!(repo && owner)) {
174172
throw new TypeError(`Given github url "${url}" is invalid!`);

lib/node.ts

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -113,13 +113,12 @@ export async function getNodeVersions(
113113
throw new Error(`Failed to fetch node versions: HTTP ${res.status}`);
114114
}
115115

116-
nodeVersions = (
117-
((await res.json()) as NodeVersion[]) || []
118-
).sort((a: NodeVersion, b: NodeVersion) =>
119-
semverCompare(
120-
a.version.replace(RX_VERSION_CLEAN, ''),
121-
b.version.replace(RX_VERSION_CLEAN, ''),
122-
),
116+
nodeVersions = (((await res.json()) as NodeVersion[]) || []).sort(
117+
(a: NodeVersion, b: NodeVersion) =>
118+
semverCompare(
119+
a.version.replace(RX_VERSION_CLEAN, ''),
120+
b.version.replace(RX_VERSION_CLEAN, ''),
121+
),
123122
);
124123

125124
return nodeVersions;
@@ -137,19 +136,17 @@ export async function nodeVersion(tag: string) {
137136
switch (tag) {
138137
case 'node':
139138
case 'latest': {
140-
return (
141-
(
142-
(versions || [])[0] || <any>{}
143-
).version || ''
144-
).replace(RX_VERSION_CLEAN, '');
139+
return (((versions || [])[0] || <any>{}).version || '').replace(
140+
RX_VERSION_CLEAN,
141+
'',
142+
);
145143
}
146144
case 'stable':
147145
case 'lts':
148146
case 'lts/*': {
149147
return (
150-
(
151-
versions.find(version => !!version.lts) || <any>{}
152-
).version || ''
148+
(versions.find(version => !!version.lts) || <any>{}).version ||
149+
''
153150
).replace(RX_VERSION_CLEAN, '');
154151
}
155152
default: {

lib/travis.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ export async function travisEncrypt(
182182
): Promise<string> {
183183
const travis = new TravisClient({ pro: !!github_token });
184184

185-
if (github_token) {
185+
if (github_token) {
186186
await travis.authenticate({ github_token });
187187
}
188188

0 commit comments

Comments
 (0)