@@ -59,12 +59,56 @@ export interface Position {
59
59
// Config
60
60
//------------------------------------------------------------------------------
61
61
62
- export type RuleSeverity = 0 | 1 | 2 | "off" | "warn" | "error" ;
62
+ /**
63
+ * The human readable severity level used in a configuration.
64
+ */
65
+ export type SeverityName = "off" | "warn" | "error" ;
66
+
67
+ /**
68
+ * The numeric severity level for a rule.
69
+ *
70
+ * - `0` means off.
71
+ * - `1` means warn.
72
+ * - `2` means error.
73
+ *
74
+ */
75
+ export type SeverityLevel = 0 | 1 | 2 ;
76
+
77
+ /**
78
+ * The severity of a rule in a configuration.
79
+ */
80
+ export type Severity = SeverityName | SeverityLevel ;
81
+
82
+ /**
83
+ * Represents the configuration options for the core linter.
84
+ */
85
+ export interface LinterOptionsConfig {
86
+ /**
87
+ * Indicates whether or not inline configuration is evaluated.
88
+ */
89
+ noInlineConfig ?: boolean ;
90
+
91
+ /**
92
+ * Indicates what to do when an unused disable directive is found.
93
+ */
94
+ reportUnusedDisableDirectives ?: boolean | Severity ;
95
+ }
96
+
97
+ /**
98
+ * Shared settings that are accessible from within plugins.
99
+ */
100
+ export type SettingsConfig = Record < string , unknown > ;
63
101
64
- export type RuleConfig = RuleSeverity | [ RuleSeverity , ...any [ ] ] ;
102
+ /**
103
+ * The configuration for a rule.
104
+ */
105
+ export type RuleConfig = Severity | [ Severity , ...any [ ] ] ;
65
106
107
+ /**
108
+ * A collection of rules and their configurations.
109
+ */
66
110
export interface RulesConfig {
67
- [ key : string ] : RuleConfig ;
111
+ [ ruleId : string ] : RuleConfig ;
68
112
}
69
113
70
114
//------------------------------------------------------------------------------
0 commit comments