UNPKG

1.35 kBPlain TextView Raw
1import * as Lint from 'tslint';
2
3/**
4 * Additional information that each rule must specify.
5 */
6export 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 */
22export type IssueClass = 'SDL' | 'Non-SDL' | 'Ignored';
23export type IssueType = 'Error' | 'Warning';
24export 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 */
30export 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 */
35export type Group = 'Ignored' | 'Security' | 'Correctness' | 'Accessibility' | 'Clarity' | 'Whitespace' | 'Configurable' | 'Deprecated';