Skip to content

Commit 9ce31c8

Browse files
authored
Turn off @typescript-eslint/ban-ts-comment (#885)
1 parent 24d805c commit 9ce31c8

File tree

7 files changed

+4
-9
lines changed

7 files changed

+4
-9
lines changed

.eslintrc.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
"format": ["camelCase", "UPPER_CASE", "PascalCase"],
2222
"leadingUnderscore": "allow"
2323
}
24-
]
24+
],
25+
"@typescript-eslint/ban-ts-comment": "off"
2526
},
2627
"ignorePatterns": ["__fixtures__"]
2728
}

src/cli.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
// Most of the code from here is from bin/jscodeshift.js
2222
// It's kept that way so that users can reuse jscodeshift options.
2323

24-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
2524
// @ts-nocheck
2625
import path from "path";
2726
import Runner from "jscodeshift/dist/Runner";

src/transforms/v2-to-v3/client-instances/getObjectWithUpdatedAwsConfigKeys.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ export const getObjectWithUpdatedAwsConfigKeys = (
113113
})
114114
.filter((property) => property !== undefined);
115115

116-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
117116
// @ts-ignore is Argument is not assignable to parameter
118117
return j.objectExpression(updatedProperties);
119118
};

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export const getTypeForString = (
3030
const typeArgument = getTypeForString(j, v2ClientLocalName, type);
3131
return j.tsTypeReference.from({
3232
typeName: j.identifier("Array"),
33-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
33+
3434
// @ts-ignore
3535
typeParameters: j.tsTypeParameterInstantiation([typeArgument]),
3636
});
@@ -42,7 +42,7 @@ export const getTypeForString = (
4242
const typeArgument = getTypeForString(j, v2ClientLocalName, type);
4343
return j.tsTypeReference.from({
4444
typeName: j.identifier("Record"),
45-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
45+
4646
// @ts-ignore
4747
typeParameters: j.tsTypeParameterInstantiation([j.tsStringKeyword(), typeArgument]),
4848
});

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

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

2020
// Check if the literal value is a string and contains single quotes
2121
if (typeof value === "string") {
22-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
2322
// @ts-ignore Property 'raw' does not exist on type 'Literal'.
2423
const rawValue = path.node.raw || path.node.extra?.raw || "";
2524
if (rawValue.startsWith("'")) {

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { 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-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
65
// @ts-ignore Property 'extra' does not exist on type 'ObjectExpression'.
76
if (node.extra && node.extra.trailingComma) {
87
return true;

src/utils/getJsCodeshiftParser.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
// Most of the code from here is from bin/jscodeshift.js
22
// It's kept that way so that users can reuse jscodeshift options.
33

4-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
54
// @ts-nocheck
65

76
import { readFileSync } from "fs";
87
import { dirname, join } from "path";
98
import { DEFAULT_EXTENSIONS } from "@babel/core";
109
import argsParser from "jscodeshift/dist/argsParser";
1110

12-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
1311
// @ts-ignore: package.json will be imported from dist folders
1412
import { version } from "../../package.json";
1513

0 commit comments

Comments
 (0)