@@ -110,14 +110,36 @@ func (h *IPCHandler) HandleLint(req api.LintRequest) (*api.LintResponse, error)
110
110
var tsConfigs []string
111
111
var configDirectory string
112
112
113
- if req .LanguageOptions != nil && req .LanguageOptions .ParserOptions != nil && req .LanguageOptions .ParserOptions .Project != "" {
113
+ if req .LanguageOptions != nil && req .LanguageOptions .ParserOptions != nil && req .LanguageOptions .ParserOptions .Project != nil {
114
114
// Use project from languageOptions
115
115
configDirectory = currentDirectory
116
- projectPath := tspath .ResolvePath (currentDirectory , req .LanguageOptions .ParserOptions .Project )
117
- if ! fs .FileExists (projectPath ) {
118
- return nil , fmt .Errorf ("tsconfig file specified in languageOptions %q doesn't exist" , projectPath )
116
+
117
+ var projectPaths []string
118
+ switch project := req .LanguageOptions .ParserOptions .Project .(type ) {
119
+ case string :
120
+ if project != "" {
121
+ projectPaths = []string {project }
122
+ }
123
+ case []interface {}:
124
+ for _ , p := range project {
125
+ if str , ok := p .(string ); ok && str != "" {
126
+ projectPaths = append (projectPaths , str )
127
+ }
128
+ }
129
+ }
130
+
131
+ if len (projectPaths ) == 0 {
132
+ return nil , fmt .Errorf ("no valid project paths found in languageOptions" )
133
+ }
134
+
135
+ // Resolve and validate all project paths
136
+ for _ , projectPath := range projectPaths {
137
+ resolvedPath := tspath .ResolvePath (currentDirectory , projectPath )
138
+ if ! fs .FileExists (resolvedPath ) {
139
+ return nil , fmt .Errorf ("tsconfig file specified in languageOptions %q doesn't exist" , resolvedPath )
140
+ }
141
+ tsConfigs = append (tsConfigs , resolvedPath )
119
142
}
120
- tsConfigs = []string {projectPath }
121
143
} else {
122
144
// Use default configuration loading
123
145
_ , tsConfigs , configDirectory = rslintconfig .LoadConfigurationWithFallback (req .Config , currentDirectory , fs )
@@ -188,7 +210,16 @@ func (h *IPCHandler) HandleLint(req api.LintRequest) (*api.LintResponse, error)
188
210
// filter rule based on request.RuleOptions
189
211
if len (req .RuleOptions ) > 0 {
190
212
for _ , r := range origin_rules {
191
- if option , ok := req .RuleOptions [r .Name ]; ok {
213
+ // Try both short name and full @typescript-eslint/ prefixed name
214
+ var option interface {}
215
+ var found bool
216
+ if option , found = req .RuleOptions [r .Name ]; found {
217
+ // Found with short name (e.g., "member-ordering")
218
+ } else if option , found = req .RuleOptions ["@typescript-eslint/" + r .Name ]; found {
219
+ // Found with full name (e.g., "@typescript-eslint/member-ordering")
220
+ }
221
+
222
+ if found {
192
223
rulesWithOptions = append (rulesWithOptions , RuleWithOption {
193
224
rule : r ,
194
225
option : option ,
0 commit comments