tslint ignores tsconfig.json extends property #2673
Comments
I can't reproduce the error with the provided examples. I submitted PR #2688 to make sure it works and wont regress. |
@diegovilar I don't know if I misread your opening post or if you edited the relevant parts. Some research revealed that typescript has a problem with relative paths. Still investigating if this should be fixed in tslint or typescript... |
@ajafff What I edited was minor, don't think that changed anything in your understanding.. That's probably on my bad English :P Anyways, I'm glad you're looking into it. I'll have some spare time tomorrow and will be looking into this too. Without looking at TSLint implementation, I just assumed that the inclusions defined in |
After some debugging, there seems to be no easy fix in typescript AFAICT. The quick fix would be adding |
@diegovilar I changed #2688 to fix this problem by using absolute paths. That PR was already merged. |
I'm still getting this problem in tslint version |
Bug Report
TypeScript code being linted
test/test.ts
tslint.json
tsconfig.json
test/tsconfig.json
Actual behavior
Expected behavior
Details
All tsconfig.json and tslint.json have been simplified above.
My use case is that I have a base tsconfig.json file for my project, which is extended by
src/tsconfig.json
andtest/tsconfig.json
(they set different compiler options and exclusions), and I want to be able to lint both directories separately using their respectivetsconfig.json
as input, but it seems that TSLint doesn't parsetest/tsconfig.json
as TypeScript does. It doesn't seem to honor itsextends
property.If I run
tslint -p tsconfig.json -c tslint.json
, it lints test/test.ts as expected, sincetsconfig.json
includestest/**/*.ts
, but also lints all TS files insrc
, which is not the desired behavior. Among other things, that's whattest/tsconfig.json
prevents by extendingtsconfig.json
and excluding../src
.The text was updated successfully, but these errors were encountered: