File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
apps/oxlint/src-js/plugins Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,8 @@ interface InternalContext {
4444 ruleIndex : number ;
4545 // Absolute path of file being linted
4646 filePath : string ;
47+ // Options
48+ options : unknown [ ] ;
4749}
4850
4951/**
@@ -65,6 +67,7 @@ export class Context {
6567 id : fullRuleName ,
6668 filePath : '' ,
6769 ruleIndex : 0 ,
70+ options : [ ] ,
6871 } ;
6972 }
7073
@@ -84,6 +87,11 @@ export class Context {
8487 return this . #internal. filePath ;
8588 }
8689
90+ // Getter for options for file being linted.
91+ get options ( ) {
92+ return this . #internal. options ;
93+ }
94+
8795 /**
8896 * Report error.
8997 * @param diagnostic - Diagnostic object
@@ -98,6 +106,7 @@ export class Context {
98106
99107 static {
100108 setupContextForFile = ( context , ruleIndex , filePath ) => {
109+ // TODO: Support `options`
101110 const internal = context . #internal;
102111 internal . ruleIndex = ruleIndex ;
103112 internal . filePath = filePath ;
You can’t perform that action at this time.
0 commit comments