@eslint-react/shared 1.24.0-next.11 → 1.24.0-next.13
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.
- package/dist/index.d.mts +182 -184
- package/dist/index.d.ts +182 -184
- package/dist/index.js +33 -22
- package/dist/index.mjs +33 -23
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -52,6 +52,8 @@ declare const REACT_BUILD_IN_HOOKS: readonly ["use", "useActionState", "useCallb
|
|
|
52
52
|
*/
|
|
53
53
|
declare const createRuleForPlugin: (pluginName: string) => <Options extends readonly unknown[], MessageIds extends string>({ meta, name, ...rule }: Readonly<ESLintUtils.RuleWithMetaAndName<Options, MessageIds, unknown>>) => ESLintUtils.RuleModule<MessageIds, Options, unknown, ESLintUtils.RuleListener>;
|
|
54
54
|
|
|
55
|
+
declare const getId: () => string;
|
|
56
|
+
|
|
55
57
|
declare function getReactVersion(fallback?: string): string;
|
|
56
58
|
|
|
57
59
|
/**
|
|
@@ -70,7 +72,7 @@ type SchemaWithPipe<TPipe extends [
|
|
|
70
72
|
*
|
|
71
73
|
* @internal
|
|
72
74
|
*/
|
|
73
|
-
readonly '~standard':
|
|
75
|
+
readonly '~standard': StandardProps<InferInput<FirstTupleItem<TPipe>>, InferOutput<LastTupleItem<TPipe>>>;
|
|
74
76
|
/**
|
|
75
77
|
* Parses unknown input values.
|
|
76
78
|
*
|
|
@@ -114,7 +116,7 @@ type SchemaWithPipeAsync<TPipe extends [
|
|
|
114
116
|
*
|
|
115
117
|
* @internal
|
|
116
118
|
*/
|
|
117
|
-
readonly '~standard':
|
|
119
|
+
readonly '~standard': StandardProps<InferInput<FirstTupleItem<TPipe>>, InferOutput<LastTupleItem<TPipe>>>;
|
|
118
120
|
/**
|
|
119
121
|
* Parses unknown input values.
|
|
120
122
|
*
|
|
@@ -139,7 +141,7 @@ type SchemaWithPipeAsync<TPipe extends [
|
|
|
139
141
|
};
|
|
140
142
|
|
|
141
143
|
/**
|
|
142
|
-
* Base metadata
|
|
144
|
+
* Base metadata interface.
|
|
143
145
|
*/
|
|
144
146
|
interface BaseMetadata<TInput> {
|
|
145
147
|
/**
|
|
@@ -167,7 +169,7 @@ interface BaseMetadata<TInput> {
|
|
|
167
169
|
}
|
|
168
170
|
|
|
169
171
|
/**
|
|
170
|
-
* Unknown dataset
|
|
172
|
+
* Unknown dataset interface.
|
|
171
173
|
*/
|
|
172
174
|
interface UnknownDataset {
|
|
173
175
|
/**
|
|
@@ -184,7 +186,7 @@ interface UnknownDataset {
|
|
|
184
186
|
issues?: undefined;
|
|
185
187
|
}
|
|
186
188
|
/**
|
|
187
|
-
* Success dataset
|
|
189
|
+
* Success dataset interface.
|
|
188
190
|
*/
|
|
189
191
|
interface SuccessDataset<TValue> {
|
|
190
192
|
/**
|
|
@@ -201,7 +203,7 @@ interface SuccessDataset<TValue> {
|
|
|
201
203
|
issues?: undefined;
|
|
202
204
|
}
|
|
203
205
|
/**
|
|
204
|
-
* Partial dataset
|
|
206
|
+
* Partial dataset interface.
|
|
205
207
|
*/
|
|
206
208
|
interface PartialDataset<TValue, TIssue extends BaseIssue<unknown>> {
|
|
207
209
|
/**
|
|
@@ -218,7 +220,7 @@ interface PartialDataset<TValue, TIssue extends BaseIssue<unknown>> {
|
|
|
218
220
|
issues: [TIssue, ...TIssue[]];
|
|
219
221
|
}
|
|
220
222
|
/**
|
|
221
|
-
* Failure dataset
|
|
223
|
+
* Failure dataset interface.
|
|
222
224
|
*/
|
|
223
225
|
interface FailureDataset<TIssue extends BaseIssue<unknown>> {
|
|
224
226
|
/**
|
|
@@ -242,7 +244,7 @@ type OutputDataset<TValue, TIssue extends BaseIssue<unknown>> = SuccessDataset<T
|
|
|
242
244
|
/**
|
|
243
245
|
* The Standard Schema properties interface.
|
|
244
246
|
*/
|
|
245
|
-
interface
|
|
247
|
+
interface StandardProps<TInput, TOutput> {
|
|
246
248
|
/**
|
|
247
249
|
* The version number of the standard.
|
|
248
250
|
*/
|
|
@@ -254,24 +256,24 @@ interface StandardSchemaProps<Input, Output> {
|
|
|
254
256
|
/**
|
|
255
257
|
* Validates unknown input values.
|
|
256
258
|
*/
|
|
257
|
-
readonly validate: (value: unknown) => StandardResult<
|
|
259
|
+
readonly validate: (value: unknown) => StandardResult<TOutput> | Promise<StandardResult<TOutput>>;
|
|
258
260
|
/**
|
|
259
261
|
* Inferred types associated with the schema.
|
|
260
262
|
*/
|
|
261
|
-
readonly types?: StandardTypes<
|
|
263
|
+
readonly types?: StandardTypes<TInput, TOutput> | undefined;
|
|
262
264
|
}
|
|
263
265
|
/**
|
|
264
266
|
* The result interface of the validate function.
|
|
265
267
|
*/
|
|
266
|
-
type StandardResult<
|
|
268
|
+
type StandardResult<TOutput> = StandardSuccessResult<TOutput> | StandardFailureResult;
|
|
267
269
|
/**
|
|
268
270
|
* The result interface if validation succeeds.
|
|
269
271
|
*/
|
|
270
|
-
interface StandardSuccessResult<
|
|
272
|
+
interface StandardSuccessResult<TOutput> {
|
|
271
273
|
/**
|
|
272
274
|
* The typed output value.
|
|
273
275
|
*/
|
|
274
|
-
readonly value:
|
|
276
|
+
readonly value: TOutput;
|
|
275
277
|
/**
|
|
276
278
|
* The non-existent issues.
|
|
277
279
|
*/
|
|
@@ -297,33 +299,33 @@ interface StandardIssue {
|
|
|
297
299
|
/**
|
|
298
300
|
* The path of the issue, if any.
|
|
299
301
|
*/
|
|
300
|
-
readonly path?: readonly (PropertyKey |
|
|
302
|
+
readonly path?: readonly (PropertyKey | StandardPathItem)[] | undefined;
|
|
301
303
|
}
|
|
302
304
|
/**
|
|
303
|
-
* The path
|
|
305
|
+
* The path item interface of the issue.
|
|
304
306
|
*/
|
|
305
|
-
interface
|
|
307
|
+
interface StandardPathItem {
|
|
306
308
|
/**
|
|
307
|
-
* The key
|
|
309
|
+
* The key of the path item.
|
|
308
310
|
*/
|
|
309
311
|
readonly key: PropertyKey;
|
|
310
312
|
}
|
|
311
313
|
/**
|
|
312
|
-
* The
|
|
314
|
+
* The Standard Schema types interface.
|
|
313
315
|
*/
|
|
314
|
-
interface StandardTypes<
|
|
316
|
+
interface StandardTypes<TInput, TOutput> {
|
|
315
317
|
/**
|
|
316
318
|
* The input type of the schema.
|
|
317
319
|
*/
|
|
318
|
-
readonly input:
|
|
320
|
+
readonly input: TInput;
|
|
319
321
|
/**
|
|
320
322
|
* The output type of the schema.
|
|
321
323
|
*/
|
|
322
|
-
readonly output:
|
|
324
|
+
readonly output: TOutput;
|
|
323
325
|
}
|
|
324
326
|
|
|
325
327
|
/**
|
|
326
|
-
* Base schema
|
|
328
|
+
* Base schema interface.
|
|
327
329
|
*/
|
|
328
330
|
interface BaseSchema<TInput, TOutput, TIssue extends BaseIssue<unknown>> {
|
|
329
331
|
/**
|
|
@@ -351,7 +353,7 @@ interface BaseSchema<TInput, TOutput, TIssue extends BaseIssue<unknown>> {
|
|
|
351
353
|
*
|
|
352
354
|
* @internal
|
|
353
355
|
*/
|
|
354
|
-
readonly '~standard':
|
|
356
|
+
readonly '~standard': StandardProps<TInput, TOutput>;
|
|
355
357
|
/**
|
|
356
358
|
* Parses unknown input values.
|
|
357
359
|
*
|
|
@@ -375,7 +377,7 @@ interface BaseSchema<TInput, TOutput, TIssue extends BaseIssue<unknown>> {
|
|
|
375
377
|
} | undefined;
|
|
376
378
|
}
|
|
377
379
|
/**
|
|
378
|
-
* Base schema async
|
|
380
|
+
* Base schema async interface.
|
|
379
381
|
*/
|
|
380
382
|
interface BaseSchemaAsync<TInput, TOutput, TIssue extends BaseIssue<unknown>> extends Omit<BaseSchema<TInput, TOutput, TIssue>, 'reference' | 'async' | '~run'> {
|
|
381
383
|
/**
|
|
@@ -400,7 +402,7 @@ interface BaseSchemaAsync<TInput, TOutput, TIssue extends BaseIssue<unknown>> ex
|
|
|
400
402
|
}
|
|
401
403
|
|
|
402
404
|
/**
|
|
403
|
-
* Base transformation
|
|
405
|
+
* Base transformation interface.
|
|
404
406
|
*/
|
|
405
407
|
interface BaseTransformation<TInput, TOutput, TIssue extends BaseIssue<unknown>> {
|
|
406
408
|
/**
|
|
@@ -442,7 +444,7 @@ interface BaseTransformation<TInput, TOutput, TIssue extends BaseIssue<unknown>>
|
|
|
442
444
|
} | undefined;
|
|
443
445
|
}
|
|
444
446
|
/**
|
|
445
|
-
* Base transformation async
|
|
447
|
+
* Base transformation async interface.
|
|
446
448
|
*/
|
|
447
449
|
interface BaseTransformationAsync<TInput, TOutput, TIssue extends BaseIssue<unknown>> extends Omit<BaseTransformation<TInput, TOutput, TIssue>, 'reference' | 'async' | '~run'> {
|
|
448
450
|
/**
|
|
@@ -467,7 +469,7 @@ interface BaseTransformationAsync<TInput, TOutput, TIssue extends BaseIssue<unkn
|
|
|
467
469
|
}
|
|
468
470
|
|
|
469
471
|
/**
|
|
470
|
-
* Base validation
|
|
472
|
+
* Base validation interface.
|
|
471
473
|
*/
|
|
472
474
|
interface BaseValidation<TInput, TOutput, TIssue extends BaseIssue<unknown>> {
|
|
473
475
|
/**
|
|
@@ -513,7 +515,7 @@ interface BaseValidation<TInput, TOutput, TIssue extends BaseIssue<unknown>> {
|
|
|
513
515
|
} | undefined;
|
|
514
516
|
}
|
|
515
517
|
/**
|
|
516
|
-
* Base validation async
|
|
518
|
+
* Base validation async interface.
|
|
517
519
|
*/
|
|
518
520
|
interface BaseValidationAsync<TInput, TOutput, TIssue extends BaseIssue<unknown>> extends Omit<BaseValidation<TInput, TOutput, TIssue>, 'reference' | 'async' | '~run'> {
|
|
519
521
|
/**
|
|
@@ -620,13 +622,13 @@ type SchemaWithoutPipe<TSchema extends BaseSchema<unknown, unknown, BaseIssue<un
|
|
|
620
622
|
};
|
|
621
623
|
|
|
622
624
|
/**
|
|
623
|
-
* Object entries
|
|
625
|
+
* Object entries interface.
|
|
624
626
|
*/
|
|
625
627
|
interface ObjectEntries {
|
|
626
628
|
[key: string]: BaseSchema<unknown, unknown, BaseIssue<unknown>>;
|
|
627
629
|
}
|
|
628
630
|
/**
|
|
629
|
-
* Object entries async
|
|
631
|
+
* Object entries async interface.
|
|
630
632
|
*/
|
|
631
633
|
interface ObjectEntriesAsync {
|
|
632
634
|
[key: string]: BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>;
|
|
@@ -703,7 +705,7 @@ type InferObjectOutput<TEntries extends ObjectEntries | ObjectEntriesAsync> = Pr
|
|
|
703
705
|
type InferObjectIssue<TEntries extends ObjectEntries | ObjectEntriesAsync> = InferIssue<TEntries[keyof TEntries]>;
|
|
704
706
|
|
|
705
707
|
/**
|
|
706
|
-
* Array path item
|
|
708
|
+
* Array path item interface.
|
|
707
709
|
*/
|
|
708
710
|
interface ArrayPathItem {
|
|
709
711
|
/**
|
|
@@ -728,7 +730,7 @@ interface ArrayPathItem {
|
|
|
728
730
|
readonly value: unknown;
|
|
729
731
|
}
|
|
730
732
|
/**
|
|
731
|
-
* Map path item
|
|
733
|
+
* Map path item interface.
|
|
732
734
|
*/
|
|
733
735
|
interface MapPathItem {
|
|
734
736
|
/**
|
|
@@ -753,7 +755,7 @@ interface MapPathItem {
|
|
|
753
755
|
readonly value: unknown;
|
|
754
756
|
}
|
|
755
757
|
/**
|
|
756
|
-
* Object path item
|
|
758
|
+
* Object path item interface.
|
|
757
759
|
*/
|
|
758
760
|
interface ObjectPathItem {
|
|
759
761
|
/**
|
|
@@ -778,7 +780,7 @@ interface ObjectPathItem {
|
|
|
778
780
|
readonly value: unknown;
|
|
779
781
|
}
|
|
780
782
|
/**
|
|
781
|
-
* Set path item
|
|
783
|
+
* Set path item interface.
|
|
782
784
|
*/
|
|
783
785
|
interface SetPathItem {
|
|
784
786
|
/**
|
|
@@ -803,7 +805,7 @@ interface SetPathItem {
|
|
|
803
805
|
readonly value: unknown;
|
|
804
806
|
}
|
|
805
807
|
/**
|
|
806
|
-
* Unknown path item
|
|
808
|
+
* Unknown path item interface.
|
|
807
809
|
*/
|
|
808
810
|
interface UnknownPathItem {
|
|
809
811
|
/**
|
|
@@ -832,7 +834,7 @@ interface UnknownPathItem {
|
|
|
832
834
|
*/
|
|
833
835
|
type IssuePathItem = ArrayPathItem | MapPathItem | ObjectPathItem | SetPathItem | UnknownPathItem;
|
|
834
836
|
/**
|
|
835
|
-
* Base issue
|
|
837
|
+
* Base issue interface.
|
|
836
838
|
*/
|
|
837
839
|
interface BaseIssue<TInput> extends Config<BaseIssue<TInput>> {
|
|
838
840
|
/**
|
|
@@ -874,7 +876,7 @@ interface BaseIssue<TInput> extends Config<BaseIssue<TInput>> {
|
|
|
874
876
|
}
|
|
875
877
|
|
|
876
878
|
/**
|
|
877
|
-
* Config
|
|
879
|
+
* Config interface.
|
|
878
880
|
*/
|
|
879
881
|
interface Config<TIssue extends BaseIssue<unknown>> {
|
|
880
882
|
/**
|
|
@@ -896,7 +898,7 @@ interface Config<TIssue extends BaseIssue<unknown>> {
|
|
|
896
898
|
}
|
|
897
899
|
|
|
898
900
|
/**
|
|
899
|
-
* Array issue
|
|
901
|
+
* Array issue interface.
|
|
900
902
|
*/
|
|
901
903
|
interface ArrayIssue extends BaseIssue<unknown> {
|
|
902
904
|
/**
|
|
@@ -914,7 +916,7 @@ interface ArrayIssue extends BaseIssue<unknown> {
|
|
|
914
916
|
}
|
|
915
917
|
|
|
916
918
|
/**
|
|
917
|
-
* Array schema
|
|
919
|
+
* Array schema interface.
|
|
918
920
|
*/
|
|
919
921
|
interface ArraySchema<TItem extends BaseSchema<unknown, unknown, BaseIssue<unknown>>, TMessage extends ErrorMessage<ArrayIssue> | undefined> extends BaseSchema<InferInput<TItem>[], InferOutput<TItem>[], ArrayIssue | InferIssue<TItem>> {
|
|
920
922
|
/**
|
|
@@ -957,7 +959,7 @@ declare function array<const TItem extends BaseSchema<unknown, unknown, BaseIssu
|
|
|
957
959
|
declare function array<const TItem extends BaseSchema<unknown, unknown, BaseIssue<unknown>>, const TMessage extends ErrorMessage<ArrayIssue> | undefined>(item: TItem, message: TMessage): ArraySchema<TItem, TMessage>;
|
|
958
960
|
|
|
959
961
|
/**
|
|
960
|
-
* Boolean issue
|
|
962
|
+
* Boolean issue interface.
|
|
961
963
|
*/
|
|
962
964
|
interface BooleanIssue extends BaseIssue<unknown> {
|
|
963
965
|
/**
|
|
@@ -974,7 +976,7 @@ interface BooleanIssue extends BaseIssue<unknown> {
|
|
|
974
976
|
readonly expected: 'boolean';
|
|
975
977
|
}
|
|
976
978
|
/**
|
|
977
|
-
* Boolean schema
|
|
979
|
+
* Boolean schema interface.
|
|
978
980
|
*/
|
|
979
981
|
interface BooleanSchema<TMessage extends ErrorMessage<BooleanIssue> | undefined> extends BaseSchema<boolean, boolean, BooleanIssue> {
|
|
980
982
|
/**
|
|
@@ -1015,7 +1017,7 @@ declare function boolean<const TMessage extends ErrorMessage<BooleanIssue> | und
|
|
|
1015
1017
|
type InferNullishOutput<TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, TDefault extends DefaultAsync<TWrapped, null | undefined>> = undefined extends TDefault ? InferOutput<TWrapped> | null | undefined : InferOutput<TWrapped> | Extract<DefaultValue<TDefault>, null | undefined>;
|
|
1016
1018
|
|
|
1017
1019
|
/**
|
|
1018
|
-
* Nullish schema
|
|
1020
|
+
* Nullish schema interface.
|
|
1019
1021
|
*/
|
|
1020
1022
|
interface NullishSchema<TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>>, TDefault extends Default<TWrapped, null | undefined>> extends BaseSchema<InferInput<TWrapped> | null | undefined, InferNullishOutput<TWrapped, TDefault>, InferIssue<TWrapped>> {
|
|
1021
1023
|
/**
|
|
@@ -1058,7 +1060,7 @@ declare function nullish<const TWrapped extends BaseSchema<unknown, unknown, Bas
|
|
|
1058
1060
|
declare function nullish<const TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>>, const TDefault extends Default<TWrapped, null | undefined>>(wrapped: TWrapped, default_: TDefault): NullishSchema<TWrapped, TDefault>;
|
|
1059
1061
|
|
|
1060
1062
|
/**
|
|
1061
|
-
* Nullish schema async
|
|
1063
|
+
* Nullish schema async interface.
|
|
1062
1064
|
*/
|
|
1063
1065
|
interface NullishSchemaAsync<TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, TDefault extends DefaultAsync<TWrapped, null | undefined>> extends BaseSchemaAsync<InferInput<TWrapped> | null | undefined, InferNullishOutput<TWrapped, TDefault>, InferIssue<TWrapped>> {
|
|
1064
1066
|
/**
|
|
@@ -1101,7 +1103,7 @@ declare function nullishAsync<const TWrapped extends BaseSchema<unknown, unknown
|
|
|
1101
1103
|
declare function nullishAsync<const TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, const TDefault extends DefaultAsync<TWrapped, null | undefined>>(wrapped: TWrapped, default_: TDefault): NullishSchemaAsync<TWrapped, TDefault>;
|
|
1102
1104
|
|
|
1103
1105
|
/**
|
|
1104
|
-
* Object issue
|
|
1106
|
+
* Object issue interface.
|
|
1105
1107
|
*/
|
|
1106
1108
|
interface ObjectIssue extends BaseIssue<unknown> {
|
|
1107
1109
|
/**
|
|
@@ -1119,7 +1121,7 @@ interface ObjectIssue extends BaseIssue<unknown> {
|
|
|
1119
1121
|
}
|
|
1120
1122
|
|
|
1121
1123
|
/**
|
|
1122
|
-
* Object schema
|
|
1124
|
+
* Object schema interface.
|
|
1123
1125
|
*/
|
|
1124
1126
|
interface ObjectSchema<TEntries extends ObjectEntries, TMessage extends ErrorMessage<ObjectIssue> | undefined> extends BaseSchema<InferObjectInput<TEntries>, InferObjectOutput<TEntries>, ObjectIssue | InferObjectIssue<TEntries>> {
|
|
1125
1127
|
/**
|
|
@@ -1177,7 +1179,7 @@ declare function object<const TEntries extends ObjectEntries, const TMessage ext
|
|
|
1177
1179
|
type InferOptionalOutput<TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, TDefault extends DefaultAsync<TWrapped, undefined>> = undefined extends TDefault ? InferOutput<TWrapped> | undefined : InferOutput<TWrapped> | Extract<DefaultValue<TDefault>, undefined>;
|
|
1178
1180
|
|
|
1179
1181
|
/**
|
|
1180
|
-
* Optional schema
|
|
1182
|
+
* Optional schema interface.
|
|
1181
1183
|
*/
|
|
1182
1184
|
interface OptionalSchema<TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>>, TDefault extends Default<TWrapped, undefined>> extends BaseSchema<InferInput<TWrapped> | undefined, InferOptionalOutput<TWrapped, TDefault>, InferIssue<TWrapped>> {
|
|
1183
1185
|
/**
|
|
@@ -1220,7 +1222,7 @@ declare function optional<const TWrapped extends BaseSchema<unknown, unknown, Ba
|
|
|
1220
1222
|
declare function optional<const TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>>, const TDefault extends Default<TWrapped, undefined>>(wrapped: TWrapped, default_: TDefault): OptionalSchema<TWrapped, TDefault>;
|
|
1221
1223
|
|
|
1222
1224
|
/**
|
|
1223
|
-
* Optional schema async
|
|
1225
|
+
* Optional schema async interface.
|
|
1224
1226
|
*/
|
|
1225
1227
|
interface OptionalSchemaAsync<TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, TDefault extends DefaultAsync<TWrapped, undefined>> extends BaseSchemaAsync<InferInput<TWrapped> | undefined, InferOptionalOutput<TWrapped, TDefault>, InferIssue<TWrapped>> {
|
|
1226
1228
|
/**
|
|
@@ -1263,7 +1265,7 @@ declare function optionalAsync<const TWrapped extends BaseSchema<unknown, unknow
|
|
|
1263
1265
|
declare function optionalAsync<const TWrapped extends BaseSchema<unknown, unknown, BaseIssue<unknown>> | BaseSchemaAsync<unknown, unknown, BaseIssue<unknown>>, const TDefault extends DefaultAsync<TWrapped, undefined>>(wrapped: TWrapped, default_: TDefault): OptionalSchemaAsync<TWrapped, TDefault>;
|
|
1264
1266
|
|
|
1265
1267
|
/**
|
|
1266
|
-
* String issue
|
|
1268
|
+
* String issue interface.
|
|
1267
1269
|
*/
|
|
1268
1270
|
interface StringIssue extends BaseIssue<unknown> {
|
|
1269
1271
|
/**
|
|
@@ -1280,7 +1282,7 @@ interface StringIssue extends BaseIssue<unknown> {
|
|
|
1280
1282
|
readonly expected: 'string';
|
|
1281
1283
|
}
|
|
1282
1284
|
/**
|
|
1283
|
-
* String schema
|
|
1285
|
+
* String schema interface.
|
|
1284
1286
|
*/
|
|
1285
1287
|
interface StringSchema<TMessage extends ErrorMessage<StringIssue> | undefined> extends BaseSchema<string, string, StringIssue> {
|
|
1286
1288
|
/**
|
|
@@ -1316,7 +1318,7 @@ declare function string(): StringSchema<undefined>;
|
|
|
1316
1318
|
declare function string<const TMessage extends ErrorMessage<StringIssue> | undefined>(message: TMessage): StringSchema<TMessage>;
|
|
1317
1319
|
|
|
1318
1320
|
/**
|
|
1319
|
-
* Readonly action
|
|
1321
|
+
* Readonly action interface.
|
|
1320
1322
|
*/
|
|
1321
1323
|
interface ReadonlyAction<TInput> extends BaseTransformation<TInput, Readonly<TInput>, never> {
|
|
1322
1324
|
/**
|
|
@@ -1335,9 +1337,6 @@ interface ReadonlyAction<TInput> extends BaseTransformation<TInput, Readonly<TIn
|
|
|
1335
1337
|
*/
|
|
1336
1338
|
declare function readonly<TInput>(): ReadonlyAction<TInput>;
|
|
1337
1339
|
|
|
1338
|
-
/**
|
|
1339
|
-
* @internal
|
|
1340
|
-
*/
|
|
1341
1340
|
declare const CustomComponentPropSchema: ObjectSchema<{
|
|
1342
1341
|
/**
|
|
1343
1342
|
* The name of the prop in the user-defined component.
|
|
@@ -1365,7 +1364,6 @@ declare const CustomComponentPropSchema: ObjectSchema<{
|
|
|
1365
1364
|
readonly defaultValue: OptionalSchema<StringSchema<undefined>, undefined>;
|
|
1366
1365
|
}, undefined>;
|
|
1367
1366
|
/**
|
|
1368
|
-
* @internal
|
|
1369
1367
|
* @description
|
|
1370
1368
|
* This will provide some key information to the rule before checking for user-defined components.
|
|
1371
1369
|
* For example:
|
|
@@ -1378,13 +1376,6 @@ declare const CustomComponentSchema: ObjectSchema<{
|
|
|
1378
1376
|
* "Link"
|
|
1379
1377
|
*/
|
|
1380
1378
|
readonly name: StringSchema<undefined>;
|
|
1381
|
-
/**
|
|
1382
|
-
* The ESQuery selector to select the component precisely.
|
|
1383
|
-
* @internal
|
|
1384
|
-
* @example
|
|
1385
|
-
* `JSXElement:has(JSXAttribute[name.name='component'][value.value='a'])`
|
|
1386
|
-
*/
|
|
1387
|
-
readonly selector: OptionalSchema<StringSchema<undefined>, undefined>;
|
|
1388
1379
|
/**
|
|
1389
1380
|
* The name of the built-in component that the user-defined component represents.
|
|
1390
1381
|
* @example
|
|
@@ -1422,6 +1413,13 @@ declare const CustomComponentSchema: ObjectSchema<{
|
|
|
1422
1413
|
*/
|
|
1423
1414
|
readonly defaultValue: OptionalSchema<StringSchema<undefined>, undefined>;
|
|
1424
1415
|
}, undefined>, undefined>, undefined>;
|
|
1416
|
+
/**
|
|
1417
|
+
* The ESQuery selector to select the component precisely.
|
|
1418
|
+
* @internal
|
|
1419
|
+
* @example
|
|
1420
|
+
* `JSXElement:has(JSXAttribute[name.name='component'][value.value='a'])`
|
|
1421
|
+
*/
|
|
1422
|
+
readonly selector: OptionalSchema<StringSchema<undefined>, undefined>;
|
|
1425
1423
|
}, undefined>;
|
|
1426
1424
|
declare const CustomHooksSchema: ObjectSchema<{
|
|
1427
1425
|
readonly use: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
@@ -1454,26 +1452,26 @@ declare const ESLintReactSettingsSchema: ObjectSchema<{
|
|
|
1454
1452
|
* @default `"react"`
|
|
1455
1453
|
* @example `"@pika/react"`
|
|
1456
1454
|
*/
|
|
1457
|
-
readonly importSource: OptionalSchema<StringSchema<undefined>,
|
|
1455
|
+
readonly importSource: OptionalSchema<StringSchema<undefined>, undefined>;
|
|
1458
1456
|
/**
|
|
1459
1457
|
* The identifier that’s used for JSX Element creation.
|
|
1460
1458
|
* @default `"createElement"`
|
|
1461
1459
|
* @deprecated
|
|
1462
1460
|
*/
|
|
1463
|
-
readonly jsxPragma: OptionalSchema<StringSchema<undefined>,
|
|
1461
|
+
readonly jsxPragma: OptionalSchema<StringSchema<undefined>, undefined>;
|
|
1464
1462
|
/**
|
|
1465
1463
|
* The identifier that’s used for JSX fragment elements.
|
|
1466
1464
|
* @description This should not be a member expression (i.e. use "Fragment" instead of "React.Fragment").
|
|
1467
1465
|
* @default `"Fragment"`
|
|
1468
1466
|
* @deprecated
|
|
1469
1467
|
*/
|
|
1470
|
-
readonly jsxPragmaFrag: OptionalSchema<StringSchema<undefined>,
|
|
1468
|
+
readonly jsxPragmaFrag: OptionalSchema<StringSchema<undefined>, undefined>;
|
|
1471
1469
|
/**
|
|
1472
1470
|
* The name of the prop that is used for polymorphic components.
|
|
1473
1471
|
* @description This is used to determine the type of the component.
|
|
1474
1472
|
* @example `"as"`
|
|
1475
1473
|
*/
|
|
1476
|
-
readonly polymorphicPropName: OptionalSchema<StringSchema<undefined>,
|
|
1474
|
+
readonly polymorphicPropName: OptionalSchema<StringSchema<undefined>, undefined>;
|
|
1477
1475
|
/**
|
|
1478
1476
|
* @internal
|
|
1479
1477
|
*/
|
|
@@ -1488,7 +1486,33 @@ declare const ESLintReactSettingsSchema: ObjectSchema<{
|
|
|
1488
1486
|
* @example `"18.3.1"`
|
|
1489
1487
|
* @default `"detect"`
|
|
1490
1488
|
*/
|
|
1491
|
-
readonly version: OptionalSchema<StringSchema<undefined>,
|
|
1489
|
+
readonly version: OptionalSchema<StringSchema<undefined>, undefined>;
|
|
1490
|
+
/**
|
|
1491
|
+
* A object to define additional hooks that are equivalent to the built-in React Hooks.
|
|
1492
|
+
* @description ESLint React will recognize these aliases as equivalent to the built-in hooks in all its rules.
|
|
1493
|
+
* @example `{ useLayoutEffect: ["useIsomorphicLayoutEffect"] }`
|
|
1494
|
+
*/
|
|
1495
|
+
readonly additionalHooks: OptionalSchema<ObjectSchema<{
|
|
1496
|
+
readonly use: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1497
|
+
readonly useActionState: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1498
|
+
readonly useCallback: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1499
|
+
readonly useContext: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1500
|
+
readonly useDebugValue: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1501
|
+
readonly useDeferredValue: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1502
|
+
readonly useEffect: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1503
|
+
readonly useFormStatus: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1504
|
+
readonly useId: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1505
|
+
readonly useImperativeHandle: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1506
|
+
readonly useInsertionEffect: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1507
|
+
readonly useLayoutEffect: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1508
|
+
readonly useMemo: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1509
|
+
readonly useOptimistic: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1510
|
+
readonly useReducer: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1511
|
+
readonly useRef: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1512
|
+
readonly useState: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1513
|
+
readonly useSyncExternalStore: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1514
|
+
readonly useTransition: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1515
|
+
}, undefined>, undefined>;
|
|
1492
1516
|
/**
|
|
1493
1517
|
* An array of user-defined components
|
|
1494
1518
|
* @description This is used to inform the ESLint React plugins how to treat these components during checks.
|
|
@@ -1501,13 +1525,6 @@ declare const ESLintReactSettingsSchema: ObjectSchema<{
|
|
|
1501
1525
|
* "Link"
|
|
1502
1526
|
*/
|
|
1503
1527
|
readonly name: StringSchema<undefined>;
|
|
1504
|
-
/**
|
|
1505
|
-
* The ESQuery selector to select the component precisely.
|
|
1506
|
-
* @internal
|
|
1507
|
-
* @example
|
|
1508
|
-
* `JSXElement:has(JSXAttribute[name.name='component'][value.value='a'])`
|
|
1509
|
-
*/
|
|
1510
|
-
readonly selector: OptionalSchema<StringSchema<undefined>, undefined>;
|
|
1511
1528
|
/**
|
|
1512
1529
|
* The name of the built-in component that the user-defined component represents.
|
|
1513
1530
|
* @example
|
|
@@ -1545,33 +1562,14 @@ declare const ESLintReactSettingsSchema: ObjectSchema<{
|
|
|
1545
1562
|
*/
|
|
1546
1563
|
readonly defaultValue: OptionalSchema<StringSchema<undefined>, undefined>;
|
|
1547
1564
|
}, undefined>, undefined>, undefined>;
|
|
1565
|
+
/**
|
|
1566
|
+
* The ESQuery selector to select the component precisely.
|
|
1567
|
+
* @internal
|
|
1568
|
+
* @example
|
|
1569
|
+
* `JSXElement:has(JSXAttribute[name.name='component'][value.value='a'])`
|
|
1570
|
+
*/
|
|
1571
|
+
readonly selector: OptionalSchema<StringSchema<undefined>, undefined>;
|
|
1548
1572
|
}, undefined>, undefined>, undefined>;
|
|
1549
|
-
/**
|
|
1550
|
-
* A object to define additional hooks that are equivalent to the built-in React Hooks.
|
|
1551
|
-
* @description ESLint React will recognize these aliases as equivalent to the built-in hooks in all its rules.
|
|
1552
|
-
* @example `{ useLayoutEffect: ["useIsomorphicLayoutEffect"] }`
|
|
1553
|
-
*/
|
|
1554
|
-
readonly additionalHooks: OptionalSchema<ObjectSchema<{
|
|
1555
|
-
readonly use: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1556
|
-
readonly useActionState: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1557
|
-
readonly useCallback: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1558
|
-
readonly useContext: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1559
|
-
readonly useDebugValue: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1560
|
-
readonly useDeferredValue: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1561
|
-
readonly useEffect: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1562
|
-
readonly useFormStatus: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1563
|
-
readonly useId: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1564
|
-
readonly useImperativeHandle: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1565
|
-
readonly useInsertionEffect: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1566
|
-
readonly useLayoutEffect: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1567
|
-
readonly useMemo: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1568
|
-
readonly useOptimistic: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1569
|
-
readonly useReducer: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1570
|
-
readonly useRef: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1571
|
-
readonly useState: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1572
|
-
readonly useSyncExternalStore: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1573
|
-
readonly useTransition: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1574
|
-
}, undefined>, undefined>;
|
|
1575
1573
|
}, undefined>;
|
|
1576
1574
|
/**
|
|
1577
1575
|
* @internal
|
|
@@ -1584,26 +1582,26 @@ declare const ESLintSettingsSchema: OptionalSchema<ObjectSchema<{
|
|
|
1584
1582
|
* @default `"react"`
|
|
1585
1583
|
* @example `"@pika/react"`
|
|
1586
1584
|
*/
|
|
1587
|
-
readonly importSource: OptionalSchema<StringSchema<undefined>,
|
|
1585
|
+
readonly importSource: OptionalSchema<StringSchema<undefined>, undefined>;
|
|
1588
1586
|
/**
|
|
1589
1587
|
* The identifier that’s used for JSX Element creation.
|
|
1590
1588
|
* @default `"createElement"`
|
|
1591
1589
|
* @deprecated
|
|
1592
1590
|
*/
|
|
1593
|
-
readonly jsxPragma: OptionalSchema<StringSchema<undefined>,
|
|
1591
|
+
readonly jsxPragma: OptionalSchema<StringSchema<undefined>, undefined>;
|
|
1594
1592
|
/**
|
|
1595
1593
|
* The identifier that’s used for JSX fragment elements.
|
|
1596
1594
|
* @description This should not be a member expression (i.e. use "Fragment" instead of "React.Fragment").
|
|
1597
1595
|
* @default `"Fragment"`
|
|
1598
1596
|
* @deprecated
|
|
1599
1597
|
*/
|
|
1600
|
-
readonly jsxPragmaFrag: OptionalSchema<StringSchema<undefined>,
|
|
1598
|
+
readonly jsxPragmaFrag: OptionalSchema<StringSchema<undefined>, undefined>;
|
|
1601
1599
|
/**
|
|
1602
1600
|
* The name of the prop that is used for polymorphic components.
|
|
1603
1601
|
* @description This is used to determine the type of the component.
|
|
1604
1602
|
* @example `"as"`
|
|
1605
1603
|
*/
|
|
1606
|
-
readonly polymorphicPropName: OptionalSchema<StringSchema<undefined>,
|
|
1604
|
+
readonly polymorphicPropName: OptionalSchema<StringSchema<undefined>, undefined>;
|
|
1607
1605
|
/**
|
|
1608
1606
|
* @internal
|
|
1609
1607
|
*/
|
|
@@ -1618,7 +1616,33 @@ declare const ESLintSettingsSchema: OptionalSchema<ObjectSchema<{
|
|
|
1618
1616
|
* @example `"18.3.1"`
|
|
1619
1617
|
* @default `"detect"`
|
|
1620
1618
|
*/
|
|
1621
|
-
readonly version: OptionalSchema<StringSchema<undefined>,
|
|
1619
|
+
readonly version: OptionalSchema<StringSchema<undefined>, undefined>;
|
|
1620
|
+
/**
|
|
1621
|
+
* A object to define additional hooks that are equivalent to the built-in React Hooks.
|
|
1622
|
+
* @description ESLint React will recognize these aliases as equivalent to the built-in hooks in all its rules.
|
|
1623
|
+
* @example `{ useLayoutEffect: ["useIsomorphicLayoutEffect"] }`
|
|
1624
|
+
*/
|
|
1625
|
+
readonly additionalHooks: OptionalSchema<ObjectSchema<{
|
|
1626
|
+
readonly use: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1627
|
+
readonly useActionState: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1628
|
+
readonly useCallback: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1629
|
+
readonly useContext: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1630
|
+
readonly useDebugValue: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1631
|
+
readonly useDeferredValue: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1632
|
+
readonly useEffect: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1633
|
+
readonly useFormStatus: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1634
|
+
readonly useId: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1635
|
+
readonly useImperativeHandle: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1636
|
+
readonly useInsertionEffect: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1637
|
+
readonly useLayoutEffect: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1638
|
+
readonly useMemo: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1639
|
+
readonly useOptimistic: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1640
|
+
readonly useReducer: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1641
|
+
readonly useRef: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1642
|
+
readonly useState: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1643
|
+
readonly useSyncExternalStore: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1644
|
+
readonly useTransition: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1645
|
+
}, undefined>, undefined>;
|
|
1622
1646
|
/**
|
|
1623
1647
|
* An array of user-defined components
|
|
1624
1648
|
* @description This is used to inform the ESLint React plugins how to treat these components during checks.
|
|
@@ -1631,13 +1655,6 @@ declare const ESLintSettingsSchema: OptionalSchema<ObjectSchema<{
|
|
|
1631
1655
|
* "Link"
|
|
1632
1656
|
*/
|
|
1633
1657
|
readonly name: StringSchema<undefined>;
|
|
1634
|
-
/**
|
|
1635
|
-
* The ESQuery selector to select the component precisely.
|
|
1636
|
-
* @internal
|
|
1637
|
-
* @example
|
|
1638
|
-
* `JSXElement:has(JSXAttribute[name.name='component'][value.value='a'])`
|
|
1639
|
-
*/
|
|
1640
|
-
readonly selector: OptionalSchema<StringSchema<undefined>, undefined>;
|
|
1641
1658
|
/**
|
|
1642
1659
|
* The name of the built-in component that the user-defined component represents.
|
|
1643
1660
|
* @example
|
|
@@ -1675,33 +1692,14 @@ declare const ESLintSettingsSchema: OptionalSchema<ObjectSchema<{
|
|
|
1675
1692
|
*/
|
|
1676
1693
|
readonly defaultValue: OptionalSchema<StringSchema<undefined>, undefined>;
|
|
1677
1694
|
}, undefined>, undefined>, undefined>;
|
|
1695
|
+
/**
|
|
1696
|
+
* The ESQuery selector to select the component precisely.
|
|
1697
|
+
* @internal
|
|
1698
|
+
* @example
|
|
1699
|
+
* `JSXElement:has(JSXAttribute[name.name='component'][value.value='a'])`
|
|
1700
|
+
*/
|
|
1701
|
+
readonly selector: OptionalSchema<StringSchema<undefined>, undefined>;
|
|
1678
1702
|
}, undefined>, undefined>, undefined>;
|
|
1679
|
-
/**
|
|
1680
|
-
* A object to define additional hooks that are equivalent to the built-in React Hooks.
|
|
1681
|
-
* @description ESLint React will recognize these aliases as equivalent to the built-in hooks in all its rules.
|
|
1682
|
-
* @example `{ useLayoutEffect: ["useIsomorphicLayoutEffect"] }`
|
|
1683
|
-
*/
|
|
1684
|
-
readonly additionalHooks: OptionalSchema<ObjectSchema<{
|
|
1685
|
-
readonly use: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1686
|
-
readonly useActionState: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1687
|
-
readonly useCallback: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1688
|
-
readonly useContext: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1689
|
-
readonly useDebugValue: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1690
|
-
readonly useDeferredValue: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1691
|
-
readonly useEffect: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1692
|
-
readonly useFormStatus: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1693
|
-
readonly useId: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1694
|
-
readonly useImperativeHandle: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1695
|
-
readonly useInsertionEffect: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1696
|
-
readonly useLayoutEffect: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1697
|
-
readonly useMemo: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1698
|
-
readonly useOptimistic: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1699
|
-
readonly useReducer: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1700
|
-
readonly useRef: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1701
|
-
readonly useState: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1702
|
-
readonly useSyncExternalStore: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1703
|
-
readonly useTransition: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1704
|
-
}, undefined>, undefined>;
|
|
1705
1703
|
}, undefined>, undefined>;
|
|
1706
1704
|
/** @deprecated Use `react-x` instead */
|
|
1707
1705
|
readonly reactOptions: OptionalSchema<ObjectSchema<{
|
|
@@ -1711,26 +1709,26 @@ declare const ESLintSettingsSchema: OptionalSchema<ObjectSchema<{
|
|
|
1711
1709
|
* @default `"react"`
|
|
1712
1710
|
* @example `"@pika/react"`
|
|
1713
1711
|
*/
|
|
1714
|
-
readonly importSource: OptionalSchema<StringSchema<undefined>,
|
|
1712
|
+
readonly importSource: OptionalSchema<StringSchema<undefined>, undefined>;
|
|
1715
1713
|
/**
|
|
1716
1714
|
* The identifier that’s used for JSX Element creation.
|
|
1717
1715
|
* @default `"createElement"`
|
|
1718
1716
|
* @deprecated
|
|
1719
1717
|
*/
|
|
1720
|
-
readonly jsxPragma: OptionalSchema<StringSchema<undefined>,
|
|
1718
|
+
readonly jsxPragma: OptionalSchema<StringSchema<undefined>, undefined>;
|
|
1721
1719
|
/**
|
|
1722
1720
|
* The identifier that’s used for JSX fragment elements.
|
|
1723
1721
|
* @description This should not be a member expression (i.e. use "Fragment" instead of "React.Fragment").
|
|
1724
1722
|
* @default `"Fragment"`
|
|
1725
1723
|
* @deprecated
|
|
1726
1724
|
*/
|
|
1727
|
-
readonly jsxPragmaFrag: OptionalSchema<StringSchema<undefined>,
|
|
1725
|
+
readonly jsxPragmaFrag: OptionalSchema<StringSchema<undefined>, undefined>;
|
|
1728
1726
|
/**
|
|
1729
1727
|
* The name of the prop that is used for polymorphic components.
|
|
1730
1728
|
* @description This is used to determine the type of the component.
|
|
1731
1729
|
* @example `"as"`
|
|
1732
1730
|
*/
|
|
1733
|
-
readonly polymorphicPropName: OptionalSchema<StringSchema<undefined>,
|
|
1731
|
+
readonly polymorphicPropName: OptionalSchema<StringSchema<undefined>, undefined>;
|
|
1734
1732
|
/**
|
|
1735
1733
|
* @internal
|
|
1736
1734
|
*/
|
|
@@ -1745,7 +1743,33 @@ declare const ESLintSettingsSchema: OptionalSchema<ObjectSchema<{
|
|
|
1745
1743
|
* @example `"18.3.1"`
|
|
1746
1744
|
* @default `"detect"`
|
|
1747
1745
|
*/
|
|
1748
|
-
readonly version: OptionalSchema<StringSchema<undefined>,
|
|
1746
|
+
readonly version: OptionalSchema<StringSchema<undefined>, undefined>;
|
|
1747
|
+
/**
|
|
1748
|
+
* A object to define additional hooks that are equivalent to the built-in React Hooks.
|
|
1749
|
+
* @description ESLint React will recognize these aliases as equivalent to the built-in hooks in all its rules.
|
|
1750
|
+
* @example `{ useLayoutEffect: ["useIsomorphicLayoutEffect"] }`
|
|
1751
|
+
*/
|
|
1752
|
+
readonly additionalHooks: OptionalSchema<ObjectSchema<{
|
|
1753
|
+
readonly use: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1754
|
+
readonly useActionState: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1755
|
+
readonly useCallback: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1756
|
+
readonly useContext: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1757
|
+
readonly useDebugValue: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1758
|
+
readonly useDeferredValue: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1759
|
+
readonly useEffect: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1760
|
+
readonly useFormStatus: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1761
|
+
readonly useId: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1762
|
+
readonly useImperativeHandle: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1763
|
+
readonly useInsertionEffect: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1764
|
+
readonly useLayoutEffect: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1765
|
+
readonly useMemo: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1766
|
+
readonly useOptimistic: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1767
|
+
readonly useReducer: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1768
|
+
readonly useRef: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1769
|
+
readonly useState: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1770
|
+
readonly useSyncExternalStore: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1771
|
+
readonly useTransition: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1772
|
+
}, undefined>, undefined>;
|
|
1749
1773
|
/**
|
|
1750
1774
|
* An array of user-defined components
|
|
1751
1775
|
* @description This is used to inform the ESLint React plugins how to treat these components during checks.
|
|
@@ -1758,13 +1782,6 @@ declare const ESLintSettingsSchema: OptionalSchema<ObjectSchema<{
|
|
|
1758
1782
|
* "Link"
|
|
1759
1783
|
*/
|
|
1760
1784
|
readonly name: StringSchema<undefined>;
|
|
1761
|
-
/**
|
|
1762
|
-
* The ESQuery selector to select the component precisely.
|
|
1763
|
-
* @internal
|
|
1764
|
-
* @example
|
|
1765
|
-
* `JSXElement:has(JSXAttribute[name.name='component'][value.value='a'])`
|
|
1766
|
-
*/
|
|
1767
|
-
readonly selector: OptionalSchema<StringSchema<undefined>, undefined>;
|
|
1768
1785
|
/**
|
|
1769
1786
|
* The name of the built-in component that the user-defined component represents.
|
|
1770
1787
|
* @example
|
|
@@ -1802,33 +1819,14 @@ declare const ESLintSettingsSchema: OptionalSchema<ObjectSchema<{
|
|
|
1802
1819
|
*/
|
|
1803
1820
|
readonly defaultValue: OptionalSchema<StringSchema<undefined>, undefined>;
|
|
1804
1821
|
}, undefined>, undefined>, undefined>;
|
|
1822
|
+
/**
|
|
1823
|
+
* The ESQuery selector to select the component precisely.
|
|
1824
|
+
* @internal
|
|
1825
|
+
* @example
|
|
1826
|
+
* `JSXElement:has(JSXAttribute[name.name='component'][value.value='a'])`
|
|
1827
|
+
*/
|
|
1828
|
+
readonly selector: OptionalSchema<StringSchema<undefined>, undefined>;
|
|
1805
1829
|
}, undefined>, undefined>, undefined>;
|
|
1806
|
-
/**
|
|
1807
|
-
* A object to define additional hooks that are equivalent to the built-in React Hooks.
|
|
1808
|
-
* @description ESLint React will recognize these aliases as equivalent to the built-in hooks in all its rules.
|
|
1809
|
-
* @example `{ useLayoutEffect: ["useIsomorphicLayoutEffect"] }`
|
|
1810
|
-
*/
|
|
1811
|
-
readonly additionalHooks: OptionalSchema<ObjectSchema<{
|
|
1812
|
-
readonly use: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1813
|
-
readonly useActionState: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1814
|
-
readonly useCallback: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1815
|
-
readonly useContext: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1816
|
-
readonly useDebugValue: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1817
|
-
readonly useDeferredValue: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1818
|
-
readonly useEffect: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1819
|
-
readonly useFormStatus: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1820
|
-
readonly useId: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1821
|
-
readonly useImperativeHandle: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1822
|
-
readonly useInsertionEffect: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1823
|
-
readonly useLayoutEffect: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1824
|
-
readonly useMemo: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1825
|
-
readonly useOptimistic: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1826
|
-
readonly useReducer: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1827
|
-
readonly useRef: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1828
|
-
readonly useState: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1829
|
-
readonly useSyncExternalStore: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1830
|
-
readonly useTransition: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
|
|
1831
|
-
}, undefined>, undefined>;
|
|
1832
1830
|
}, undefined>, undefined>;
|
|
1833
1831
|
}, undefined>, {}>;
|
|
1834
1832
|
type CustomComponent = InferOutput<typeof CustomComponentSchema>;
|
|
@@ -1840,26 +1838,26 @@ type ESLintSettings = InferOutput<typeof ESLintSettingsSchema>;
|
|
|
1840
1838
|
* The default ESLint settings for "react-x".
|
|
1841
1839
|
*/
|
|
1842
1840
|
declare const DEFAULT_ESLINT_REACT_SETTINGS: {
|
|
1841
|
+
readonly importSource: "react";
|
|
1842
|
+
readonly jsxPragma: "createElement";
|
|
1843
|
+
readonly jsxPragmaFrag: "Fragment";
|
|
1844
|
+
readonly polymorphicPropName: "as";
|
|
1845
|
+
readonly strict: false;
|
|
1846
|
+
readonly strictImportCheck: false;
|
|
1847
|
+
readonly version: "detect";
|
|
1843
1848
|
readonly additionalHooks: {
|
|
1844
1849
|
readonly useLayoutEffect: ["useIsomorphicLayoutEffect"];
|
|
1845
1850
|
};
|
|
1846
|
-
readonly version: string;
|
|
1847
|
-
readonly importSource: string;
|
|
1848
|
-
readonly jsxPragma: string;
|
|
1849
|
-
readonly jsxPragmaFrag: string;
|
|
1850
|
-
readonly polymorphicPropName: string;
|
|
1851
|
-
readonly strict: boolean;
|
|
1852
|
-
readonly strictImportCheck: boolean;
|
|
1853
1851
|
readonly additionalComponents?: {
|
|
1854
1852
|
name: string;
|
|
1855
1853
|
as?: string;
|
|
1856
|
-
selector?: string;
|
|
1857
1854
|
attributes?: {
|
|
1858
1855
|
name: string;
|
|
1859
1856
|
as?: string;
|
|
1860
1857
|
controlled?: boolean;
|
|
1861
1858
|
defaultValue?: string;
|
|
1862
1859
|
}[];
|
|
1860
|
+
selector?: string;
|
|
1863
1861
|
}[];
|
|
1864
1862
|
};
|
|
1865
1863
|
|
|
@@ -2231,4 +2229,4 @@ type RuleNamespace = "x" | "dom" | "web-api" | "hooks-extra" | "naming-conventio
|
|
|
2231
2229
|
*/
|
|
2232
2230
|
type RuleFeature = "CFG" | "CHK" | "DBG" | "FIX" | "MOD" | "TSC";
|
|
2233
2231
|
|
|
2234
|
-
export { type CustomComponent, type CustomComponentNormalized, type CustomComponentProp, type CustomComponentPropNormalized, CustomComponentPropSchema, CustomComponentSchema, type CustomHooks, CustomHooksSchema, DEFAULT_ESLINT_REACT_SETTINGS, DOM_HTML_COMPONENT_TYPES, DOM_SVG_COMPONENT_TYPES, type ESLintReactSettings, type ESLintReactSettingsNormalized, ESLintReactSettingsSchema, type ESLintSettings, ESLintSettingsSchema, GITHUB_URL, NPM_SCOPE, REACT_BUILD_IN_HOOKS, RE_CAMEL_CASE, RE_CONSTANT_CASE, RE_JAVASCRIPT_PROTOCOL, RE_KEBAB_CASE, RE_PASCAL_CASE, RE_SNAKE_CASE, type RuleContext, type RuleDeclaration, type RuleFeature, type RuleNamespace, type RuleOptions, type RulePreset, type RuleSeverity, WEBSITE_URL, createRuleForPlugin, decodeSettings, defineSettings, getReactVersion, getSettingsFromContext, toNormalizedSettings, unsafeDecodeSettings };
|
|
2232
|
+
export { type CustomComponent, type CustomComponentNormalized, type CustomComponentProp, type CustomComponentPropNormalized, CustomComponentPropSchema, CustomComponentSchema, type CustomHooks, CustomHooksSchema, DEFAULT_ESLINT_REACT_SETTINGS, DOM_HTML_COMPONENT_TYPES, DOM_SVG_COMPONENT_TYPES, type ESLintReactSettings, type ESLintReactSettingsNormalized, ESLintReactSettingsSchema, type ESLintSettings, ESLintSettingsSchema, GITHUB_URL, NPM_SCOPE, REACT_BUILD_IN_HOOKS, RE_CAMEL_CASE, RE_CONSTANT_CASE, RE_JAVASCRIPT_PROTOCOL, RE_KEBAB_CASE, RE_PASCAL_CASE, RE_SNAKE_CASE, type RuleContext, type RuleDeclaration, type RuleFeature, type RuleNamespace, type RuleOptions, type RulePreset, type RuleSeverity, WEBSITE_URL, createRuleForPlugin, decodeSettings, defineSettings, getId, getReactVersion, getSettingsFromContext, toNormalizedSettings, unsafeDecodeSettings };
|