chore(cli): add exts constants

This commit is contained in:
陈嘉涵
2019-11-29 13:23:49 +08:00
parent 51d2512311
commit afc6113938
3 changed files with 12 additions and 4 deletions
+2 -1
View File
@@ -1,13 +1,14 @@
import { start, error, success } from 'signale';
import { lint as stylelint } from 'stylelint';
import { CLIEngine } from 'eslint';
import { SCRIPT_EXTS } from '../common/constant';
function lintScript() {
start('ESLint Start');
const cli = new CLIEngine({
fix: true,
extensions: ['.js', '.jsx', '.vue', '.ts', '.tsx']
extensions: SCRIPT_EXTS
});
const report = cli.executeOnFiles(['src/']);