fix: ignore eslintrc in test-case

因为 test-case 中的 eslintrc 文件会被 xima 读取导致 commit hook 不通过。所以去掉了其内容,并在 run test 时配置 diff 方法不比较该文件。

Link: https://code.aone.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/codereview/3772464

* fix: ignore eslintrc in test-case
This commit is contained in:
armslave.yy 2020-09-22 14:16:43 +08:00 committed by wuji.xwt
parent ac72d71339
commit c0ef4bcbbe

View File

@ -62,7 +62,7 @@ function runPrettierSync(files: string[], cwd: string) {
}
function diffActualAndExpectedSync(caseFullDir: string): string {
const res = spawnSync('diff', ['-wBur', 'expected', 'actual'], {
const res = spawnSync('diff', ['-wBur', '-x', '.eslintrc.js', 'expected', 'actual'], {
cwd: caseFullDir,
stdio: 'pipe',
shell: true,