Skip to content

Commit ccf9673

Browse files
authoredSep 12, 2024··
chore: bump typescript-eslint to v8 (#753)
* chore: bump typescript-eslint to v8 * 8.0.0 stable
1 parent 3a9a8fe commit ccf9673

9 files changed

+530
-504
lines changed
 

Diff for: ‎lib/rules/no-dupe-disjunctions.ts

+7-7
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ function containsAssertions(expression: NoParent<Expression>): boolean {
108108
},
109109
})
110110
return false
111-
} catch (_error) {
111+
} catch {
112112
return true
113113
}
114114
}
@@ -129,7 +129,7 @@ function containsAssertionsOrUnknowns(
129129
},
130130
})
131131
return false
132-
} catch (_error) {
132+
} catch {
133133
return true
134134
}
135135
}
@@ -185,7 +185,7 @@ function toNFA(
185185
),
186186
partial: containsAssertionsOrUnknowns(e),
187187
}
188-
} catch (_error) {
188+
} catch {
189189
return {
190190
nfa: NFA.empty({
191191
maxCharacter: parser.maxCharacter,
@@ -303,7 +303,7 @@ function* iteratePartialAlternatives(
303303
const expression = partialParser.parse(alternative, nested)
304304
const nfa = NFA.fromRegex(expression, { maxCharacter })
305305
yield { nested, nfa }
306-
} catch (_error) {
306+
} catch {
307307
// ignore error and skip this
308308
}
309309
}
@@ -339,7 +339,7 @@ function isSubsetOf(
339339
a.minimize()
340340
b.minimize()
341341
return a.structurallyEqual(b)
342-
} catch (_error) {
342+
} catch {
343343
return null
344344
}
345345
}
@@ -381,7 +381,7 @@ function getSubsetRelation(
381381
return SubsetRelation.leftSupersetOfRight
382382
}
383383
return SubsetRelation.none
384-
} catch (_error) {
384+
} catch {
385385
return SubsetRelation.unknown
386386
}
387387
}
@@ -450,7 +450,7 @@ function faToSource(fa: FiniteAutomaton, flags: ReadonlyFlags): string {
450450
try {
451451
assertValidFlags(flags)
452452
return JS.toLiteral(fa.toRegex(), { flags }).source
453-
} catch (_error) {
453+
} catch {
454454
return "<ERROR>"
455455
}
456456
}

Diff for: ‎lib/rules/require-unicode-regexp.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ function isSyntacticallyCompatible(pattern: Pattern): false | Pattern {
4848
undefined,
4949
{ unicode: true },
5050
)
51-
} catch (_error) {
51+
} catch {
5252
return false
5353
}
5454

Diff for: ‎lib/rules/require-unicode-sets-regexp.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ function isCompatible(regexpContext: RegExpContext): boolean {
4646
new RegExpParser().parsePattern(pattern, undefined, undefined, {
4747
unicodeSets: true,
4848
})
49-
} catch (_error) {
49+
} catch {
5050
return false
5151
}
5252

Diff for: ‎lib/rules/simplify-set-operations.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ function getParsedElement(
100100
)
101101
return element
102102
}
103-
} catch (_error) {
103+
} catch {
104104
// ignore
105105
}
106106
return null

Diff for: ‎lib/rules/sort-alternatives.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ function getLexicographicallySmallestFromAlternative(
230230
)
231231

232232
return getLexicographicallySmallestFromNfa(nfa.initial, nfa.finals)
233-
} catch (_error) {
233+
} catch {
234234
return undefined
235235
}
236236
}

Diff for: ‎lib/utils/replacements-utils.ts

+2-9
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,8 @@ type BaseReferenceElement<T> = {
1919

2020
export function parseReplacementsForString(
2121
text: string,
22-
): BaseReplacementElement<{
23-
/* empty object */
24-
}>[] {
25-
return baseParseReplacements<
26-
{
27-
/* empty object */
28-
},
29-
{ value: string }
30-
>(
22+
): BaseReplacementElement<object>[] {
23+
return baseParseReplacements<object, { value: string }>(
3124
[...text].map((s) => ({ value: s })),
3225
() => ({}),
3326
)

Diff for: ‎lib/utils/type-tracker/type-data/function.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -184,11 +184,11 @@ const RETURN_SELF = new TypeFunction(
184184
},
185185
)
186186
const getPrototypes: () => {
187-
// eslint-disable-next-line @typescript-eslint/ban-types -- ignore
187+
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type -- ignore
188188
[key in keyof Function]: TypeInfo | null
189189
} = lazy(() =>
190190
createObject<{
191-
// eslint-disable-next-line @typescript-eslint/ban-types -- ignore
191+
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type -- ignore
192192
[key in keyof Function]: TypeInfo | null
193193
}>({
194194
...getObjectPrototypes(),

0 commit comments

Comments
 (0)
Please sign in to comment.