mirror of
https://github.com/ezolenko/rollup-plugin-typescript2.git
synced 2025-12-08 19:06:16 +00:00
fix: set noErrors to false when there are compilerOptions errors (#342)
- previously, while errors would be printed, the flag for `noErrors` was
not set to `false`, and so there would be no yellow warning about
errors
- this is mostly just fixing asymmetric UX, but personally, I actually
have missed this error before myself, so maybe this will help
alleviate that
This commit is contained in:
parent
d8a8e42dc2
commit
b1e3b44df1
@ -78,7 +78,6 @@ const typescript: PluginImpl<RPT2Options> = (options) =>
|
||||
if (!pluginOptions.typescript) {
|
||||
pluginOptions.typescript = require("typescript");
|
||||
}
|
||||
|
||||
setTypescriptModule(pluginOptions.typescript);
|
||||
|
||||
const self: Plugin & { _ongenerate: () => void, _onwrite: (this: PluginContext, _output: OutputOptions) => void } = {
|
||||
@ -122,8 +121,12 @@ const typescript: PluginImpl<RPT2Options> = (options) =>
|
||||
servicesHost.setLanguageService(service);
|
||||
|
||||
// printing compiler option errors
|
||||
if (pluginOptions.check)
|
||||
printDiagnostics(context, convertDiagnostic("options", service.getCompilerOptionsDiagnostics()), parsedConfig.options.pretty === true);
|
||||
if (pluginOptions.check) {
|
||||
const diagnostics = convertDiagnostic("options", service.getCompilerOptionsDiagnostics());
|
||||
printDiagnostics(context, diagnostics, parsedConfig.options.pretty === true);
|
||||
if (diagnostics.length > 0)
|
||||
noErrors = false;
|
||||
}
|
||||
|
||||
if (pluginOptions.clean)
|
||||
cache().clean();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user