Skip to content
This repository has been archived by the owner on Feb 23, 2022. It is now read-only.

Commit

Permalink
Use sane-fmt to fix code style
Browse files Browse the repository at this point in the history
  • Loading branch information
KSXGitHub committed Aug 1, 2020
1 parent 51cbc81 commit 0c246d0
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 11 deletions.
4 changes: 1 addition & 3 deletions tools/create-new-folder/lib/index.ts
Expand Up @@ -159,9 +159,7 @@ export async function newPackage(name: string) {
homepage,
repository,
bugs,
keywords: keywords
? String(keywords).split(' ').filter(Boolean)
: undefined,
keywords: keywords ? String(keywords).split(' ').filter(Boolean) : undefined,
main: 'index.js',
module: 'index.mjs',
browser: 'index.mjs',
Expand Down
2 changes: 1 addition & 1 deletion tools/make-mjs/index.js
@@ -1,4 +1,4 @@
'use strict'
module.exports = {
bin: require.resolve(__dirname, './bin.js')
bin: require.resolve(__dirname, './bin.js'),
}
8 changes: 4 additions & 4 deletions tools/make-mjs/main.js
Expand Up @@ -5,7 +5,7 @@ const proceed = require('@make-mjs/main').main
const { DEFAULT_PARSER_OPTIONS } = require('@make-mjs/code')
const places = require('@tools/places')

async function main () {
async function main() {
const IGNORED_DIRECTORIES = ['.git', 'node_modules']

const knownMjsPackagesPromises = (
Expand All @@ -26,8 +26,8 @@ async function main () {
filter: param => param.base.endsWith('.js'),
codeTransformOptions: {
parserOptions: DEFAULT_PARSER_OPTIONS,
isMjsPackage: param => knownMjsPackages.includes(param.packageName)
}
isMjsPackage: param => knownMjsPackages.includes(param.packageName),
},
})

// iterate events to execute actions
Expand All @@ -40,5 +40,5 @@ main().then(
error => {
console.error(error)
process.exit(1)
}
},
)
4 changes: 2 additions & 2 deletions tools/scripts/bin/main.ts
Expand Up @@ -172,7 +172,7 @@ abstract class Dict {
args => {
this.callCmd('buildTypescript', '--module', 'ES2015')
this.callCmd('makeMJS', ...args)
}
},
)

public readonly buildTypescript = new Command(
Expand Down Expand Up @@ -207,7 +207,7 @@ abstract class Dict {

public readonly makeMJS = new Command(
'Change extension of all output *.js files to *.mjs',
this.mkspawn(commands.makeMJS)
this.mkspawn(commands.makeMJS),
)

public readonly cleanDocs = new Command(
Expand Down
2 changes: 1 addition & 1 deletion tools/traverse/index.ts
Expand Up @@ -34,5 +34,5 @@ const jsExt = ['.js', '.mjs'] as const

export const jsFiles = pipeline(
files,
asyncFilter(item => jsExt.some(ext => item.basename.endsWith(ext)))
asyncFilter(item => jsExt.some(ext => item.basename.endsWith(ext))),
)

0 comments on commit 0c246d0

Please sign in to comment.