From 281aeae26bf7a58146e2a5f6dd806982aa65ed60 Mon Sep 17 00:00:00 2001 From: Mariano Goldman Date: Mon, 1 Jul 2024 17:39:15 -0300 Subject: [PATCH] fix all linter warnings --- .eslintrc.json | 13 ++++++++++++- .../1623671909421_delete_failed_deployments.ts | 2 +- .../1626373645256_move_wearables_to_failed.ts | 2 +- ...1627050999792_remove_invalid_failed_wearables.ts | 2 +- .../1657560713689_drop_pointer_history_table.ts | 4 ++-- ...57560812218_drop_last_deployed_pointers_table.ts | 4 ++-- lambdas/src/utils/SmartContentClient.ts | 13 ++++--------- 7 files changed, 23 insertions(+), 17 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 036d850e1..b36bbac6b 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -17,6 +17,17 @@ "@typescript-eslint/no-inferrable-types": 0, "@typescript-eslint/no-empty-function": "off", "@typescript-eslint/no-explicit-any": "off", - "@typescript-eslint/no-floating-promises": 2 + "@typescript-eslint/no-floating-promises": 2, + "@typescript-eslint/no-non-null-assertion": "off", + "@typescript-eslint/no-unused-vars": [ + "warn", + { + "ignoreRestSiblings": true, + "argsIgnorePattern": "^_", + "varsIgnorePattern": "^_", + "caughtErrorsIgnorePattern": "^_" + } + ] + } } diff --git a/content/src/migrations/scripts/1623671909421_delete_failed_deployments.ts b/content/src/migrations/scripts/1623671909421_delete_failed_deployments.ts index 579091128..aa0c61bca 100644 --- a/content/src/migrations/scripts/1623671909421_delete_failed_deployments.ts +++ b/content/src/migrations/scripts/1623671909421_delete_failed_deployments.ts @@ -18,4 +18,4 @@ export async function up(pgm: MigrationBuilder): Promise { ) } -export async function down(pgm: MigrationBuilder): Promise {} +export async function down(_pgm: MigrationBuilder): Promise {} diff --git a/content/src/migrations/scripts/1626373645256_move_wearables_to_failed.ts b/content/src/migrations/scripts/1626373645256_move_wearables_to_failed.ts index 67856457f..d1b135d11 100644 --- a/content/src/migrations/scripts/1626373645256_move_wearables_to_failed.ts +++ b/content/src/migrations/scripts/1626373645256_move_wearables_to_failed.ts @@ -13,4 +13,4 @@ export async function up(pgm: MigrationBuilder): Promise { ) } -export async function down(pgm: MigrationBuilder): Promise {} +export async function down(_pgm: MigrationBuilder): Promise {} diff --git a/content/src/migrations/scripts/1627050999792_remove_invalid_failed_wearables.ts b/content/src/migrations/scripts/1627050999792_remove_invalid_failed_wearables.ts index 98f88b707..1426f622c 100644 --- a/content/src/migrations/scripts/1627050999792_remove_invalid_failed_wearables.ts +++ b/content/src/migrations/scripts/1627050999792_remove_invalid_failed_wearables.ts @@ -14,4 +14,4 @@ export async function up(pgm: MigrationBuilder): Promise { ) } -export async function down(pgm: MigrationBuilder): Promise {} +export async function down(_pgm: MigrationBuilder): Promise {} diff --git a/content/src/migrations/scripts/1657560713689_drop_pointer_history_table.ts b/content/src/migrations/scripts/1657560713689_drop_pointer_history_table.ts index 3b226c9ea..25fee868a 100644 --- a/content/src/migrations/scripts/1657560713689_drop_pointer_history_table.ts +++ b/content/src/migrations/scripts/1657560713689_drop_pointer_history_table.ts @@ -1,10 +1,10 @@ import { MigrationBuilder } from 'node-pg-migrate' -export async function up(pgm: MigrationBuilder): Promise { +export async function up(_pgm: MigrationBuilder): Promise { // pgm.dropTable('pointer_history') } -export async function down(pgm: MigrationBuilder): Promise { +export async function down(_pgm: MigrationBuilder): Promise { // pgm.createTable( // 'pointer_history', // { diff --git a/content/src/migrations/scripts/1657560812218_drop_last_deployed_pointers_table.ts b/content/src/migrations/scripts/1657560812218_drop_last_deployed_pointers_table.ts index a2af68768..29b497287 100644 --- a/content/src/migrations/scripts/1657560812218_drop_last_deployed_pointers_table.ts +++ b/content/src/migrations/scripts/1657560812218_drop_last_deployed_pointers_table.ts @@ -1,10 +1,10 @@ import { MigrationBuilder } from 'node-pg-migrate' -export async function up(pgm: MigrationBuilder): Promise { +export async function up(_pgm: MigrationBuilder): Promise { // pgm.dropTable('last_deployed_pointers') } -export async function down(pgm: MigrationBuilder): Promise { +export async function down(_pgm: MigrationBuilder): Promise { // pgm.createTable( // 'last_deployed_pointers', // { diff --git a/lambdas/src/utils/SmartContentClient.ts b/lambdas/src/utils/SmartContentClient.ts index 176a29f63..ae7139f45 100644 --- a/lambdas/src/utils/SmartContentClient.ts +++ b/lambdas/src/utils/SmartContentClient.ts @@ -123,23 +123,18 @@ export class SmartContentClient implements ContentClient { return this.onlyKnownHeaders(response.headers as any) } - deployEntity(deployData: DeploymentData, fix?: boolean, options?: RequestOptions): Promise { + deployEntity(_deployData: DeploymentData, _fix?: boolean, _options?: RequestOptions): Promise { throw new Error('New deployments are currently not supported') } - deploy(deployData: DeploymentData, options?: RequestOptions): Promise { + deploy(_deployData: DeploymentData, _options?: RequestOptions): Promise { throw new Error('New deployments are currently not supported') } - buildEntity({ type, pointers, files, metadata }: BuildEntityOptions): Promise { + buildEntity(_: BuildEntityOptions): Promise { throw new Error('New deployments are currently not supported') } - buildEntityWithoutNewFiles({ - type, - pointers, - hashesByKey, - metadata - }: BuildEntityWithoutFilesOptions): Promise { + buildEntityWithoutNewFiles(_: BuildEntityWithoutFilesOptions): Promise { throw new Error('New deployments are currently not supported') }