Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 28 additions & 4 deletions biome.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"$schema": "https://biomejs.dev/schemas/1.8.0/schema.json",
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
"files": {
"maxSize": 5242880,
"ignore": ["**/__fixtures__/**", "package.json"]
"includes": ["**", "!**/__fixtures__/**", "!**/package.json"]
},
"formatter": {
"enabled": true,
Expand All @@ -16,7 +16,9 @@
"noForEach": "off"
},
"correctness": {
"noNewSymbol": "error",
"noInvalidBuiltinInstantiation": {
"level": "error"
},
"noUndeclaredVariables": "error",
"noUnusedVariables": "error"
},
Expand All @@ -25,7 +27,29 @@
"useConsistentArrayType": {
"level": "error",
"options": { "syntax": "shorthand" }
}
},
"useLiteralEnumMembers": "error",
"noCommaOperator": "error",
"useNodejsImportProtocol": "error",
"useAsConstAssertion": "error",
"useNumericLiterals": "error",
"useEnumInitializers": "error",
"useSelfClosingElements": "error",
"useConst": "error",
"useSingleVarDeclarator": "error",
"noUnusedTemplateLiteral": "error",
"useNumberNamespace": "error",
"noInferrableTypes": "error",
"useExponentiationOperator": "error",
"useTemplate": "error",
"noParameterAssign": "error",
"noNonNullAssertion": "error",
"useDefaultParameterLast": "error",
"noArguments": "error",
"useImportType": "error",
"useExportType": "error",
"noUselessElse": "error",
"useShorthandFunctionType": "error"
},
"suspicious": {
"noEmptyBlockStatements": "error"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"jscodeshift": "17.1.1"
},
"devDependencies": {
"@biomejs/biome": "1.9.0",
"@biomejs/biome": "2.0.0-beta.1",
"@changesets/cli": "^2.27.1",
"@tsconfig/node16": "^16.1.3",
"@types/jscodeshift": "^0.12.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { CLIENTS_TO_TEST } from "./config";
import { getClientNameWithLocalSuffix } from "./getClientNameWithLocalSuffix";
import { getClientNamesSortedByPackageName } from "./getClientNamesSortedByPackageName";
import { getClientNameWithLocalSuffix } from "./getClientNameWithLocalSuffix";
import { getV3ClientsNewExpressionCode } from "./getV3ClientsNewExpressionCode";
import { getV3PackageImportsCode } from "./getV3PackageImportsCode";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { CLIENTS_TO_TEST } from "./config";
import { getClientNameWithLocalSuffix } from "./getClientNameWithLocalSuffix";
import { getClientNamesSortedByPackageName } from "./getClientNamesSortedByPackageName";
import { getClientNameWithLocalSuffix } from "./getClientNameWithLocalSuffix";
import { getV3ClientsNewExpressionCode } from "./getV3ClientsNewExpressionCode";
import { getV3PackageImportEqualsCode } from "./getV3PackageImportEqualsCode";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { CLIENTS_TO_TEST } from "./config";
import { getClientNameWithLocalSuffix } from "./getClientNameWithLocalSuffix";
import { getClientNamesSortedByPackageName } from "./getClientNamesSortedByPackageName";
import { getClientNameWithLocalSuffix } from "./getClientNameWithLocalSuffix";
import { getV3ClientsNewExpressionCode } from "./getV3ClientsNewExpressionCode";
import { getV3PackageImportsCode } from "./getV3PackageImportsCode";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { CLIENTS_TO_TEST } from "./config";
import { getClientNameWithLocalSuffix } from "./getClientNameWithLocalSuffix";
import { getClientNamesSortedByPackageName } from "./getClientNamesSortedByPackageName";
import { getClientNameWithLocalSuffix } from "./getClientNameWithLocalSuffix";
import { getV3ClientsNewExpressionCode } from "./getV3ClientsNewExpressionCode";
import { getV3PackageRequiresCode } from "./getV3PackageRequiresCode";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { CLIENTS_TO_TEST } from "./config";
import { getClientNameWithLocalSuffix } from "./getClientNameWithLocalSuffix";
import { getClientNamesSortedByPackageName } from "./getClientNamesSortedByPackageName";
import { getClientNameWithLocalSuffix } from "./getClientNameWithLocalSuffix";
import { getV3ClientsNewExpressionCode } from "./getV3ClientsNewExpressionCode";
import { getV3PackageRequiresCode } from "./getV3PackageRequiresCode";

Expand Down
1 change: 0 additions & 1 deletion src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ try {
({ options, positionalArguments } = parser.parse());
if (positionalArguments.length === 0 && !options.stdin) {
process.stderr.write(
// biome-ignore lint/style/useTemplate: This is a multiline string
"Error: You have to provide at least one file/directory to transform." +
"\n\n---\n\n" +
parser.getHelpText()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ export const removePromiseForCallExpression = (
}
default: {
emitWarning(
// biome-ignore lint/style/useTemplate: This is a multiline string
`Removal of .promise() not implemented for parentPath: ${callExpression.parentPath.value.type}\n` +
`Code processed: ${j(callExpression.parentPath).toSource()}\n\n` +
"Please report your use case on https://github.com/aws/aws-sdk-js-codemod\n"
Expand Down
2 changes: 1 addition & 1 deletion src/transforms/v2-to-v3/apis/renameErrorCodeWithName.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type {
ASTPath,
ArrowFunctionExpression,
ASTPath,
CallExpression,
Collection,
FunctionExpression,
Expand Down
2 changes: 1 addition & 1 deletion src/transforms/v2-to-v3/apis/replaceAwsError.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Collection, JSCodeshift } from "jscodeshift";
import { type ImportType, addNamedModule } from "../modules";
import { addNamedModule, type ImportType } from "../modules";

export interface ReplaceAwsErrorOptions {
v2GlobalName?: string;
Expand Down
2 changes: 1 addition & 1 deletion src/transforms/v2-to-v3/apis/replaceAwsIdentity.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Collection, JSCodeshift, NewExpression } from "jscodeshift";
import { AWS_CREDENTIALS_MAP, AWS_TOKEN_MAP } from "../config";
import { type ImportType, addNamedModule } from "../modules";
import { addNamedModule, type ImportType } from "../modules";

export interface ReplaceAwsCredentialsOptions {
v2GlobalName?: string;
Expand Down
2 changes: 1 addition & 1 deletion src/transforms/v2-to-v3/transformer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ import {
} from "./modules";
import { removeTypesFromTSQualifiedName, replaceTSTypeReference } from "./ts-type";
import {
IndentationType,
getFormattedSourceString,
getMostUsedIndentationType,
getMostUsedStringLiteralQuote,
getValueIndentedWithTabs,
IndentationType,
isTrailingCommaUsed,
isTypeScriptFile,
} from "./utils";
Expand Down
76 changes: 38 additions & 38 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -429,18 +429,18 @@ __metadata:
languageName: node
linkType: hard

"@biomejs/biome@npm:1.9.0":
version: 1.9.0
resolution: "@biomejs/biome@npm:1.9.0"
dependencies:
"@biomejs/cli-darwin-arm64": "npm:1.9.0"
"@biomejs/cli-darwin-x64": "npm:1.9.0"
"@biomejs/cli-linux-arm64": "npm:1.9.0"
"@biomejs/cli-linux-arm64-musl": "npm:1.9.0"
"@biomejs/cli-linux-x64": "npm:1.9.0"
"@biomejs/cli-linux-x64-musl": "npm:1.9.0"
"@biomejs/cli-win32-arm64": "npm:1.9.0"
"@biomejs/cli-win32-x64": "npm:1.9.0"
"@biomejs/biome@npm:2.0.0-beta.1":
version: 2.0.0-beta.1
resolution: "@biomejs/biome@npm:2.0.0-beta.1"
dependencies:
"@biomejs/cli-darwin-arm64": "npm:2.0.0-beta.1"
"@biomejs/cli-darwin-x64": "npm:2.0.0-beta.1"
"@biomejs/cli-linux-arm64": "npm:2.0.0-beta.1"
"@biomejs/cli-linux-arm64-musl": "npm:2.0.0-beta.1"
"@biomejs/cli-linux-x64": "npm:2.0.0-beta.1"
"@biomejs/cli-linux-x64-musl": "npm:2.0.0-beta.1"
"@biomejs/cli-win32-arm64": "npm:2.0.0-beta.1"
"@biomejs/cli-win32-x64": "npm:2.0.0-beta.1"
dependenciesMeta:
"@biomejs/cli-darwin-arm64":
optional: true
Expand All @@ -460,62 +460,62 @@ __metadata:
optional: true
bin:
biome: bin/biome
checksum: 10c0/b07ad2c8dc3d52c0a4eea37f98d36399b33a13759903aa65f9678db916810b773fe94937c304899158479bccd8c3c90f0f30af22b34d6dc5963774f1acc5e245
checksum: 10c0/6bbe214a0be6e6adc411ff4f6d9c74f082ba0bf02967a956cc91c2bad7ad9664a18e3c2404d4b8df091df5c8bd8d9f0d47946b508adc98be3709d08abe828511
languageName: node
linkType: hard

"@biomejs/cli-darwin-arm64@npm:1.9.0":
version: 1.9.0
resolution: "@biomejs/cli-darwin-arm64@npm:1.9.0"
"@biomejs/cli-darwin-arm64@npm:2.0.0-beta.1":
version: 2.0.0-beta.1
resolution: "@biomejs/cli-darwin-arm64@npm:2.0.0-beta.1"
conditions: os=darwin & cpu=arm64
languageName: node
linkType: hard

"@biomejs/cli-darwin-x64@npm:1.9.0":
version: 1.9.0
resolution: "@biomejs/cli-darwin-x64@npm:1.9.0"
"@biomejs/cli-darwin-x64@npm:2.0.0-beta.1":
version: 2.0.0-beta.1
resolution: "@biomejs/cli-darwin-x64@npm:2.0.0-beta.1"
conditions: os=darwin & cpu=x64
languageName: node
linkType: hard

"@biomejs/cli-linux-arm64-musl@npm:1.9.0":
version: 1.9.0
resolution: "@biomejs/cli-linux-arm64-musl@npm:1.9.0"
"@biomejs/cli-linux-arm64-musl@npm:2.0.0-beta.1":
version: 2.0.0-beta.1
resolution: "@biomejs/cli-linux-arm64-musl@npm:2.0.0-beta.1"
conditions: os=linux & cpu=arm64 & libc=musl
languageName: node
linkType: hard

"@biomejs/cli-linux-arm64@npm:1.9.0":
version: 1.9.0
resolution: "@biomejs/cli-linux-arm64@npm:1.9.0"
"@biomejs/cli-linux-arm64@npm:2.0.0-beta.1":
version: 2.0.0-beta.1
resolution: "@biomejs/cli-linux-arm64@npm:2.0.0-beta.1"
conditions: os=linux & cpu=arm64 & libc=glibc
languageName: node
linkType: hard

"@biomejs/cli-linux-x64-musl@npm:1.9.0":
version: 1.9.0
resolution: "@biomejs/cli-linux-x64-musl@npm:1.9.0"
"@biomejs/cli-linux-x64-musl@npm:2.0.0-beta.1":
version: 2.0.0-beta.1
resolution: "@biomejs/cli-linux-x64-musl@npm:2.0.0-beta.1"
conditions: os=linux & cpu=x64 & libc=musl
languageName: node
linkType: hard

"@biomejs/cli-linux-x64@npm:1.9.0":
version: 1.9.0
resolution: "@biomejs/cli-linux-x64@npm:1.9.0"
"@biomejs/cli-linux-x64@npm:2.0.0-beta.1":
version: 2.0.0-beta.1
resolution: "@biomejs/cli-linux-x64@npm:2.0.0-beta.1"
conditions: os=linux & cpu=x64 & libc=glibc
languageName: node
linkType: hard

"@biomejs/cli-win32-arm64@npm:1.9.0":
version: 1.9.0
resolution: "@biomejs/cli-win32-arm64@npm:1.9.0"
"@biomejs/cli-win32-arm64@npm:2.0.0-beta.1":
version: 2.0.0-beta.1
resolution: "@biomejs/cli-win32-arm64@npm:2.0.0-beta.1"
conditions: os=win32 & cpu=arm64
languageName: node
linkType: hard

"@biomejs/cli-win32-x64@npm:1.9.0":
version: 1.9.0
resolution: "@biomejs/cli-win32-x64@npm:1.9.0"
"@biomejs/cli-win32-x64@npm:2.0.0-beta.1":
version: 2.0.0-beta.1
resolution: "@biomejs/cli-win32-x64@npm:2.0.0-beta.1"
conditions: os=win32 & cpu=x64
languageName: node
linkType: hard
Expand Down Expand Up @@ -1205,7 +1205,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "aws-sdk-js-codemod@workspace:."
dependencies:
"@biomejs/biome": "npm:1.9.0"
"@biomejs/biome": "npm:2.0.0-beta.1"
"@changesets/cli": "npm:^2.27.1"
"@tsconfig/node16": "npm:^16.1.3"
"@types/jscodeshift": "npm:^0.12.0"
Expand Down