From 78fa56994abb5e9087406e9ed1a618e26a70859e Mon Sep 17 00:00:00 2001 From: Mihovil Ilakovac Date: Fri, 20 Sep 2024 14:57:06 +0200 Subject: [PATCH] Cleanup --- waspc/src/Wasp/ExternalConfig/TsConfig.hs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/waspc/src/Wasp/ExternalConfig/TsConfig.hs b/waspc/src/Wasp/ExternalConfig/TsConfig.hs index 13685a9339..19b1abe41a 100644 --- a/waspc/src/Wasp/ExternalConfig/TsConfig.hs +++ b/waspc/src/Wasp/ExternalConfig/TsConfig.hs @@ -46,7 +46,7 @@ data CompilerOptions = CompilerOptions instance FromJSON CompilerOptions where parseJSON = withObject "CompilerOptions" $ \v -> CompilerOptions - -- We couldn't use the Generic deriving for this because of the _ prefix in the field name. + -- We couldn't use the Generic deriving for this because of the _ prefix in the "module" field name. <$> v .:? "module" <*> v .:? "target" <*> v .:? "moduleResolution" @@ -62,7 +62,6 @@ analyzeTsConfigContent :: Path' Abs (Dir WaspProjectDir) -> IO (Either [CompileE analyzeTsConfigContent waspDir = runExceptT $ do tsConfigFile <- ExceptT findTsConfigOrError tsConfig <- ExceptT $ readTsConfigFile tsConfigFile - lift $ print tsConfig ExceptT $ validateTsConfig tsConfig where findTsConfigOrError = maybeToEither [fileNotFoundMessage] <$> findTsConfigFile waspDir @@ -127,5 +126,5 @@ validateRequiredField fieldName expectedValue maybeUserProvidedValue = case mayb then [invalidValueErrorMessage] else [] where - invalidValueErrorMessage = unwords ["Invalid value for the", show fieldName, "field in tsconfig.json file, expected:", showJs expectedValue ++ "."] + invalidValueErrorMessage = unwords ["Invalid value for the", show fieldName, "field in tsconfig.json file, expected value:", showJs expectedValue ++ "."] missingFieldErrorMessage = unwords ["The", show fieldName, "field is missing in tsconfig.json. Expected value:", showJs expectedValue ++ "."]