File tree Expand file tree Collapse file tree 2 files changed +3
-15
lines changed Expand file tree Collapse file tree 2 files changed +3
-15
lines changed Original file line number Diff line number Diff line change @@ -487,7 +487,7 @@ export interface ViolationReportBase {
487487 /**
488488 * The data to insert into the message.
489489 */
490- data ?: Record < string , unknown > | undefined ;
490+ data ?: Record < string , string > | 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 , unknown > | undefined ;
524+ data ?: Record < string , string > | undefined ;
525525
526526 /**
527527 * The fix to be applied for the suggestion.
528528 */
529- fix : RuleFixer ;
529+ fix ? : RuleFixer | null | undefined ;
530530}
531531
532532export type SuggestionMessage = { desc : string } | { messageId : string } ;
Original file line number Diff line number Diff line change @@ -298,7 +298,6 @@ const testRule: RuleDefinition<{
298298 start : { line : node . start , column : 1 } ,
299299 end : { line : node . start + 1 , column : Infinity } ,
300300 } ,
301- data : undefined ,
302301 fix ( fixer : RuleTextEditor ) : RuleTextEdit {
303302 return fixer . replaceText (
304303 node ,
@@ -319,12 +318,6 @@ const testRule: RuleDefinition<{
319318 suggest : [
320319 {
321320 messageId : "Bar" ,
322- data : {
323- foo : "foo" ,
324- bar : 1 ,
325- baz : true ,
326- } ,
327- // @ts -expect-error -- 'fix' is required in suggestion objects
328321 fix : null ,
329322 } ,
330323 ] ,
@@ -335,11 +328,6 @@ const testRule: RuleDefinition<{
335328 context . report ( {
336329 message : "This baz is foobar" ,
337330 loc : { line : node . start , column : 1 } ,
338- data : {
339- foo : "foo" ,
340- bar : 1 ,
341- baz : true ,
342- } ,
343331 fix : null ,
344332 suggest : null ,
345333 } ) ;
You can’t perform that action at this time.
0 commit comments