File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1174,13 +1174,13 @@ export namespace Rule {
11741174 }
11751175
11761176 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+ } > {
11841184 /*
11851185 * Need to extend the `RuleContext` interface to include the
11861186 * deprecated methods that have not yet been removed.
Original file line number Diff line number Diff line change @@ -613,6 +613,13 @@ rule = {
613613 hasSuggestions : true ,
614614 } ,
615615} ;
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+ } ;
616623
617624rule = {
618625 create ( context : Rule . RuleContext ) {
@@ -636,6 +643,8 @@ rule = {
636643 context . languageOptions
637644 . ecmaVersion satisfies Linter . LanguageOptions [ "ecmaVersion" ] ;
638645
646+ context . options ; // $ExpectType any[]
647+
639648 context . sourceCode ;
640649 context . sourceCode . getLocFromIndex ( 42 ) ;
641650
You can’t perform that action at this time.
0 commit comments