1 | import * as Lint from 'tslint';
|
2 |
|
3 | /**
|
4 | * Additional information that each rule must specify.
|
5 | */
|
6 | export interface ExtendedMetadata extends Lint.IRuleMetadata {
|
7 | issueClass: IssueClass;
|
8 | issueType: IssueType;
|
9 | severity: Severity;
|
10 | level: Level;
|
11 | group: Group;
|
12 | recommendation?: string;
|
13 | commonWeaknessEnumeration?: string;
|
14 | }
|
15 |
|
16 | /**
|
17 | * The Security Development Lifecycle defines many rules: https://www.microsoft.com/en-us/sdl/
|
18 | * SDL - Use this value if the rule is based on an SDL recommendation.
|
19 | * Non-SDL - Use this value when you want a rule to show up in Microsoft's Warnings Central
|
20 | * Ignored - Use this value to exclude the rule from Warnings Central
|
21 | */
|
22 | export type IssueClass = 'SDL' | 'Non-SDL' | 'Ignored';
|
23 | export type IssueType = 'Error' | 'Warning';
|
24 | export type Severity = 'Critical' | 'Important' | 'Moderate' | 'Low';
|
25 |
|
26 | /**
|
27 | * Mandatory - This means that all teams should be using this rule with no exceptions.
|
28 | * Opportunity for Excellence - This means that we recommend using the rule.
|
29 | */
|
30 | export type Level = 'Mandatory' | 'Opportunity for Excellence';
|
31 |
|
32 | /**
|
33 | * Ignored - Use this value to exclude the rule from recommended_ruleset.js and the deployed tslint.json file.
|
34 | */
|
35 | export type Group = 'Ignored' | 'Security' | 'Correctness' | 'Accessibility' | 'Clarity' | 'Whitespace' | 'Configurable' | 'Deprecated';
|