Skip to content

Commit f3dfad3

Browse files
Jonathan MeierthePunderWoman
authored andcommitted
refactor(compiler-cli): remove hardcoded config for unused standalone imports rule enablement (angular#61622)
The hardcoded config was introduced because suppressing the diagnostic via `extendedDiagnostics` in the TS config was unreliable in google3. This has since been fixed and the workaround is no longer needed. PR Close angular#61622
1 parent 32179fb commit f3dfad3

File tree

2 files changed

+7
-23
lines changed

2 files changed

+7
-23
lines changed

packages/compiler-cli/src/ngtsc/validation/src/config.ts

Lines changed: 0 additions & 13 deletions
This file was deleted.

packages/compiler-cli/src/ngtsc/validation/src/source_file_validator.ts

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import {SourceFileValidatorRule} from './rules/api';
1515
import {InitializerApiUsageRule} from './rules/initializer_api_usage_rule';
1616
import {UnusedStandaloneImportsRule} from './rules/unused_standalone_imports_rule';
1717
import {TemplateTypeChecker, TypeCheckingConfig} from '../../typecheck/api';
18-
import {UNUSED_STANDALONE_IMPORTS_RULE_ENABLED} from './config';
1918

2019
/**
2120
* Validates that TypeScript files match a specific set of rules set by the Angular compiler.
@@ -31,15 +30,13 @@ export class SourceFileValidator {
3130
) {
3231
this.rules = [new InitializerApiUsageRule(reflector, importedSymbolsTracker)];
3332

34-
if (UNUSED_STANDALONE_IMPORTS_RULE_ENABLED) {
35-
this.rules.push(
36-
new UnusedStandaloneImportsRule(
37-
templateTypeChecker,
38-
typeCheckingConfig,
39-
importedSymbolsTracker,
40-
),
41-
);
42-
}
33+
this.rules.push(
34+
new UnusedStandaloneImportsRule(
35+
templateTypeChecker,
36+
typeCheckingConfig,
37+
importedSymbolsTracker,
38+
),
39+
);
4340
}
4441

4542
/**

0 commit comments

Comments
 (0)