MCPcopy Create free account
hub / github.com/angular/components / constructor

Method constructor

tools/tslint-rules/validateDecoratorsRule.ts:69–79  ·  view source on GitHub ↗
(sourceFile: ts.SourceFile, options: Lint.IOptions)

Source from the content-addressed store, hash-verified

67 private _rules: DecoratorRules;
68
69 constructor(sourceFile: ts.SourceFile, options: Lint.IOptions) {
70 super(sourceFile, options);
71
72 // Globs that are used to determine which files to exclude from linting.
73 const fileGlobs: string[] = options.ruleArguments[1] || [];
74
75 this._rules = this._generateRules(options.ruleArguments[0], sourceFile.fileName);
76 this._enabled =
77 Object.keys(this._rules).length > 0 &&
78 !fileGlobs.some(p => minimatch(sourceFile.fileName, p));
79 }
80
81 override visitClassDeclaration(node: ts.ClassDeclaration) {
82 if (this._enabled) {

Callers

nothing calls this directly

Calls 1

_generateRulesMethod · 0.95

Tested by

no test coverage detected