Skip to content

Commit

Permalink
refactor: removes useless condition
Browse files Browse the repository at this point in the history
* Reported by ESLint.
* Condition now useless as we now filter on the last possible type: `TSConstructSignatureDeclaration`
  • Loading branch information
hugop95 committed Dec 12, 2024
1 parent 8aff66d commit e1b5e4d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions rules/sort-object-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -243,10 +243,8 @@ export let sortObjectTypeElements = <MessageIds extends string>({
name = formatName(
sourceCode.text.slice(typeElement.range.at(0), endIndex),
)
} else if (
typeElement.type === 'TSMethodSignature' &&
'name' in typeElement.key
) {
} else if ('name' in typeElement.key) {
// TSMethodSignature
;({ name } = typeElement.key)
/* v8 ignore next 8 - Unsure if we can reach it */
} else {
Expand Down

0 comments on commit e1b5e4d

Please sign in to comment.