1
0
mirror of https://github.com/142vip/408CSFamily.git synced 2026-11-29 23:45:43 +08:00

style: 格式化脚本

This commit is contained in:
chu fan
2023-09-07 11:16:20 +08:00
parent 8673a64409
commit eeed9d8cd7
8 changed files with 188 additions and 192 deletions

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env node
/**
*
* 格式化代码
@@ -7,13 +8,9 @@
* - ./scripts/lint --fix
*/
const { execShell } = require("./.exec");
const scriptName=process.argv[2];
const { execShell } = require('./.exec')
const scriptName = process.argv[2]
const fixed = scriptName != null ? '--fix' : '';
let fixed=''
if(scriptName!=null){
fixed='--fix'
}
;(async ()=>await execShell(`eslint ${fixed} --ext .js,.ts,.vue --ignore-path .gitignore .`))()
// 可以在--fix后指定目录
(async() => await execShell(`eslint ${fixed} --ext .js,.ts,.vue --ignore-path .gitignore .`))()