1
0
mirror of https://github.com/142vip/408CSFamily.git synced 2026-02-03 02:23:38 +08:00
Files
408CSFamily/scripts/lint
2023-09-07 11:16:20 +08:00

17 lines
370 B
JavaScript
Executable File

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