@ttsc/lint 0.25.0 → 0.26.1

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.
@@ -80,24 +80,45 @@ export interface ITtscLintFunctionalNoThrowStatementsRuleOptions {
80
80
 
81
81
  /** `functional/no-mixed-types` rule options. */
82
82
  export interface ITtscLintFunctionalNoMixedTypesRuleOptions {
83
- /** Check interface member kinds. */
83
+ /**
84
+ * Check interface member kinds.
85
+ *
86
+ * @default true
87
+ */
84
88
  checkInterfaces?: boolean;
85
89
 
86
- /** Check type-literal member kinds. */
90
+ /**
91
+ * Check type-literal member kinds.
92
+ *
93
+ * @default true
94
+ */
87
95
  checkTypeLiterals?: boolean;
88
96
  }
89
97
 
90
98
  /** `functional/no-return-void` rule options. */
91
99
  export interface ITtscLintFunctionalNoReturnVoidRuleOptions {
92
- /** Permit a function that returns `null` to satisfy the rule. */
100
+ /**
101
+ * Permit a function whose declared return type is `null`. Set `false` to
102
+ * reject it the way a declared `void` is rejected.
103
+ *
104
+ * @default true
105
+ */
93
106
  allowNull?: boolean;
94
107
 
95
- /** Permit a function that returns `undefined` to satisfy the rule. */
108
+ /**
109
+ * Permit a function whose declared return type is `undefined`. Set `false` to
110
+ * reject it the way a declared `void` is rejected.
111
+ *
112
+ * @default true
113
+ */
96
114
  allowUndefined?: boolean;
97
115
 
98
116
  /**
99
- * Skip functions whose return type is inferred to be `void` rather than
100
- * declared explicitly.
117
+ * Skip a bare `return;` inside a function that declares no return type. That
118
+ * statement is the one place the rule rejects a void-ness it inferred rather
119
+ * than read from an annotation.
120
+ *
121
+ * @default false
101
122
  */
102
123
  ignoreInferredTypes?: boolean;
103
124
  }
@@ -105,7 +126,8 @@ export interface ITtscLintFunctionalNoReturnVoidRuleOptions {
105
126
  /** `functional/prefer-immutable-types` rule options. */
106
127
  export interface ITtscLintFunctionalPreferImmutableTypesRuleOptions extends ITtscLintFunctionalPatternOptions {
107
128
  /**
108
- * Minimum accepted immutability. The native subset treats any configured
129
+ * Minimum accepted immutability. Reserved for upstream-compatible configs;
130
+ * the native subset computes no immutability level and treats any configured
109
131
  * value as readonly-required.
110
132
  */
111
133
  enforcement?:
@@ -118,31 +140,62 @@ export interface ITtscLintFunctionalPreferImmutableTypesRuleOptions extends ITts
118
140
 
119
141
  /** `functional/prefer-readonly-type` rule options. */
120
142
  export interface ITtscLintFunctionalPreferReadonlyTypeRuleOptions extends ITtscLintFunctionalPatternOptions {
121
- /** Permit mutation of locals while still policing exported types. */
143
+ /**
144
+ * Permit mutation of locals while still policing exported types. Reserved for
145
+ * upstream-compatible configs; the native subset reads type annotations and
146
+ * models no local-versus-exported distinction.
147
+ */
122
148
  allowLocalMutation?: boolean;
123
149
 
124
- /** Permit a mutable return type even when parameters must be readonly. */
150
+ /**
151
+ * Permit a mutable return type even when parameters must be readonly. Covers
152
+ * every signature that can declare one, including call and construct
153
+ * signatures, constructor types, and a get accessor.
154
+ *
155
+ * @default false
156
+ */
125
157
  allowMutableReturnType?: boolean;
126
158
 
127
- /** Also check property positions that have no explicit type annotation. */
159
+ /**
160
+ * Also check property positions that have no explicit type annotation.
161
+ * Reserved for upstream-compatible configs; judging an unannotated position
162
+ * needs the type checker, which this rule does not use.
163
+ */
128
164
  checkImplicit?: boolean;
129
165
 
130
- /** Skip array / tuple / `Map` / `Set` types. */
166
+ /**
167
+ * Skip array / tuple / `Map` / `Set` types.
168
+ *
169
+ * @default false
170
+ */
131
171
  ignoreCollections?: boolean;
132
172
 
133
173
  /**
134
- * Skip class fields. `"fieldsOnly"` keeps the rule active for non-field class
135
- * members.
174
+ * Skip class members. `true` skips anything under a class, its heritage
175
+ * clause and type parameters included; `"fieldsOnly"` narrows that to field
176
+ * declarations and keeps methods, accessors, and constructor parameters
177
+ * checked.
178
+ *
179
+ * @default false
136
180
  */
137
181
  ignoreClass?: boolean | "fieldsOnly";
138
182
 
139
- /** Skip interface members entirely. */
183
+ /**
184
+ * Skip interface members entirely.
185
+ *
186
+ * @default false
187
+ */
140
188
  ignoreInterface?: boolean;
141
189
  }
142
190
 
143
191
  /** `functional/prefer-tacit` rule options. */
144
192
  export interface ITtscLintFunctionalPreferTacitRuleOptions {
145
- /** Check member expressions such as `x => service.map(x)`. */
193
+ /**
194
+ * Check member expressions such as `x => service.map(x)`. Set `false` to keep
195
+ * the rule on bare-identifier callees only.
196
+ *
197
+ * @default true
198
+ */
146
199
  checkMemberExpressions?: boolean;
147
200
  }
148
201
 
@@ -167,7 +220,11 @@ export interface ITtscLintFunctionalTypeDeclarationImmutabilityRule {
167
220
  */
168
221
  immutability?: "ReadonlyShallow" | "ReadonlyDeep" | "Immutable" | "Mutable";
169
222
 
170
- /** Comparator applied to the immutability level above. */
223
+ /**
224
+ * Comparator applied to the immutability level above. Reserved for
225
+ * upstream-compatible configs alongside `immutability`: the native subset
226
+ * computes no immutability level, so there is nothing to compare.
227
+ */
171
228
  comparator?:
172
229
  | "Less"
173
230
  | "AtMost"