SonarQube works with solution-style tsconfig with this setting in sonar-project.properties:
sonar.typescript.tsconfigPath=tsconfig.lint.json
You need to point into a tsconfig which includes the src folder (or whatever directory with the code):
For instance, I’m reusing the same one that I have for Eslint:
{
"extends": "./tsconfig.base.json",
"compilerOptions": {
"noEmit": true
},
"include": ["src"]
}
The issue now is located at SonarLint, it tries to read tsconfig.json and because it does not contain anything it skips all the files and the errors are not displayed in the IDE:
[Info - 11:26:36.639] Found 1 tsconfig.json file(s): [/Users/gllamas/projects/recall2-POC-starter/tsconfig.json]
[Debug - 11:26:36.698] /Users/gllamas/projects/recall2-POC-starter/src/app/app.component.ts matched NO_CONFIG
[Info - 11:26:36.699] 1 source files to be analyzed
[Info - 11:26:36.699] Skipping 1 files with no tsconfig.json
[Debug - 11:26:36.700] Skipped files: [uri=file:///Users/gllamas/projects/recall2-POC-starter/src/app/app.component.ts]
If we had a property for specifying the tsconfig path it would be solved.