2016-09-19 3 views
1

내 작업 흐름에 tslint를 추가하고 싶습니다. 나는 통해 설치 :tslint를 사용할 때 * .d.ts 파일을 무시하는 방법?

npm install tslint tslint-config-ms-recommended --save-dev 

그리고 내 tslint.json은 다음과 같습니다 제가 실행하지만 때

{ 
    "extends": "tslint-config-ms-recommended" 
} 

:

./node_modules/.bin/tslint src/**/*.ts 

그것도 확실히 입력 한 많은 파일을 확인, 예를 들면 :

src/interfaces/highland.d.ts[621, 1]: space indentation expected 
src/interfaces/highland.d.ts[622, 1]: space indentation expected 
src/interfaces/highland.d.ts[635, 1]: space indentation expected 

출력.

*.ts 개의 파일 만 확인하고 다른 유형은 무시하는 방법을 찾고 있습니다.

나는 거기 --exclude 옵션이었다, 그러나 아직도 내가 실행할 때 d.ts 파일을 보여줍니다 보았다 :

./node_modules/.bin/tslint src/**/*.ts --exclude src/**/*.d.ts 
+0

http://stackoverflow.com/questions/34578677/how-to-ignore-a-particular-directory-or-file-for-tslint – k0pernikus

답변

5

(가) 옵션을 제외 중 하나 그러므로 =, 필요

tslint src/**/*.ts --exclude=src/**/*.d.ts 

을 또는 무시 부분을 따옴표로 묶는 방법 :

tslint src/**/*.ts --exclude "src/**/*.d.ts" 

cted.

+0

또 다른 옵션은 다음 정규 표현식을 사용하는 것입니다 :'src/**/* [^. d $]. ts' – fxlemire

관련 문제