Skip to content
This repository was archived by the owner on Feb 25, 2024. It is now read-only.

Commit 0c246d0

Browse files
committed
Use sane-fmt to fix code style
1 parent 51cbc81 commit 0c246d0

File tree

5 files changed

+9
-11
lines changed

5 files changed

+9
-11
lines changed

tools/create-new-folder/lib/index.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,7 @@ export async function newPackage(name: string) {
159159
homepage,
160160
repository,
161161
bugs,
162-
keywords: keywords
163-
? String(keywords).split(' ').filter(Boolean)
164-
: undefined,
162+
keywords: keywords ? String(keywords).split(' ').filter(Boolean) : undefined,
165163
main: 'index.js',
166164
module: 'index.mjs',
167165
browser: 'index.mjs',

tools/make-mjs/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
'use strict'
22
module.exports = {
3-
bin: require.resolve(__dirname, './bin.js')
3+
bin: require.resolve(__dirname, './bin.js'),
44
}

tools/make-mjs/main.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const proceed = require('@make-mjs/main').main
55
const { DEFAULT_PARSER_OPTIONS } = require('@make-mjs/code')
66
const places = require('@tools/places')
77

8-
async function main () {
8+
async function main() {
99
const IGNORED_DIRECTORIES = ['.git', 'node_modules']
1010

1111
const knownMjsPackagesPromises = (
@@ -26,8 +26,8 @@ async function main () {
2626
filter: param => param.base.endsWith('.js'),
2727
codeTransformOptions: {
2828
parserOptions: DEFAULT_PARSER_OPTIONS,
29-
isMjsPackage: param => knownMjsPackages.includes(param.packageName)
30-
}
29+
isMjsPackage: param => knownMjsPackages.includes(param.packageName),
30+
},
3131
})
3232

3333
// iterate events to execute actions
@@ -40,5 +40,5 @@ main().then(
4040
error => {
4141
console.error(error)
4242
process.exit(1)
43-
}
43+
},
4444
)

tools/scripts/bin/main.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ abstract class Dict {
172172
args => {
173173
this.callCmd('buildTypescript', '--module', 'ES2015')
174174
this.callCmd('makeMJS', ...args)
175-
}
175+
},
176176
)
177177

178178
public readonly buildTypescript = new Command(
@@ -207,7 +207,7 @@ abstract class Dict {
207207

208208
public readonly makeMJS = new Command(
209209
'Change extension of all output *.js files to *.mjs',
210-
this.mkspawn(commands.makeMJS)
210+
this.mkspawn(commands.makeMJS),
211211
)
212212

213213
public readonly cleanDocs = new Command(

tools/traverse/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@ const jsExt = ['.js', '.mjs'] as const
3434

3535
export const jsFiles = pipeline(
3636
files,
37-
asyncFilter(item => jsExt.some(ext => item.basename.endsWith(ext)))
37+
asyncFilter(item => jsExt.some(ext => item.basename.endsWith(ext))),
3838
)

0 commit comments

Comments
 (0)