在几行上批量tslint

问题描述 投票:0回答:1

我启动了一个包含tslint命令的批处理

tslint -c ../tslint.json --project tsconfig.json --out output.txt --format msbuild -e '**/bin/Debug/**' -e '**/fonts/**' -e '**/images/**' -e '**/Scripts/**' -e '**/typings/**' -e 'file1.ts' -e 'file2.ts' -e 'file3.ts' -e 'file3.ts' -e 'file4.ts'  
…

不幸的是,我想要排除很多文件并且它不容易阅读,所以我想阅读相同的文件,但有可能去该行并在该表单上写一些东西:

    tslint -c ../tslint.json --project tsconfig.json --out output.txt --format msbuild 
-e '**/bin/Debug/**' 
-e '**/fonts/**' 
-e '**/images/**' 
-e '**/Scripts/**' 
-e '**/typings/**' 
-e 'file1.ts' 
-e 'file2.ts' 
-e 'file3.ts' 
-e 'file3.ts' 
-e 'file4.ts' 

你知道怎么做吗?

batch-processing jslint tslint
1个回答
1
投票

这是我的评论作为答案。

您可以尝试使用插入符号^转义行返回,包括每个前面的空格:

tslint --config ../tslint.json --project tsconfig.json --out output.txt --format msbuild ^
--exclude '**/bin/Debug/**' ^
--exclude '**/fonts/**' ^
--exclude '**/images/**' ^
--exclude '**/Scripts/**' ^
--exclude '**/typings/**' ^
--exclude 'file1.ts' ^ 
--exclude 'file2.ts' ^
--exclude 'file3.ts' ^
--exclude 'file4.ts'

或者,用空格开始单独的行,并用插入符号^完成每个前进行:

tslint -c ../tslint.json -p tsconfig.json -o output.txt -f msbuild^
 -e '**/bin/Debug/**'^
 -e '**/fonts/**'^
 -e '**/images/**'^
 -e '**/Scripts/**'^
 -e '**/typings/**'^
 -e 'file1.ts'^
 -e 'file2.ts'^
 -e 'file3.ts'^
 -e 'file3.ts'^
 -e 'file4.ts'

因为tslint不太可能存在多个空格,所以你甚至可以试试这个:

tslint -c ../tslint.json^
       -p tsconfig.json^
       -o output.txt^
       -f msbuild^
       -e '**/bin/Debug/**'^
       -e '**/fonts/**'^
       -e '**/images/**'^
       -e '**/Scripts/**'^
       -e '**/typings/**'^
       -e 'file1.ts'^
       -e 'file2.ts'^
       -e 'file3.ts'^
       -e 'file4.ts'
© www.soinside.com 2019 - 2024. All rights reserved.