mirror of
https://github.com/142vip/408CSFamily.git
synced 2026-11-29 23:45:43 +08:00
style: 格式化脚本
This commit is contained in:
15
scripts/lint
15
scripts/lint
@@ -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 .`))()
|
||||
|
||||
Reference in New Issue
Block a user