TypeScript analysis fails to parse 'customConditions' within tsconfig (TypeScript v5)

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    ** SonarQube -
    ** SonarScanner - (I pull the latest Docker image when I run my analysis)
    ** TypeScript 5.1.3
  • how is SonarQube deployed: zip, Docker, Helm
    ** Docker
  • what are you trying to achieve
    ** Get coverage information for my tsx files
  • what have you tried so far to achieve this
    ** Coverage was working fine in my project until a recent change was added to our tsconfig.base.json which added
"customConditions": ["foo:tsx"],

After that we get failure of

08:06:53.969 ERROR: Error: Argument for '--moduleResolution' option must be: 'node', 'classic', 'node16', 'nodenext'.  /usr/src/tsconfig.base.json:316; Unknown compiler option 'customConditions'.  /usr/src/tsconfig.base.json:607

This then causes all the tsx files not to have their coverage scanned…

Hey there.

SonarQube v9.9 LTS maxes out its support for Typescript at v4.9.

SonarQube v10.1, scheduled for release this week, will support TypeScript 5 and its new compiler options.

Thanks Colin, I will keep an eye out for the upgrade and move us over to 10.1 once its released.