Skip to content

Commit bbd6f62

Browse files
committed
wip
1 parent 2af2e8d commit bbd6f62

File tree

3 files changed

+9
-21
lines changed

3 files changed

+9
-21
lines changed

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,10 @@
4444
"typescript": "^5.8.3",
4545
"typescript-eslint": "^8.0.0",
4646
"yorkie": "^2.0.0"
47+
},
48+
"overrides": {
49+
"eslint": {
50+
"@eslint/core": "file:packages/core"
51+
}
4752
}
4853
}

packages/core/src/types.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ export interface ViolationReportBase {
487487
/**
488488
* The data to insert into the message.
489489
*/
490-
data?: Record<string, string | number | boolean | bigint> | undefined;
490+
data?: Record<string, unknown> | undefined;
491491

492492
/**
493493
* The fix to be applied for the violation.
@@ -521,12 +521,12 @@ export interface SuggestedEditBase {
521521
/**
522522
* The data to insert into the message.
523523
*/
524-
data?: Record<string, string | number | boolean | bigint> | undefined;
524+
data?: Record<string, unknown> | undefined;
525525

526526
/**
527527
* The fix to be applied for the suggestion.
528528
*/
529-
fix?: RuleFixer | null | undefined;
529+
fix: RuleFixer;
530530
}
531531

532532
export type SuggestionMessage = { desc: string } | { messageId: string };

packages/core/tests/types/types.test.ts

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -323,16 +323,8 @@ const testRule: RuleDefinition<{
323323
foo: "foo",
324324
bar: 1,
325325
baz: true,
326-
quz: 1n,
327-
// @ts-expect-error Symbols are not allowed in data
328-
quux: Symbol("quux"),
329-
// @ts-expect-error Objects are not allowed in data
330-
quuz: {
331-
hi: "hi",
332-
},
333-
// @ts-expect-error Functions are not allowed in data
334-
corge: () => {},
335326
},
327+
// @ts-expect-error -- 'fix' is required in suggestion objects
336328
fix: null,
337329
},
338330
],
@@ -347,15 +339,6 @@ const testRule: RuleDefinition<{
347339
foo: "foo",
348340
bar: 1,
349341
baz: true,
350-
quz: 1n,
351-
// @ts-expect-error Symbols are not allowed in data
352-
quux: Symbol("quux"),
353-
// @ts-expect-error Objects are not allowed in data
354-
quuz: {
355-
hi: "hi",
356-
},
357-
// @ts-expect-error Functions are not allowed in data
358-
corge: () => {},
359342
},
360343
fix: null,
361344
suggest: null,

0 commit comments

Comments
 (0)