diff --git a/__tests__/backend/listFolders.test.ts b/__tests__/backend/listFolders.test.ts index 4d8cbc8a..812312c6 100644 --- a/__tests__/backend/listFolders.test.ts +++ b/__tests__/backend/listFolders.test.ts @@ -6,14 +6,12 @@ import { SafeDriveService_ } from "../../src/backend/utils/SafeDriveService"; import { mockedSession } from "../test-utils/gas-stubs"; import { mockedSafeDriveService } from "../test-utils/SafeDriveService-stub"; -/* eslint-disable @typescript-eslint/naming-convention -- Properties are mock classes */ jest.mock<{ SafeDriveService_: jest.Mock }>( "../../src/backend/utils/SafeDriveService", () => ({ SafeDriveService_: jest.fn(), }), ); -/* eslint-enable */ test("listFolders works correctly", () => { interface ListFilesOptions { diff --git a/__tests__/backend/listSharedDrives.test.ts b/__tests__/backend/listSharedDrives.test.ts index 5b1de8ca..f0107346 100644 --- a/__tests__/backend/listSharedDrives.test.ts +++ b/__tests__/backend/listSharedDrives.test.ts @@ -5,14 +5,12 @@ import { listSharedDrives } from "../../src/backend/listSharedDrives"; import { SafeDriveService_ } from "../../src/backend/utils/SafeDriveService"; import { mockedSafeDriveService } from "../test-utils/SafeDriveService-stub"; -/* eslint-disable @typescript-eslint/naming-convention -- Properties are mock classes */ jest.mock<{ SafeDriveService_: jest.Mock }>( "../../src/backend/utils/SafeDriveService", () => ({ SafeDriveService_: jest.fn(), }), ); -/* eslint-enable */ test("listSharedDrives works correctly", () => { interface ListDrivesOptions { diff --git a/__tests__/backend/move.test.ts b/__tests__/backend/move.test.ts index 9140443c..630a1029 100644 --- a/__tests__/backend/move.test.ts +++ b/__tests__/backend/move.test.ts @@ -10,7 +10,6 @@ import { mockedMoveState } from "../test-utils/MoveState-stub"; jest.mock("../../src/backend/move/folderManagement"); jest.mock("../../src/backend/move/moveFolder"); -/* eslint-disable @typescript-eslint/naming-convention -- Properties are mock classes */ jest.mock<{ SafeDriveService_: jest.Mock }>( "../../src/backend/utils/SafeDriveService", () => ({ @@ -23,7 +22,6 @@ jest.mock<{ MoveState_: jest.Mock }>( MoveState_: jest.fn(), }), ); -/* eslint-enable */ test("move works correctly", () => { mocked(folderManagement).isFolderEmpty_.mockReturnValueOnce(true); diff --git a/__tests__/backend/utils/MoveState.test.ts b/__tests__/backend/utils/MoveState.test.ts index 4f79bed2..1baff1ee 100644 --- a/__tests__/backend/utils/MoveState.test.ts +++ b/__tests__/backend/utils/MoveState.test.ts @@ -6,11 +6,9 @@ import { MoveState_ } from "../../../src/backend/utils/MoveState"; import { mockedDriveBackedValue } from "../../test-utils/DriveBackedValue-stub"; import { mockedSafeDriveService } from "../../test-utils/SafeDriveService-stub"; -// eslint-disable-next-line @typescript-eslint/naming-convention -- property is class name jest.mock<{ DriveBackedValue_: jest.Mock }>( "../../../src/backend/utils/DriveBackedValue", () => ({ - // eslint-disable-next-line @typescript-eslint/naming-convention -- Mocking a class DriveBackedValue_: jest.fn(), }), ); diff --git a/__tests__/test-utils/gas-stubs.ts b/__tests__/test-utils/gas-stubs.ts index 95c939d7..91cf6884 100644 --- a/__tests__/test-utils/gas-stubs.ts +++ b/__tests__/test-utils/gas-stubs.ts @@ -1,7 +1,5 @@ import { jest } from "@jest/globals"; -/* eslint-disable @typescript-eslint/naming-convention -- These are stubs for external functions */ - export function mockedCommentsCollection(): GoogleAppsScript.Drive.Collection.CommentsCollection { return { get: jest.fn< @@ -470,5 +468,3 @@ export function mockedUtilities(): GoogleAppsScript.Utilities.Utilities { >(), }; } - -/* eslint-enable */ diff --git a/eslint.config.js b/eslint.config.js index e2402132..26fe3db4 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -10,8 +10,6 @@ import svelte from "eslint-plugin-svelte"; import svelteParser from "svelte-eslint-parser"; import tseslint from "typescript-eslint"; -/* eslint-disable @typescript-eslint/naming-convention -- Not applicable to this file */ - export default tseslint.config( js.configs.recommended, prettierRecommended, @@ -47,37 +45,6 @@ export default tseslint.config( "@typescript-eslint/explicit-module-boundary-types": "error", "@typescript-eslint/init-declarations": "error", "@typescript-eslint/method-signature-style": ["error", "method"], - "@typescript-eslint/naming-convention": [ - "error", - { - filter: { - match: false, - regex: "^(Comments|Drives|Files|Replies)$", - }, - format: ["camelCase"], - leadingUnderscore: "allow", - selector: "default", - trailingUnderscore: "allow", - }, - { - format: ["camelCase", "PascalCase"], - selector: "import", - }, - { - format: ["camelCase", "UPPER_CASE"], - leadingUnderscore: "allow", - selector: "variable", - trailingUnderscore: "allow", - }, - { - custom: { - match: true, - regex: "^(?:[A-Z][A-Za-z]*_?)?$", - }, - format: null, - selector: "typeLike", - }, - ], "@typescript-eslint/no-import-type-side-effects": "error", "@typescript-eslint/no-shadow": "error", "@typescript-eslint/no-unnecessary-parameter-property-assignment": @@ -328,5 +295,3 @@ export default tseslint.config( }, }, ); - -/* eslint-enable @typescript-eslint/naming-convention */ diff --git a/jest.config.js b/jest.config.js index d552d4a3..9eb6bee3 100644 --- a/jest.config.js +++ b/jest.config.js @@ -17,7 +17,6 @@ export default { resetMocks: true, testMatch: ["/__tests__/backend/**/*.test.ts"], transform: { - // eslint-disable-next-line @typescript-eslint/naming-convention -- The key is a glob. "^.+\\.ts$": [ "ts-jest", { diff --git a/src/backend/Drive-shim.d.ts b/src/backend/Drive-shim.d.ts index 970f69ee..437afbb9 100644 --- a/src/backend/Drive-shim.d.ts +++ b/src/backend/Drive-shim.d.ts @@ -1,2 +1,2 @@ -// eslint-disable-next-line no-var, @typescript-eslint/naming-convention -- GAS global, needs var +// eslint-disable-next-line no-var -- GAS global, needs var declare var Drive: GoogleAppsScript.Drive_v2;