Skip to content

Commit

Permalink
chore: bump typescript-eslint to v8 (#753)
Browse files Browse the repository at this point in the history
* chore: bump typescript-eslint to v8

* 8.0.0 stable
  • Loading branch information
JoshuaKGoldberg authored Sep 12, 2024
1 parent 3a9a8fe commit ccf9673
Show file tree
Hide file tree
Showing 9 changed files with 530 additions and 504 deletions.
14 changes: 7 additions & 7 deletions lib/rules/no-dupe-disjunctions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ function containsAssertions(expression: NoParent<Expression>): boolean {
},
})
return false
} catch (_error) {
} catch {
return true
}
}
Expand All @@ -129,7 +129,7 @@ function containsAssertionsOrUnknowns(
},
})
return false
} catch (_error) {
} catch {
return true
}
}
Expand Down Expand Up @@ -185,7 +185,7 @@ function toNFA(
),
partial: containsAssertionsOrUnknowns(e),
}
} catch (_error) {
} catch {
return {
nfa: NFA.empty({
maxCharacter: parser.maxCharacter,
Expand Down Expand Up @@ -303,7 +303,7 @@ function* iteratePartialAlternatives(
const expression = partialParser.parse(alternative, nested)
const nfa = NFA.fromRegex(expression, { maxCharacter })
yield { nested, nfa }
} catch (_error) {
} catch {
// ignore error and skip this
}
}
Expand Down Expand Up @@ -339,7 +339,7 @@ function isSubsetOf(
a.minimize()
b.minimize()
return a.structurallyEqual(b)
} catch (_error) {
} catch {
return null
}
}
Expand Down Expand Up @@ -381,7 +381,7 @@ function getSubsetRelation(
return SubsetRelation.leftSupersetOfRight
}
return SubsetRelation.none
} catch (_error) {
} catch {
return SubsetRelation.unknown
}
}
Expand Down Expand Up @@ -450,7 +450,7 @@ function faToSource(fa: FiniteAutomaton, flags: ReadonlyFlags): string {
try {
assertValidFlags(flags)
return JS.toLiteral(fa.toRegex(), { flags }).source
} catch (_error) {
} catch {
return "<ERROR>"
}
}
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/require-unicode-regexp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function isSyntacticallyCompatible(pattern: Pattern): false | Pattern {
undefined,
{ unicode: true },
)
} catch (_error) {
} catch {
return false
}

Expand Down
2 changes: 1 addition & 1 deletion lib/rules/require-unicode-sets-regexp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function isCompatible(regexpContext: RegExpContext): boolean {
new RegExpParser().parsePattern(pattern, undefined, undefined, {
unicodeSets: true,
})
} catch (_error) {
} catch {
return false
}

Expand Down
2 changes: 1 addition & 1 deletion lib/rules/simplify-set-operations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ function getParsedElement(
)
return element
}
} catch (_error) {
} catch {
// ignore
}
return null
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/sort-alternatives.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ function getLexicographicallySmallestFromAlternative(
)

return getLexicographicallySmallestFromNfa(nfa.initial, nfa.finals)
} catch (_error) {
} catch {
return undefined
}
}
Expand Down
11 changes: 2 additions & 9 deletions lib/utils/replacements-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,8 @@ type BaseReferenceElement<T> = {

export function parseReplacementsForString(
text: string,
): BaseReplacementElement<{
/* empty object */
}>[] {
return baseParseReplacements<
{
/* empty object */
},
{ value: string }
>(
): BaseReplacementElement<object>[] {
return baseParseReplacements<object, { value: string }>(
[...text].map((s) => ({ value: s })),
() => ({}),
)
Expand Down
4 changes: 2 additions & 2 deletions lib/utils/type-tracker/type-data/function.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,11 +184,11 @@ const RETURN_SELF = new TypeFunction(
},
)
const getPrototypes: () => {
// eslint-disable-next-line @typescript-eslint/ban-types -- ignore
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type -- ignore
[key in keyof Function]: TypeInfo | null
} = lazy(() =>
createObject<{
// eslint-disable-next-line @typescript-eslint/ban-types -- ignore
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type -- ignore
[key in keyof Function]: TypeInfo | null
}>({
...getObjectPrototypes(),
Expand Down
Loading

0 comments on commit ccf9673

Please sign in to comment.