diff --git a/.eslintrc.json b/.eslintrc.json index 68ec7b912..69f7cdd82 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -25,40 +25,6 @@ // @typescript-eslint/eslint-plugin "@typescript-eslint/ban-ts-comment": "warn", - "@typescript-eslint/ban-types": [ - "error", - { - "types": { - "String": { - "message": "Use string instead", - "fixWith": "string" - }, - "Boolean": { - "message": "Use boolean instead", - "fixWith": "boolean" - }, - "Number": { - "message": "Use number instead", - "fixWith": "number" - }, - "Symbol": { - "message": "Use symbol instead", - "fixWith": "symbol" - }, - "Object": { - "message": "Use object instead", - "fixWith": "object" - }, - "Function": { - "message": "The `Function` type accepts any function-like value.\nIt provides no type safety when calling the function, which can be a common source of bugs.\nIt also accepts things like class declarations, which will throw at runtime as they will not be called with `new`.\nIf you are expecting the function to accept certain arguments, you should explicitly define the function shape." - }, - "{}": { - "message": "`{}` actually means \"any non-nullish value\".\n- If you want a type meaning \"any object\", you probably want `object` instead.\n- If you want a type meaning \"any value\", you probably want `unknown` instead.\n- If you want a type meaning \"empty object\", you probably want `Record` instead." - } - }, - "extendDefaults": false - } - ], "@typescript-eslint/consistent-type-definitions": ["error", "interface"], "@typescript-eslint/explicit-module-boundary-types": "off", "@typescript-eslint/no-empty-function": "off", diff --git a/__tests__/internals/kratos-middleware.ts b/__tests__/internals/kratos-middleware.ts index e105c7b5f..77808cb75 100644 --- a/__tests__/internals/kratos-middleware.ts +++ b/__tests__/internals/kratos-middleware.ts @@ -137,7 +137,7 @@ function fetchKratosRegister({ ) } -function fetchKratosSingleLogout(body?: string | undefined) { +function fetchKratosSingleLogout(body?: string) { return fetch( bypass(`http://localhost:${port}/kratos/single-logout`, { method: 'POST', diff --git a/__tests__/schema/subject.ts b/__tests__/schema/subject.ts index 5a727d24c..8402360cd 100644 --- a/__tests__/schema/subject.ts +++ b/__tests__/schema/subject.ts @@ -99,17 +99,18 @@ test('`Subject.unrevisedEntities` shows new revisions first', async () => { }) .execute() const subjectsChangedOrder = [...subjects] - ;(subjectsChangedOrder[4] = { + subjectsChangedOrder[4] = { unrevisedEntities: { nodes: [ { __typename: 'Article', id: 35247 }, { __typename: 'Article', id: 34907 }, ], }, - }), - await query.shouldReturnData({ - subject: { - subjects: subjectsChangedOrder, - }, - }) + } + + await query.shouldReturnData({ + subject: { + subjects: subjectsChangedOrder, + }, + }) }) diff --git a/packages/db-migrations/src/utils/create-migration.ts b/packages/db-migrations/src/utils/create-migration.ts index bb451723f..3417013db 100644 --- a/packages/db-migrations/src/utils/create-migration.ts +++ b/packages/db-migrations/src/utils/create-migration.ts @@ -125,7 +125,7 @@ async function changeUuidContents({ try { // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment oldState = JSON.parse(uuid.content) - } catch (e) { + } catch { // Ignore (some articles have raw text) continue } diff --git a/packages/server/src/internals/graphql/schema.ts b/packages/server/src/internals/graphql/schema.ts index cb34eaedb..61fdf4ec9 100644 --- a/packages/server/src/internals/graphql/schema.ts +++ b/packages/server/src/internals/graphql/schema.ts @@ -4,7 +4,7 @@ import * as R from 'ramda' import { ResolversParentTypes } from '~/types' export interface Schema { - // eslint-disable-next-line @typescript-eslint/ban-types + // eslint-disable-next-line @typescript-eslint/no-empty-object-type resolvers: {} typeDefs: DocumentNode[] }