-
-
Notifications
You must be signed in to change notification settings - Fork 26
/
cognitive-complexity.d.ts
41 lines (36 loc) · 1.13 KB
/
cognitive-complexity.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import type { RuleConfig } from '../rule-config';
/**
* Config.
*/
export type CognitiveComplexityConfig = 'sonar-runtime' | 'metric';
/**
* Option.
*/
export type CognitiveComplexityOption = number;
/**
* Options.
*/
export type CognitiveComplexityOptions = [
CognitiveComplexityOption?,
CognitiveComplexityConfig?,
];
/**
* Cognitive Complexity of functions should not be too high.
*
* @see [cognitive-complexity](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/cognitive-complexity.md)
*/
export type CognitiveComplexityRuleConfig =
RuleConfig<CognitiveComplexityOptions>;
/**
* Cognitive Complexity of functions should not be too high.
*
* @see [cognitive-complexity](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/cognitive-complexity.md)
*/
export interface CognitiveComplexityRule {
/**
* Cognitive Complexity of functions should not be too high.
*
* @see [cognitive-complexity](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/cognitive-complexity.md)
*/
'sonarjs/cognitive-complexity': CognitiveComplexityRuleConfig;
}