Skip to content

Commit 90140cc

Browse files
fix: remove unused function and fix empty branch
- Remove unused isMemberTypesNever function - Refactor empty branch in api.go to avoid staticcheck warning 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent d2753cd commit 90140cc

File tree

2 files changed

+3
-16
lines changed

2 files changed

+3
-16
lines changed

cmd/rslint/api.go

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -216,12 +216,9 @@ func (h *IPCHandler) HandleLint(req api.LintRequest) (*api.LintResponse, error)
216216
// Try both short name and full @typescript-eslint/ prefixed name
217217
var option interface{}
218218
var found bool
219-
if option, found = req.RuleOptions[r.Name]; found {
220-
// Found with short name (e.g., "member-ordering")
221-
// option and found are set correctly by the if condition
222-
} else if option, found = req.RuleOptions["@typescript-eslint/"+r.Name]; found {
223-
// Found with full name (e.g., "@typescript-eslint/member-ordering")
224-
// option and found are set correctly by the if condition
219+
if option, found = req.RuleOptions[r.Name]; !found {
220+
// Try with full @typescript-eslint/ prefix
221+
option, found = req.RuleOptions["@typescript-eslint/"+r.Name]
225222
}
226223

227224
if found {

internal/rules/member_ordering/member_ordering.go

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -858,16 +858,6 @@ func normalizeOrderForCompare(order Order) Order {
858858
}
859859
}
860860

861-
// isMemberTypesNever returns true if the memberTypes config is set to "never"
862-
func isMemberTypesNever(cfg *OrderConfig) bool {
863-
if cfg == nil {
864-
return false
865-
}
866-
if str, ok := cfg.MemberTypes.(string); ok && str == "never" {
867-
return true
868-
}
869-
return false
870-
}
871861

872862
func checkRequiredOrder(ctx rule.RuleContext, members []*ast.Node, optionalityOrder OptionalityOrder) bool {
873863
switchIndex := -1

0 commit comments

Comments
 (0)