diff --git a/presentation-compiler/src/main/scala/org/alephium/ralph/lsp/pc/workspace/build/typescript/TSBuildTransformer.scala b/presentation-compiler/src/main/scala/org/alephium/ralph/lsp/pc/workspace/build/typescript/TSBuildTransformer.scala index 92ed5e05..d28da7b9 100644 --- a/presentation-compiler/src/main/scala/org/alephium/ralph/lsp/pc/workspace/build/typescript/TSBuildTransformer.scala +++ b/presentation-compiler/src/main/scala/org/alephium/ralph/lsp/pc/workspace/build/typescript/TSBuildTransformer.scala @@ -87,7 +87,8 @@ object TSBuildTransformer { ignoreUnusedFieldsWarnings = tsOptions.ignoreUnusedFieldsWarnings.getOrElse(ralphOptions.ignoreUnusedFieldsWarnings), ignoreUnusedPrivateFunctionsWarnings = tsOptions.ignoreUnusedPrivateFunctionsWarnings.getOrElse(ralphOptions.ignoreUnusedPrivateFunctionsWarnings), ignoreUpdateFieldsCheckWarnings = tsOptions.ignoreUpdateFieldsCheckWarnings.getOrElse(ralphOptions.ignoreUpdateFieldsCheckWarnings), - ignoreCheckExternalCallerWarnings = tsOptions.ignoreCheckExternalCallerWarnings.getOrElse(ralphOptions.ignoreCheckExternalCallerWarnings) + ignoreCheckExternalCallerWarnings = tsOptions.ignoreCheckExternalCallerWarnings.getOrElse(ralphOptions.ignoreCheckExternalCallerWarnings), + ignoreUnusedFunctionReturnWarnings = tsOptions.ignoreUnusedFunctionReturnWarnings.getOrElse(ralphOptions.ignoreUnusedFunctionReturnWarnings) ) /** @@ -115,6 +116,7 @@ object TSBuildTransformer { "ignoreUnusedPrivateFunctionsWarnings", "ignoreUpdateFieldsCheckWarnings", "ignoreCheckExternalCallerWarnings", + "ignoreUnusedFunctionReturnWarnings", "errorOnWarnings" ) @@ -188,6 +190,7 @@ object TSBuildTransformer { ignoreUnusedPrivateFunctionsWarnings = parseBooleanOption(optionsMap.get("ignoreUnusedPrivateFunctionsWarnings")), ignoreUpdateFieldsCheckWarnings = parseBooleanOption(optionsMap.get("ignoreUpdateFieldsCheckWarnings")), ignoreCheckExternalCallerWarnings = parseBooleanOption(optionsMap.get("ignoreCheckExternalCallerWarnings")), + ignoreUnusedFunctionReturnWarnings = parseBooleanOption(optionsMap.get("ignoreUnusedFunctionReturnWarnings")), errorOnWarnings = parseBooleanOption(optionsMap.get("errorOnWarnings")) ) } diff --git a/presentation-compiler/src/main/scala/org/alephium/ralph/lsp/pc/workspace/build/typescript/TSConfig.scala b/presentation-compiler/src/main/scala/org/alephium/ralph/lsp/pc/workspace/build/typescript/TSConfig.scala index 39920a51..d1524176 100644 --- a/presentation-compiler/src/main/scala/org/alephium/ralph/lsp/pc/workspace/build/typescript/TSConfig.scala +++ b/presentation-compiler/src/main/scala/org/alephium/ralph/lsp/pc/workspace/build/typescript/TSConfig.scala @@ -36,6 +36,7 @@ object TSConfig { ignoreUnusedPrivateFunctionsWarnings: Option[Boolean], ignoreUpdateFieldsCheckWarnings: Option[Boolean], ignoreCheckExternalCallerWarnings: Option[Boolean], + ignoreUnusedFunctionReturnWarnings: Option[Boolean], errorOnWarnings: Option[Boolean] = None) object CompilerOptions { diff --git a/presentation-compiler/src/test/scala/org/alephium/ralph/lsp/pc/workspace/build/typescript/TestTSBuildFile.scala b/presentation-compiler/src/test/scala/org/alephium/ralph/lsp/pc/workspace/build/typescript/TestTSBuildFile.scala index 2496c6dc..d8fbbd0b 100644 --- a/presentation-compiler/src/test/scala/org/alephium/ralph/lsp/pc/workspace/build/typescript/TestTSBuildFile.scala +++ b/presentation-compiler/src/test/scala/org/alephium/ralph/lsp/pc/workspace/build/typescript/TestTSBuildFile.scala @@ -29,6 +29,7 @@ object TestTSBuildFile { ignoreUnusedPrivateFunctionsWarnings <- Gen.option(arbitrary[Boolean]) ignoreUpdateFieldsCheckWarnings <- Gen.option(arbitrary[Boolean]) ignoreCheckExternalCallerWarnings <- Gen.option(arbitrary[Boolean]) + ignoreUnusedFunctionReturnWarnings <- Gen.option(arbitrary[Boolean]) errorOnWarnings <- Gen.option(arbitrary[Boolean]) } yield TSConfig.CompilerOptions( ignoreUnusedConstantsWarnings, @@ -37,6 +38,7 @@ object TestTSBuildFile { ignoreUnusedPrivateFunctionsWarnings, ignoreUpdateFieldsCheckWarnings, ignoreCheckExternalCallerWarnings, + ignoreUnusedFunctionReturnWarnings, errorOnWarnings ) @@ -78,6 +80,7 @@ object TestTSBuildFile { | ${printOption("ignoreUnusedPrivateFunctionsWarnings", compilerOptions.ignoreUnusedPrivateFunctionsWarnings)} | ${printOption("ignoreUpdateFieldsCheckWarnings", compilerOptions.ignoreUpdateFieldsCheckWarnings)} | ${printOption("ignoreCheckExternalCallerWarnings", compilerOptions.ignoreCheckExternalCallerWarnings)} + | ${printOption("ignoreUnusedFunctionReturnWarnings", compilerOptions.ignoreUnusedFunctionReturnWarnings)} | ${printOption("errorOnWarnings", compilerOptions.errorOnWarnings)} |}""".stripMargin }