@angular-modernizer/plugin-solid 1.2.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,30 +3,39 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.OCPViolationRule = void 0;
4
4
  const ts_morph_1 = require("ts-morph");
5
5
  /**
6
- * OCP Violation Rule (`solid:ocp-violation`) - detects code that has to be
7
- * modified for new features (Open/Closed Principle violation).
6
+ * OCP Violation Rule (`solid:ocp-violation`) - reports if-else chains that
7
+ * dispatch on one value, so every new value means editing the chain.
8
8
  *
9
- * Detection patterns in class methods (`violationType` in the metadata):
10
- * - `large-switch-statement`: switch statements with more than 5 cases
11
- * - `long-if-else-chain`: if/else chains with more than 4 branches
12
- * - `too-many-parameters`: methods with more than 4 parameters
9
+ * One finding per chain (`violationType: 'long-if-else-chain'`, severity
10
+ * warning, at the first `if`) when the chain has more than 4 conditions
11
+ * (the `if` plus its `else if` links; a final plain `else` is not counted)
12
+ * and every condition compares the same discriminant with `===` or `==`,
13
+ * also as `a === x || a === y`. The discriminant is a variable, parameter,
14
+ * property access chain (`this.state.kind`) or element access with a
15
+ * reference or literal key (`values[key]`); two references are the same
16
+ * when they resolve to the same symbols and keys, names alone do not match.
17
+ *
18
+ * Chains are checked everywhere in the file: methods, constructors, nested
19
+ * classes and functions outside classes. Switch statements are reported by
20
+ * `solid:god-switch`, parameter counts by no SOLID rule.
13
21
  *
14
22
  * @example
15
23
  * ```typescript
16
- * // Violation: requires modification for each new shape type
17
- * function createShape(type: string) {
18
- * switch (type) {
19
- * case 'circle': return new Circle();
20
- * case 'square': return new Square();
21
- * // Every new shape requires editing this function
22
- * }
24
+ * // Reported: 5 conditions on `kind`
25
+ * function area(kind: string): number {
26
+ * if (kind === 'circle') return 1;
27
+ * else if (kind === 'square') return 2;
28
+ * else if (kind === 'triangle') return 3;
29
+ * else if (kind === 'hexagon') return 4;
30
+ * else if (kind === 'star') return 5;
31
+ * return 0;
23
32
  * }
24
33
  * ```
25
34
  */
26
35
  class OCPViolationRule {
27
36
  id = 'solid:ocp-violation';
28
37
  name = 'Open/Closed Principle Violation';
29
- description = 'Detects code that violates the Open/Closed Principle';
38
+ description = 'Detects if-else chains that compare one discriminant in more than 4 conditions (Open/Closed Principle)';
30
39
  severity = 'warning';
31
40
  category = 'solid-violation';
32
41
  tags = [
@@ -36,159 +45,232 @@ class OCPViolationRule {
36
45
  'extensibility',
37
46
  'architecture',
38
47
  ];
39
- /**
40
- * Maximum number of switch cases allowed.
41
- */
42
- maxSwitchCases = 5;
43
- /**
44
- * Maximum number of if-else conditions in a chain.
45
- */
46
- maxIfElseChain = 4;
47
- /**
48
- * Maximum number of parameters allowed in a method.
49
- */
50
- maxMethodParameters = 4;
48
+ /** Conditions a chain may have before it is reported. */
49
+ maxConditions = 4;
51
50
  async analyze(context) {
52
- const violations = [];
53
51
  const sourceFile = context.sourceFile;
54
- // Find all class declarations
55
- const classDeclarations = sourceFile.getDescendantsOfKind(ts_morph_1.SyntaxKind.ClassDeclaration);
56
- for (const classDecl of classDeclarations) {
57
- const classViolations = this.analyzeClass(classDecl, sourceFile.getFilePath());
58
- violations.push(...classViolations);
59
- }
60
- return Promise.resolve(violations);
52
+ const filePath = sourceFile.getFilePath();
53
+ const symbolIds = new Map();
54
+ const results = sourceFile
55
+ .getDescendantsOfKind(ts_morph_1.SyntaxKind.IfStatement)
56
+ .filter((ifStmt) => !this.isElseIfLink(ifStmt))
57
+ .flatMap((ifStmt) => this.checkChain(ifStmt, filePath, symbolIds));
58
+ return Promise.resolve(results);
61
59
  }
62
- /**
63
- * Analyze a class for OCP violations.
64
- */
65
- analyzeClass(classDecl, filePath) {
66
- const violations = [];
67
- const className = classDecl.getName() ?? 'AnonymousClass';
68
- try {
69
- // Check methods for OCP violations
70
- const methods = classDecl.getMethods();
71
- for (const method of methods) {
72
- const methodViolations = this.analyzeMethod(method, className, filePath);
73
- violations.push(...methodViolations);
74
- }
75
- // Check for switch statements in the class
76
- const switchStatements = classDecl.getDescendantsOfKind(ts_morph_1.SyntaxKind.SwitchStatement);
77
- for (const switchStmt of switchStatements) {
78
- const violation = this.analyzeSwitchStatement(switchStmt, className, filePath);
79
- if (violation !== null) {
80
- violations.push(violation);
81
- }
82
- }
83
- // Check for long if-else chains (only analyze top-level if statements)
84
- const ifStatements = classDecl.getDescendantsOfKind(ts_morph_1.SyntaxKind.IfStatement);
85
- for (const ifStmt of ifStatements) {
86
- // Only analyze if statements that are not part of an else-if chain
87
- const parent = ifStmt.getParent();
88
- if (parent.getKind() === ts_morph_1.SyntaxKind.IfStatement) {
89
- continue; // Skip else-if statements, they are analyzed as part of the chain
90
- }
91
- const violation = this.analyzeIfElseChain(ifStmt, className, filePath);
92
- if (violation !== null) {
93
- violations.push(violation);
94
- }
95
- }
60
+ /** True when the `if` is the `else` branch of another `if`. */
61
+ isElseIfLink(ifStmt) {
62
+ const parent = ifStmt.getParent();
63
+ return (ts_morph_1.Node.isIfStatement(parent) && parent.getElseStatement() === ifStmt);
64
+ }
65
+ checkChain(first, filePath, symbolIds) {
66
+ const conditions = this.chainConditions(first);
67
+ if (conditions.length <= this.maxConditions) {
68
+ return [];
96
69
  }
97
- catch (_error) {
98
- // If we can't analyze the class, skip it
70
+ const discriminant = this.commonDiscriminant(conditions, symbolIds);
71
+ if (discriminant === undefined) {
72
+ return [];
99
73
  }
100
- return violations;
101
- }
102
- /**
103
- * Analyze a method for OCP violations.
104
- */
105
- analyzeMethod(method, className, filePath) {
106
- const violations = [];
107
- const methodName = method.getName();
108
- // Check 1: Too many parameters
109
- const parameters = method.getParameters();
110
- if (parameters.length > this.maxMethodParameters) {
111
- violations.push({
74
+ const owner = this.chainOwner(first);
75
+ const discriminantText = discriminant.node.getText();
76
+ const conditionCount = conditions.length;
77
+ return [
78
+ {
112
79
  ruleId: this.id,
113
- message: `Method '${methodName}' in class '${className}' has ${parameters.length} parameters, exceeding the recommended maximum of ${this.maxMethodParameters}. Consider using a parameter object or splitting the method.`,
80
+ severity: 'warning',
81
+ message: `If-else chain in '${owner.functionName}' compares '${discriminantText}' in ${conditionCount} conditions (threshold: ${this.maxConditions}). Consider a lookup map or polymorphism.`,
114
82
  filePath,
115
- line: method.getStartLineNumber(),
116
- column: method.getStart() - method.getStartLinePos(),
117
- suggestedFix: `Refactor '${methodName}' to use a parameter object or reduce the number of parameters.`,
83
+ line: first.getStartLineNumber(),
84
+ column: first.getStart() - first.getStartLinePos(),
85
+ suggestedFix: `Replace the chain on '${discriminantText}' with a lookup map, or with polymorphism when the branches carry behavior.`,
118
86
  metadata: {
119
- className,
120
- methodName,
121
- parameterCount: parameters.length,
122
- maxAllowed: this.maxMethodParameters,
123
- violationType: 'too-many-parameters',
87
+ functionName: owner.functionName,
88
+ ...(owner.className === undefined
89
+ ? {}
90
+ : { className: owner.className }),
91
+ discriminant: discriminantText,
92
+ conditionCount,
93
+ maxConditions: this.maxConditions,
94
+ violationType: 'long-if-else-chain',
124
95
  principle: 'OCP',
125
96
  },
126
- });
97
+ },
98
+ ];
99
+ }
100
+ /** Conditions of the `if` and of its `else if` links, in order. */
101
+ chainConditions(first) {
102
+ const conditions = [];
103
+ let current = first;
104
+ while (current !== undefined) {
105
+ conditions.push(current.getExpression());
106
+ const elseStmt = current.getElseStatement();
107
+ current = ts_morph_1.Node.isIfStatement(elseStmt) ? elseStmt : undefined;
127
108
  }
128
- return violations;
109
+ return conditions;
129
110
  }
130
111
  /**
131
- * Analyze a switch statement for OCP violations.
112
+ * The reference every comparison of every condition shares, or
113
+ * `undefined` when a condition is no equality comparison or no reference
114
+ * is shared.
132
115
  */
133
- analyzeSwitchStatement(switchStmt, className, filePath) {
134
- const cases = switchStmt.getClauses();
135
- if (cases.length > this.maxSwitchCases) {
136
- return {
137
- ruleId: this.id,
138
- message: `Switch statement in class '${className}' has ${cases.length} cases, exceeding the recommended maximum of ${this.maxSwitchCases}. Consider using polymorphism or a strategy pattern.`,
139
- filePath,
140
- line: switchStmt.getStartLineNumber(),
141
- column: switchStmt.getStart() - switchStmt.getStartLinePos(),
142
- suggestedFix: `Replace switch statement with polymorphism or strategy pattern to make the code open for extension.`,
143
- metadata: {
144
- className,
145
- caseCount: cases.length,
146
- maxAllowed: this.maxSwitchCases,
147
- violationType: 'large-switch-statement',
148
- principle: 'OCP',
149
- },
150
- };
116
+ commonDiscriminant(conditions, symbolIds) {
117
+ let common;
118
+ for (const condition of conditions) {
119
+ const comparisons = this.comparisons(condition);
120
+ if (comparisons === undefined) {
121
+ return undefined;
122
+ }
123
+ for (const [left, right] of comparisons) {
124
+ const operands = [left, right]
125
+ .map((operand) => this.reference(operand, symbolIds))
126
+ .filter((ref) => ref !== undefined);
127
+ common =
128
+ common === undefined
129
+ ? operands
130
+ : common.filter((ref) => operands.some((operand) => operand.key === ref.key));
131
+ if (common.length === 0) {
132
+ return undefined;
133
+ }
134
+ }
151
135
  }
152
- return null;
136
+ return common?.[0];
153
137
  }
154
138
  /**
155
- * Analyze if-else chains for OCP violations.
139
+ * Operand pairs of `===`/`==` comparisons joined by `||`, or `undefined`
140
+ * when the condition has another shape.
156
141
  */
157
- analyzeIfElseChain(ifStmt, className, filePath) {
158
- let chainLength = 1; // Count the initial if
159
- let currentStmt = ifStmt;
160
- // Count the else-if and else statements in the chain
161
- while (currentStmt) {
162
- const elseStmt = currentStmt.getElseStatement();
163
- if (elseStmt && elseStmt.getKind() === ts_morph_1.SyntaxKind.IfStatement) {
164
- chainLength++;
165
- currentStmt = elseStmt.asKind(ts_morph_1.SyntaxKind.IfStatement);
142
+ comparisons(condition) {
143
+ const expr = this.unwrap(condition);
144
+ if (!ts_morph_1.Node.isBinaryExpression(expr)) {
145
+ return undefined;
146
+ }
147
+ const operator = expr.getOperatorToken().getKind();
148
+ if (operator === ts_morph_1.SyntaxKind.BarBarToken) {
149
+ const left = this.comparisons(expr.getLeft());
150
+ const right = this.comparisons(expr.getRight());
151
+ return left === undefined || right === undefined
152
+ ? undefined
153
+ : [...left, ...right];
154
+ }
155
+ const isEquality = operator === ts_morph_1.SyntaxKind.EqualsEqualsEqualsToken ||
156
+ operator === ts_morph_1.SyntaxKind.EqualsEqualsToken;
157
+ return isEquality ? [[expr.getLeft(), expr.getRight()]] : undefined;
158
+ }
159
+ /**
160
+ * Canonical key of a variable, parameter, property access chain or element
161
+ * access, built from symbols (`this` for a `this` root; the property name
162
+ * only when the receiver has no type information). `undefined` for
163
+ * anything else.
164
+ */
165
+ reference(operand, symbolIds) {
166
+ const node = this.unwrap(operand);
167
+ const key = this.referenceKey(node, symbolIds);
168
+ return key === undefined ? undefined : { key, node };
169
+ }
170
+ referenceKey(node, symbolIds) {
171
+ if (node.getKind() === ts_morph_1.SyntaxKind.ThisKeyword) {
172
+ return 'this';
173
+ }
174
+ if (ts_morph_1.Node.isIdentifier(node)) {
175
+ const symbol = node.getSymbol();
176
+ return symbol === undefined
177
+ ? undefined
178
+ : `s${this.symbolId(symbol, symbolIds)}`;
179
+ }
180
+ if (ts_morph_1.Node.isPropertyAccessExpression(node)) {
181
+ const receiver = this.referenceKey(this.unwrap(node.getExpression()), symbolIds);
182
+ if (receiver === undefined) {
183
+ return undefined;
166
184
  }
167
- else {
168
- if (elseStmt) {
169
- chainLength++; // Count the final else
170
- }
171
- break;
185
+ const symbol = node.getNameNode().getSymbol();
186
+ const segment = symbol === undefined
187
+ ? `n:${node.getName()}`
188
+ : `s${this.symbolId(symbol, symbolIds)}`;
189
+ return `${receiver}.${segment}`;
190
+ }
191
+ if (ts_morph_1.Node.isElementAccessExpression(node)) {
192
+ const receiver = this.referenceKey(this.unwrap(node.getExpression()), symbolIds);
193
+ const argument = node.getArgumentExpression();
194
+ const index = argument === undefined
195
+ ? undefined
196
+ : this.elementKey(this.unwrap(argument), symbolIds);
197
+ return receiver === undefined || index === undefined
198
+ ? undefined
199
+ : `${receiver}[${index}]`;
200
+ }
201
+ return undefined;
202
+ }
203
+ /** Key of an element access argument: a reference or a string or number literal. */
204
+ elementKey(node, symbolIds) {
205
+ if (ts_morph_1.Node.isStringLiteral(node) ||
206
+ ts_morph_1.Node.isNoSubstitutionTemplateLiteral(node)) {
207
+ return `l:${JSON.stringify(node.getLiteralValue())}`;
208
+ }
209
+ if (ts_morph_1.Node.isNumericLiteral(node)) {
210
+ return `l:${node.getLiteralValue()}`;
211
+ }
212
+ return this.referenceKey(node, symbolIds);
213
+ }
214
+ symbolId(symbol, symbolIds) {
215
+ const known = symbolIds.get(symbol);
216
+ if (known !== undefined) {
217
+ return known;
218
+ }
219
+ const id = symbolIds.size;
220
+ symbolIds.set(symbol, id);
221
+ return id;
222
+ }
223
+ /** Strips parentheses and non-null assertions. */
224
+ unwrap(expr) {
225
+ if (ts_morph_1.Node.isParenthesizedExpression(expr) || ts_morph_1.Node.isNonNullExpression(expr)) {
226
+ return this.unwrap(expr.getExpression());
227
+ }
228
+ return expr;
229
+ }
230
+ /** Name of the function, method or accessor that holds the chain. */
231
+ chainOwner(ifStmt) {
232
+ const fn = ifStmt.getFirstAncestor((ancestor) => this.isFunctionLike(ancestor));
233
+ if (fn === undefined) {
234
+ return { functionName: '<top level>' };
235
+ }
236
+ const name = this.functionName(fn);
237
+ const parent = fn.getParent();
238
+ if (ts_morph_1.Node.isClassDeclaration(parent) || ts_morph_1.Node.isClassExpression(parent)) {
239
+ const className = parent.getName() ?? '<anonymous>';
240
+ return { functionName: `${className}.${name}`, className };
241
+ }
242
+ return { functionName: name };
243
+ }
244
+ isFunctionLike(node) {
245
+ return (ts_morph_1.Node.isFunctionDeclaration(node) ||
246
+ ts_morph_1.Node.isMethodDeclaration(node) ||
247
+ ts_morph_1.Node.isConstructorDeclaration(node) ||
248
+ ts_morph_1.Node.isGetAccessorDeclaration(node) ||
249
+ ts_morph_1.Node.isSetAccessorDeclaration(node) ||
250
+ ts_morph_1.Node.isArrowFunction(node) ||
251
+ ts_morph_1.Node.isFunctionExpression(node));
252
+ }
253
+ functionName(fn) {
254
+ if (ts_morph_1.Node.isConstructorDeclaration(fn)) {
255
+ return 'constructor';
256
+ }
257
+ if (ts_morph_1.Node.isFunctionDeclaration(fn) ||
258
+ ts_morph_1.Node.isMethodDeclaration(fn) ||
259
+ ts_morph_1.Node.isGetAccessorDeclaration(fn) ||
260
+ ts_morph_1.Node.isSetAccessorDeclaration(fn) ||
261
+ ts_morph_1.Node.isFunctionExpression(fn)) {
262
+ const name = fn.getName();
263
+ if (name !== undefined) {
264
+ return name;
172
265
  }
173
266
  }
174
- if (chainLength > this.maxIfElseChain) {
175
- return {
176
- ruleId: this.id,
177
- message: `If-else chain in class '${className}' has ${chainLength} conditions, exceeding the recommended maximum of ${this.maxIfElseChain}. Consider using polymorphism or strategy pattern.`,
178
- filePath,
179
- line: ifStmt.getStartLineNumber(),
180
- column: ifStmt.getStart() - ifStmt.getStartLinePos(),
181
- suggestedFix: `Replace if-else chain with polymorphism or strategy pattern to make the code open for extension.`,
182
- metadata: {
183
- className,
184
- chainLength,
185
- maxAllowed: this.maxIfElseChain,
186
- violationType: 'long-if-else-chain',
187
- principle: 'OCP',
188
- },
189
- };
267
+ const holder = fn.getParent();
268
+ if (ts_morph_1.Node.isVariableDeclaration(holder) ||
269
+ ts_morph_1.Node.isPropertyDeclaration(holder) ||
270
+ ts_morph_1.Node.isPropertyAssignment(holder)) {
271
+ return holder.getName();
190
272
  }
191
- return null;
273
+ return '<anonymous function>';
192
274
  }
193
275
  }
194
276
  exports.OCPViolationRule = OCPViolationRule;
@@ -1,17 +1,19 @@
1
1
  import type { AnalysisRule, AnalysisContext, AnalysisResult } from '@angular-modernizer/plugin-system';
2
2
  /**
3
- * Options of {@link ServiceDipViolationRule}, passed to its constructor.
3
+ * Former options of {@link ServiceDipViolationRule}. The rule reports
4
+ * nothing, so no option has an effect.
5
+ *
6
+ * @deprecated Has no effect; removed in 3.0.
4
7
  */
5
8
  export interface ServiceDipViolationConfig {
6
- /**
7
- * When true, only report violations that cross architectural layer boundaries.
8
- * Layers are inferred from path segments: shared, features, core, lib, app, config.
9
- * Default: false (report all concrete constructor injections).
10
- */
9
+ /** @deprecated Has no effect. */
11
10
  crossLayerOnly?: boolean;
12
11
  }
13
12
  /**
14
- * Metadata of a {@link ServiceDipViolationRule} result.
13
+ * Metadata of former {@link ServiceDipViolationRule} results. The rule reports
14
+ * nothing, so no result carries it.
15
+ *
16
+ * @deprecated No result carries it; removed in 3.0.
15
17
  */
16
18
  export interface ServiceDipViolationMetadata {
17
19
  /** Always `concrete-injection`. */
@@ -24,71 +26,45 @@ export interface ServiceDipViolationMetadata {
24
26
  parameterName: string;
25
27
  /** Suggested interface name: `I` + injected class name. */
26
28
  suggestedInterfaceName: string;
27
- /** Detection confidence (0..1); currently always 0.95. */
29
+ /** Former constant confidence. */
28
30
  confidence: number;
29
- /** Reserved for mutual injection; currently always `false`. */
31
+ /** Former constant `false`. */
30
32
  isBidirectional: boolean;
31
- /** Whether both layers are known and differ. */
33
+ /** Whether both path layers were known and differed. */
32
34
  isCrossLayer: boolean;
33
- /** Layer of the injecting file, when a known layer segment is in its path. */
35
+ /** Path layer of the injecting file. */
34
36
  injectingLayer?: string;
35
- /** Layer of the injected file, when a known layer segment is in its path. */
37
+ /** Path layer of the injected file. */
36
38
  injectedLayer?: string;
37
39
  }
38
40
  /**
39
- * Service DIP Violation Rule (`solid:service-dip-violation`) - detects
40
- * concrete `@Injectable` constructor injection.
41
- *
42
- * Reports a constructor parameter of an `@Injectable` class whose type
43
- * resolves (via the type checker, across files) to another `@Injectable`
44
- * class, instead of an abstraction (interface). Provides a suggested
45
- * interface name (`I` + injected class name) and a suggested fix. With
46
- * {@link ServiceDipViolationConfig.crossLayerOnly}, only injections between
47
- * different path-based layers are reported. Declaration files are skipped.
41
+ * Former check for concrete `@Injectable` constructor injection
42
+ * (`solid:service-dip-violation`). Reports nothing: injecting a concrete
43
+ * `@Injectable` class is Angular's normal DI, not a defect. The one harmful
44
+ * shape, an injection against the layer direction, is always an import
45
+ * upwards, which `architecture:layer-boundary-violation` reports for the
46
+ * configured `layers` / `layersSource` (and suppresses with its
47
+ * `suppressionComments` markers).
48
48
  *
49
- * Sibling of {@link DIPViolationRule}, which detects `new MyService()`.
50
- * {@link ServiceDipViolationTransformRule} applies the fix.
49
+ * The id stays registered so configurations naming it keep loading; ConfigLoader
50
+ * warns that `rules['solid:service-dip-violation']` has no effect. The
51
+ * `service-dip-violation-transform` ({@link ServiceDipViolationTransformRule})
52
+ * detects its targets itself and keeps working.
51
53
  *
52
- * @example
53
- * ```typescript
54
- * // Violation detected:
55
- * class UserService {
56
- * constructor(private orderService: OrderService) {}
57
- * }
58
- *
59
- * // Suggested fix:
60
- * class UserService {
61
- * constructor(private orderService: IOrderService) {}
62
- * }
63
- * ```
54
+ * @deprecated Reports nothing; removed in 3.0. Layer direction is checked by
55
+ * `architecture:layer-boundary-violation`.
64
56
  */
65
57
  export declare class ServiceDipViolationRule implements AnalysisRule {
66
58
  readonly id = "solid:service-dip-violation";
67
- readonly name = "Service DIP Violation";
68
- readonly description = "Detects @Injectable classes injecting other @Injectable classes by concrete type instead of interface";
59
+ readonly name = "Service DIP Violation (deprecated)";
60
+ readonly description = "Deprecated, reports nothing: injections against the layer direction are reported by architecture:layer-boundary-violation";
69
61
  readonly severity = "warning";
70
62
  readonly category = "solid-violation";
71
63
  readonly tags: string[];
72
- private readonly config;
73
- constructor(config?: ServiceDipViolationConfig);
74
- analyze(context: AnalysisContext): Promise<AnalysisResult[]>;
75
- private checkParameter;
76
- /**
77
- * Resolves the class declaration that a constructor parameter's type refers to.
78
- * Uses ts-morph's type checker — works across files within the same Project.
79
- */
80
- private resolveServiceDeclaration;
81
- /**
82
- * Checks whether a class has an `@Injectable` decorator.
83
- * Pattern copied from angular-service-without-injectable.rule.ts.
84
- */
85
- private hasInjectableDecorator;
86
64
  /**
87
- * Extracts the architectural layer from a file path by scanning path segments.
88
- * Path-based fallback adapted from import-direction-violation.rule.ts.
89
- *
90
- * Returns undefined when no known layer segment is found.
65
+ * @param _config - Ignored; kept so existing callers compile.
91
66
  */
92
- private extractLayer;
67
+ constructor(_config?: ServiceDipViolationConfig);
68
+ analyze(_context: AnalysisContext): Promise<AnalysisResult[]>;
93
69
  }
94
70
  //# sourceMappingURL=service-dip-violation.analysis.rule.d.ts.map