From 7a82febe727c6281a81157e99d18b563ec5e776b Mon Sep 17 00:00:00 2001 From: Kristóf Marussy Date: Wed, 6 Oct 2021 02:02:33 +0200 Subject: ci(web): no typescript 4.4 features in Sonar See https://github.com/SonarSource/SonarJS/issues/2802 and https://community.sonarsource.com/t/sonarcloud-not-picking-up-typescript-files/50832 --- language-web/build.gradle | 2 ++ language-web/tsconfig.sonar.json | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 language-web/tsconfig.sonar.json (limited to 'language-web') diff --git a/language-web/build.gradle b/language-web/build.gradle index 526ba2da..15d743b9 100644 --- a/language-web/build.gradle +++ b/language-web/build.gradle @@ -145,4 +145,6 @@ sonarqube.properties { property 'sonar.nodejs.executable', "${nodeDirectory}/bin/node" property 'sonar.eslint.reportPaths', "${buildDir}/eslint.json" property 'sonar.css.stylelint.reportPaths', "${buildDir}/stylelint.json" + // SonarJS does not pick up typescript files with `exactOptionalPropertyTypes` + property 'sonar.typescript.tsconfigPath', 'tsconfig.sonar.json' } diff --git a/language-web/tsconfig.sonar.json b/language-web/tsconfig.sonar.json new file mode 100644 index 00000000..1cc74f23 --- /dev/null +++ b/language-web/tsconfig.sonar.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "target": "ES2020", + "module": "ES2020", + "moduleResolution": "node", + "paths": { + "xtext/*": ["./src/main/js/xtext/*"] + }, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "jsx": "react", + "strict": true, + "noImplicitOverride": true, + "noImplicitReturns": true, + "noEmit": true + }, + "include": ["./src/main/js/**/*"], + "exclude": ["./src/main/js/xtext/**/*"] +} -- cgit v1.2.3-70-g09d2