Skip to content

Commit e441944

Browse files
authored
Replace @ts-ignore with @ts-expect-error (#911)
1 parent 4b2d64d commit e441944

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/transforms/v2-to-v3/ts-type/getTypeForString.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export const getTypeForString = (
3131
return j.tsTypeReference.from({
3232
typeName: j.identifier("Array"),
3333

34-
// @ts-ignore
34+
// @ts-expect-error Type 'TSType' is not assignable to type 'TSTypeKind'.
3535
typeParameters: j.tsTypeParameterInstantiation([typeArgument]),
3636
});
3737
}
@@ -43,7 +43,7 @@ export const getTypeForString = (
4343
return j.tsTypeReference.from({
4444
typeName: j.identifier("Record"),
4545

46-
// @ts-ignore
46+
// @ts-expect-error Type 'TSType' is not assignable to type 'TSTypeKind'.
4747
typeParameters: j.tsTypeParameterInstantiation([j.tsStringKeyword(), typeArgument]),
4848
});
4949
}

src/transforms/v2-to-v3/utils/getMostUsedStringLiteralQuote.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export const getMostUsedStringLiteralQuote = (
1919

2020
// Check if the literal value is a string and contains single quotes
2121
if (typeof value === "string") {
22-
// @ts-ignore Property 'raw' does not exist on type 'Literal'.
22+
// @ts-expect-error Property 'raw' does not exist on type 'Literal'.
2323
const rawValue = path.node.raw || path.node.extra?.raw || "";
2424
if (rawValue.startsWith("'")) {
2525
quoteCount[StringLiteralQuoteType.SINGLE]++;

src/transforms/v2-to-v3/utils/isTrailingCommaUsed.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type { Collection, JSCodeshift } from "jscodeshift";
22

33
export const isTrailingCommaUsed = (j: JSCodeshift, source: Collection<unknown>) => {
44
for (const node of source.find(j.ObjectExpression).nodes()) {
5-
// @ts-ignore Property 'extra' does not exist on type 'ObjectExpression'.
5+
// @ts-expect-error Property 'extra' does not exist on type 'ObjectExpression'.
66
if (node.extra?.trailingComma) {
77
return true;
88
}

0 commit comments

Comments
 (0)