File tree Expand file tree Collapse file tree 2 files changed +16
-7
lines changed Expand file tree Collapse file tree 2 files changed +16
-7
lines changed Original file line number Diff line number Diff line change @@ -1174,13 +1174,13 @@ export namespace Rule {
1174
1174
}
1175
1175
1176
1176
interface RuleContext
1177
- extends CoreRuleContext <
1178
- RuleContextTypeOptions & {
1179
- LangOptions : Linter . LanguageOptions ;
1180
- Code : SourceCode ;
1181
- Node : ESTree . Node ;
1182
- }
1183
- > {
1177
+ extends CoreRuleContext < {
1178
+ LangOptions : Linter . LanguageOptions ;
1179
+ Code : SourceCode ;
1180
+ RuleOptions : any [ ] ;
1181
+ Node : ESTree . Node ;
1182
+ MessageIds : string ;
1183
+ } > {
1184
1184
/*
1185
1185
* Need to extend the `RuleContext` interface to include the
1186
1186
* deprecated methods that have not yet been removed.
Original file line number Diff line number Diff line change @@ -613,6 +613,13 @@ rule = {
613
613
hasSuggestions : true ,
614
614
} ,
615
615
} ;
616
+ rule = {
617
+ create ( context ) {
618
+ const foo : string = context . options [ 0 ] ;
619
+ const baz : number = context . options [ 1 ] ?. baz ?? false ;
620
+ return { } ;
621
+ } ,
622
+ } ;
616
623
617
624
rule = {
618
625
create ( context : Rule . RuleContext ) {
@@ -636,6 +643,8 @@ rule = {
636
643
context . languageOptions
637
644
. ecmaVersion satisfies Linter . LanguageOptions [ "ecmaVersion" ] ;
638
645
646
+ context . options ; // $ExpectType any[]
647
+
639
648
context . sourceCode ;
640
649
context . sourceCode . getLocFromIndex ( 42 ) ;
641
650
You can’t perform that action at this time.
0 commit comments