Skip to content

Commit

Permalink
Allow users to suppress the warnings about overridden tsconfig option…
Browse files Browse the repository at this point in the history
…s, with

bazelOptions {
  suppressTsconfigOverrideWarnings: true
}

This is useful in a big repository like angular/angular that has a bunch of existing warnings.

PiperOrigin-RevId: 185188845
  • Loading branch information
alexeagle committed Feb 9, 2018
1 parent 619e4bd commit 990321b
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@ export interface BazelOptions {
* The maximum cache size for bazel outputs, in megabytes.
*/
maxCacheSizeMb?: number;

/**
* Suppress warnings about tsconfig.json properties that are overridden.
*/
suppressTsconfigOverrideWarnings: boolean;
}

export interface ParsedTsConfig {
Expand Down Expand Up @@ -233,8 +238,13 @@ export function parseTsconfig(
if (userConfig.bazelOptions) {
bazelOpts.disableStrictDeps = bazelOpts.disableStrictDeps ||
userConfig.bazelOptions.disableStrictDeps;
bazelOpts.suppressTsconfigOverrideWarnings =
bazelOpts.suppressTsconfigOverrideWarnings ||
userConfig.bazelOptions.suppressTsconfigOverrideWarnings;
}
if (!bazelOpts.suppressTsconfigOverrideWarnings) {
warnOnOverriddenOptions(userConfig);
}
warnOnOverriddenOptions(userConfig);
}

const {options, errors, fileNames} =
Expand Down

0 comments on commit 990321b

Please sign in to comment.