diff --git a/design-system/packages/core/src/components/Link.tsx b/design-system/packages/core/src/components/Link.tsx index df3321ffb89..d23cc6b032c 100644 --- a/design-system/packages/core/src/components/Link.tsx +++ b/design-system/packages/core/src/components/Link.tsx @@ -5,7 +5,7 @@ import { jsx } from '../emotion' import { useTheme } from '../theme' import { forwardRefWithAs } from '../utils' -export const Link = forwardRefWithAs<'a', {}>(({ as: Tag = 'a', ...props }, ref) => { +export const Link = forwardRefWithAs<'a', unknown>(({ as: Tag = 'a', ...props }, ref) => { const { typography, colors } = useTheme() const styles = { diff --git a/design-system/packages/fields/src/FieldContainer.tsx b/design-system/packages/fields/src/FieldContainer.tsx index a14e34b4061..6bef2fcf039 100644 --- a/design-system/packages/fields/src/FieldContainer.tsx +++ b/design-system/packages/fields/src/FieldContainer.tsx @@ -2,6 +2,6 @@ /** @jsx jsx */ import { jsx, forwardRefWithAs } from '@keystone-ui/core' -export const FieldContainer = forwardRefWithAs<'div', {}>(({ as: Tag = 'div', ...props }, ref) => { +export const FieldContainer = forwardRefWithAs<'div', unknown>(({ as: Tag = 'div', ...props }, ref) => { return }) diff --git a/eslint.config.js b/eslint.config.mjs similarity index 85% rename from eslint.config.js rename to eslint.config.mjs index 0f4f6d17b92..9a8b9950840 100644 --- a/eslint.config.js +++ b/eslint.config.mjs @@ -1,23 +1,28 @@ // @ts-check -const eslint = require('@eslint/js') -const tseslint = require('typescript-eslint') +import eslint from '@eslint/js' +import tseslint from 'typescript-eslint' +import stylisticTs from '@stylistic/eslint-plugin-ts' -module.exports = tseslint.config( +export default tseslint.config( { ignores: [ '**/.keystone/', + '**/.next/', '**/dist/', + '**/__generated__/', '**/node_modules/', '**/syntax-error.js', '**/public/', - 'examples/extend-graphql-schema-nexus/nexus-types.ts' + 'examples/', ], }, eslint.configs.recommended, ...tseslint.configs.strict, -// ...tseslint.configs.stylistic, { + plugins: { + '@stylistic/ts': stylisticTs, + }, rules: { // TODO: remove 'no-empty': 'off', @@ -50,7 +55,7 @@ module.exports = tseslint.config( 'space-before-blocks': ['error', 'always'], 'space-before-function-paren': ['error', 'always'], 'space-in-parens': ['error', 'never'], - '@typescript-eslint/member-delimiter-style': [ + '@stylistic/ts/member-delimiter-style': [ 'error', { multiline: { delimiter: 'none' }, @@ -64,7 +69,7 @@ module.exports = tseslint.config( }], '@typescript-eslint/no-explicit-any': 'off', '@typescript-eslint/prefer-ts-expect-error': 'error', - '@typescript-eslint/semi': ['error', 'never'], + '@stylistic/ts/semi': ['error', 'never'], } } ) diff --git a/package.json b/package.json index 92cc451adac..df98fba230d 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,8 @@ "test:types": "tsc", "test:debug": "node --inspect-brk ./node_modules/.bin/jest", "test:admin-ui": "jest tests/admin-ui-tests", + "lint": "eslint", + "lint:fix": "eslint --fix", "build": "preconstruct build", "prepare": "preconstruct dev" }, @@ -30,6 +32,7 @@ "@changesets/get-release-plan": "^4.0.0", "@eslint/js": "^9.2.0", "@preconstruct/cli": "2.8.8", + "@stylistic/eslint-plugin-ts": "^2.9.0", "@types/jest": "^29.0.0", "@types/node": "^20.0.0", "@types/node-fetch": "^2.5.12", diff --git a/packages/auth/src/components/Icons.tsx b/packages/auth/src/components/Icons.tsx index e9c48cd737e..19f2891e4bd 100644 --- a/packages/auth/src/components/Icons.tsx +++ b/packages/auth/src/components/Icons.tsx @@ -64,7 +64,7 @@ export const IconGithub = (props: any) => ( // Misc // ============================== -const A11yText = forwardRefWithAs<'span', {}>(({ as: Tag = 'span', ...props }, ref) => ( +const A11yText = forwardRefWithAs<'span', unknown>(({ as: Tag = 'span', ...props }, ref) => ( graphql: { names: GraphQLNames - }, + } pageSize: number initialColumns: Array diff --git a/packages/core/src/fields/non-null-graphql.ts b/packages/core/src/fields/non-null-graphql.ts index f2438b7311b..7886569c836 100644 --- a/packages/core/src/fields/non-null-graphql.ts +++ b/packages/core/src/fields/non-null-graphql.ts @@ -20,19 +20,19 @@ export function resolveDbNullable ( export function makeValidateHook ( meta: FieldData, config: { - label?: string, + label?: string db?: { isNullable?: boolean - }, + } graphql?: { isNonNull?: { read?: boolean } - }, + } validation?: { isRequired?: boolean [key: string]: unknown - }, + } }, f?: ValidateFieldHook ) { diff --git a/packages/core/src/fields/resolve-hooks.ts b/packages/core/src/fields/resolve-hooks.ts index e093cfc081f..68b21281498 100644 --- a/packages/core/src/fields/resolve-hooks.ts +++ b/packages/core/src/fields/resolve-hooks.ts @@ -26,7 +26,7 @@ function resolveValidateHooks ({ validate, validateInput, validateDelete -}: FieldHooks): Exclude["validate"], Function> | undefined { +}: FieldHooks): Exclude['validate'], (...args: any) => any> | undefined { if (!validate && !validateInput && !validateDelete) return return { create: merge(validateInput, typeof validate === 'function' ? validate : validate?.create), diff --git a/packages/core/src/fields/types/calendarDay/index.ts b/packages/core/src/fields/types/calendarDay/index.ts index 89e37f182c9..4e541516ca5 100644 --- a/packages/core/src/fields/types/calendarDay/index.ts +++ b/packages/core/src/fields/types/calendarDay/index.ts @@ -25,7 +25,7 @@ export type CalendarDayFieldConfig = } } -export function calendarDay (config: CalendarDayFieldConfig = {}): FieldTypeFunc { +export function calendarDay (config: CalendarDayFieldConfig = {}): FieldTypeFunc { const { isIndexed, validation, diff --git a/packages/core/src/fields/types/float/index.ts b/packages/core/src/fields/types/float/index.ts index f77048b9051..400d3272cf4 100644 --- a/packages/core/src/fields/types/float/index.ts +++ b/packages/core/src/fields/types/float/index.ts @@ -27,7 +27,7 @@ export type FloatFieldConfig = } } -export function float (config: FloatFieldConfig = {}): FieldTypeFunc { +export function float (config: FloatFieldConfig = {}): FieldTypeFunc { const { defaultValue, isIndexed, diff --git a/packages/core/src/fields/types/password/index.ts b/packages/core/src/fields/types/password/index.ts index 1324ca89136..05502888df8 100644 --- a/packages/core/src/fields/types/password/index.ts +++ b/packages/core/src/fields/types/password/index.ts @@ -53,7 +53,7 @@ const PasswordFilter = graphql.inputObject({ const bcryptHashRegex = /^\$2[aby]?\$\d{1,2}\$[.\/A-Za-z0-9]{53}$/ -export function password (config: PasswordFieldConfig = {}): FieldTypeFunc { +export function password (config: PasswordFieldConfig = {}): FieldTypeFunc { const { bcrypt = bcryptjs, workFactor = 10, diff --git a/packages/core/src/fields/types/select/index.ts b/packages/core/src/fields/types/select/index.ts index ad10c77c12f..eb3d14543a0 100644 --- a/packages/core/src/fields/types/select/index.ts +++ b/packages/core/src/fields/types/select/index.ts @@ -55,7 +55,7 @@ export type SelectFieldConfig = const MAX_INT = 2147483647 const MIN_INT = -2147483648 -export function select (config: SelectFieldConfig): FieldTypeFunc { +export function select (config: SelectFieldConfig): FieldTypeFunc { const { isIndexed, ui: { displayMode = 'select', ...ui } = {}, diff --git a/packages/core/src/fields/types/virtual/index.ts b/packages/core/src/fields/types/virtual/index.ts index d8b11971431..0de17bd1649 100644 --- a/packages/core/src/fields/types/virtual/index.ts +++ b/packages/core/src/fields/types/virtual/index.ts @@ -42,7 +42,7 @@ export type VirtualFieldConfig = } } -export function virtual ({ +export function virtual ({ field, ...config }: VirtualFieldConfig): FieldTypeFunc { diff --git a/packages/core/src/lib/context/createContext.ts b/packages/core/src/lib/context/createContext.ts index 138494c3e2d..53a858e5df9 100644 --- a/packages/core/src/lib/context/createContext.ts +++ b/packages/core/src/lib/context/createContext.ts @@ -68,7 +68,7 @@ export function createContext ({ }: { prisma: any session?: unknown - sudo: Boolean + sudo: boolean req?: IncomingMessage res?: ServerResponse }) => { diff --git a/packages/core/src/lib/core/initialise-lists.ts b/packages/core/src/lib/core/initialise-lists.ts index 191e2ff2807..1e0b7fc2043 100644 --- a/packages/core/src/lib/core/initialise-lists.ts +++ b/packages/core/src/lib/core/initialise-lists.ts @@ -121,7 +121,7 @@ export type InitialisedList = { } prisma: { - types: GraphQLNames, // TODO: not completely appropriate, but what is used for now + types: GraphQLNames // TODO: not completely appropriate, but what is used for now listKey: string mapping: string | undefined extendPrismaSchema: ((schema: string) => string) | undefined @@ -541,7 +541,7 @@ function getListsWithInitialisedFields ( const findManyArgs: FindManyArgs = { where: graphql.arg({ type: graphql.nonNull(where), - defaultValue: listConfig.isSingleton ? ({ id: { equals: '1' } } as {}) : {}, + defaultValue: listConfig.isSingleton ? ({ id: { equals: '1' } } as object) : {}, }), orderBy: graphql.arg({ type: graphql.nonNull(graphql.list(graphql.nonNull(orderBy))), diff --git a/packages/core/src/lib/core/queries/index.ts b/packages/core/src/lib/core/queries/index.ts index 48b6dba3dfe..1de5e2bf99a 100644 --- a/packages/core/src/lib/core/queries/index.ts +++ b/packages/core/src/lib/core/queries/index.ts @@ -31,7 +31,7 @@ export function getQueriesForList (list: InitialisedList) { args: { where: graphql.arg({ type: graphql.nonNull(list.graphql.types.where), - defaultValue: list.isSingleton ? ({ id: { equals: '1' } } as {}) : {}, + defaultValue: list.isSingleton ? ({ id: { equals: '1' } } as object) : {}, }), }, async resolve (_rootVal, args, context, info) { diff --git a/packages/core/src/types/admin-meta.ts b/packages/core/src/types/admin-meta.ts index 170e0f72a09..f225dbc19c6 100644 --- a/packages/core/src/types/admin-meta.ts +++ b/packages/core/src/types/admin-meta.ts @@ -26,7 +26,7 @@ export type CreateViewFieldModes = export type AdminConfig = { components?: { - Logo?: (props: {}) => ReactElement + Logo?: (props: object) => ReactElement Navigation?: (props: NavigationProps) => ReactElement } } diff --git a/packages/core/src/types/json-field-type-polyfill-for-sqlite.ts b/packages/core/src/types/json-field-type-polyfill-for-sqlite.ts index 641763c76f6..4b7e664604b 100644 --- a/packages/core/src/types/json-field-type-polyfill-for-sqlite.ts +++ b/packages/core/src/types/json-field-type-polyfill-for-sqlite.ts @@ -10,9 +10,10 @@ import { type UpdateFieldInputArg, fieldType, } from '.' +import { type InputType, type Arg } from '@graphql-ts/schema' function mapOutputFieldToSQLite ( - field: graphql.Field<{ value: JSONValue, item: BaseItem }, {}, any, 'value'> + field: graphql.Field<{ value: JSONValue, item: BaseItem }, Record>, any, 'value'> ) { const innerResolver = field.resolve || (({ value }) => value) return graphql.fields<{ diff --git a/packages/core/src/types/next-fields.ts b/packages/core/src/types/next-fields.ts index f5153e42a3f..05149147e5e 100644 --- a/packages/core/src/types/next-fields.ts +++ b/packages/core/src/types/next-fields.ts @@ -182,7 +182,7 @@ type DBFieldToInputValue = TDBField extends ScalarDBFi many: readonly ScalarPrismaTypes[Scalar][] | undefined }[Mode] : TDBField extends RelationDBField<'many' | 'one'> - ? { connect?: {}, disconnect?: boolean } | undefined + ? { connect?: object, disconnect?: boolean } | undefined : TDBField extends EnumDBField ? { optional: Value | null | undefined diff --git a/packages/core/src/types/schema/graphql-ts-schema.ts b/packages/core/src/types/schema/graphql-ts-schema.ts index c77f09103cc..168a2b26088 100644 --- a/packages/core/src/types/schema/graphql-ts-schema.ts +++ b/packages/core/src/types/schema/graphql-ts-schema.ts @@ -40,6 +40,7 @@ export { bindGraphQLSchemaAPIToContext } from '@graphql-ts/schema' export type { BaseSchemaMeta, Extension } from '@graphql-ts/extend' export { extend, wrap } from '@graphql-ts/extend' import { field as fieldd } from './schema-api-with-context' +import { type InputType, type Arg } from '@graphql-ts/schema' export { fields, interface, interfaceField, object, union } from './schema-api-with-context' // TODO: remove when we use { graphql } from '.keystone' @@ -72,7 +73,7 @@ type FieldFuncResolve< ? { resolve?: graphqlTsSchema.FieldResolver< Source, - SomeTypeThatIsntARecordOfArgs extends Args ? {} : Args, + SomeTypeThatIsntARecordOfArgs extends Args ? Record> : Args, Type, Context > @@ -80,7 +81,7 @@ type FieldFuncResolve< : { resolve: graphqlTsSchema.FieldResolver< Source, - SomeTypeThatIsntARecordOfArgs extends Args ? {} : Args, + SomeTypeThatIsntARecordOfArgs extends Args ? Record> : Args, Type, Context > @@ -88,7 +89,7 @@ type FieldFuncResolve< : { resolve: graphqlTsSchema.FieldResolver< Source, - SomeTypeThatIsntARecordOfArgs extends Args ? {} : Args, + SomeTypeThatIsntARecordOfArgs extends Args ? Record> : Args, Type, Context > @@ -113,7 +114,7 @@ type FieldFunc = < Type extends OutputType, Key extends string, Context extends KeystoneContext, - Args extends { [Key in keyof Args]: graphqlTsSchema.Arg } = {} + Args extends { [Key in keyof Args]: graphqlTsSchema.Arg } = object >( field: FieldFuncArgs ) => graphqlTsSchema.Field @@ -282,7 +283,7 @@ export const CalendarDay = graphqlTsSchema.graphql.scalar( }) ) -export const Empty = graphqlTsSchema.graphql.scalar<{}>( +export const Empty = graphqlTsSchema.graphql.scalar( new GraphQLScalarType({ name: 'Empty', serialize (value) { return null }, diff --git a/packages/document-renderer/src/index.tsx b/packages/document-renderer/src/index.tsx index 39ee646736d..7a697ee0adb 100644 --- a/packages/document-renderer/src/index.tsx +++ b/packages/document-renderer/src/index.tsx @@ -42,7 +42,7 @@ interface Renderers { blockquote: OnlyChildrenComponent code: Component<{ children: string }> | keyof JSX.IntrinsicElements layout: Component<{ layout: [number, ...number[]], children: ReactElement[] }> - divider: Component<{}> | keyof JSX.IntrinsicElements + divider: Component | keyof JSX.IntrinsicElements heading: Component<{ level: 1 | 2 | 3 | 4 | 5 | 6 children: ReactNode diff --git a/packages/fields-document/src/DocumentEditor/code-block.tsx b/packages/fields-document/src/DocumentEditor/code-block.tsx index c0423188ba4..61be88c1a9a 100644 --- a/packages/fields-document/src/DocumentEditor/code-block.tsx +++ b/packages/fields-document/src/DocumentEditor/code-block.tsx @@ -10,7 +10,7 @@ import { useToolbarState } from './toolbar-state' export * from './code-block-shared' -function CodeButton ({ attrs }: { attrs: {} }) { +function CodeButton ({ attrs }: { attrs: object }) { const { editor, code: { isDisabled, isSelected }, diff --git a/packages/fields-document/src/DocumentEditor/link.tsx b/packages/fields-document/src/DocumentEditor/link.tsx index 4b4cf925ff0..448d095060d 100644 --- a/packages/fields-document/src/DocumentEditor/link.tsx +++ b/packages/fields-document/src/DocumentEditor/link.tsx @@ -162,7 +162,7 @@ const UnlinkButton = memo(function UnlinkButton ({ onUnlink }: { onUnlink: () => let linkIcon = -const LinkButton = forwardRef(function LinkButton (props, ref) { +const LinkButton = forwardRef(function LinkButton (props, ref) { const { editor, links: { isDisabled, isSelected }, diff --git a/packages/fields-document/src/DocumentEditor/tests/jsx/namespace.d.ts b/packages/fields-document/src/DocumentEditor/tests/jsx/namespace.d.ts index c980dd039da..177cc5c9b25 100644 --- a/packages/fields-document/src/DocumentEditor/tests/jsx/namespace.d.ts +++ b/packages/fields-document/src/DocumentEditor/tests/jsx/namespace.d.ts @@ -51,7 +51,7 @@ declare namespace __jsx { data: { id: string label: string - data: {} + data: object } children: Children @@ -59,10 +59,10 @@ declare namespace __jsx { } type Element = Node interface ElementAttributesProperty { - props: {} + props: object } interface ElementChildrenAttribute { - children: {} + children: object } } } diff --git a/packages/fields-document/src/structure-graphql-output.ts b/packages/fields-document/src/structure-graphql-output.ts index 0a207e2f90f..7d6f92d476e 100644 --- a/packages/fields-document/src/structure-graphql-output.ts +++ b/packages/fields-document/src/structure-graphql-output.ts @@ -71,7 +71,7 @@ function getOutputGraphQLFieldInner ( fields: () => Object.fromEntries( Object.entries(schema.fields).map( - ([key, val]): [string, graphql.Field] => { + ([key, val]): [string, graphql.Field>, graphql.OutputType, string>] => { const field = getOutputGraphQLField( `${name}${key[0].toUpperCase()}${key.slice(1)}`, val, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6a55be54e71..85f97537640 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -41,6 +41,9 @@ importers: '@preconstruct/cli': specifier: 2.8.8 version: 2.8.8 + '@stylistic/eslint-plugin-ts': + specifier: ^2.9.0 + version: 2.9.0(eslint@9.10.0)(typescript@5.5.4) '@types/jest': specifier: ^29.0.0 version: 29.5.12 @@ -6091,6 +6094,12 @@ packages: resolution: {integrity: sha512-4pP0EV3iTsexDx+8PPGAKCQpd/6hsQBaQhqWzU4hqKPHN5epPsxKbvUTIiYIHTxaKt6/kEaqPBpu/ufvfbrRzw==} engines: {node: '>=16.0.0'} + '@stylistic/eslint-plugin-ts@2.9.0': + resolution: {integrity: sha512-CxB73paAKlmaIDtOfKoIHlhNJVlyRMVobuBqdOc4wbVSqfhbgpCWuJYpBkV3ydGDKRfVWNJ9yg5b99lzZtrjhg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: '>=8.40.0' + '@svgr/babel-plugin-add-jsx-attribute@8.0.0': resolution: {integrity: sha512-b9MIk7yhdS1pMCZM8VeNfUlSKVRhsHZNMl5O9SfaX0l0t5wjdgu4IDzGB8bpnGBBOjGST3rRFVsaaEtI4W6f7g==} engines: {node: '>=14'} @@ -6575,6 +6584,10 @@ packages: resolution: {integrity: sha512-n2jFxLeY0JmKfUqy3P70rs6vdoPjHK8P/w+zJcV3fk0b0BwRXC/zxRTEnAsgYT7MwdQDt/ZEbtdzdVC+hcpF0A==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/scope-manager@8.8.1': + resolution: {integrity: sha512-X4JdU+66Mazev/J0gfXlcC/dV6JI37h+93W9BRYXrSn0hrE64IoWgVkO9MSJgEzoWkxONgaQpICWg8vAN74wlA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/type-utils@8.4.0': resolution: {integrity: sha512-pu2PAmNrl9KX6TtirVOrbLPLwDmASpZhK/XU7WvoKoCUkdtq9zF7qQ7gna0GBZFN0hci0vHaSusiL2WpsQk37A==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -6592,6 +6605,10 @@ packages: resolution: {integrity: sha512-T1RB3KQdskh9t3v/qv7niK6P8yvn7ja1mS7QK7XfRVL6wtZ8/mFs/FHf4fKvTA0rKnqnYxl/uHFNbnEt0phgbw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/types@8.8.1': + resolution: {integrity: sha512-WCcTP4SDXzMd23N27u66zTKMuEevH4uzU8C9jf0RO4E04yVHgQgW+r+TeVTNnO1KIfrL8ebgVVYYMMO3+jC55Q==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/typescript-estree@6.21.0': resolution: {integrity: sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ==} engines: {node: ^16.0.0 || >=18.0.0} @@ -6610,6 +6627,15 @@ packages: typescript: optional: true + '@typescript-eslint/typescript-estree@8.8.1': + resolution: {integrity: sha512-A5d1R9p+X+1js4JogdNilDuuq+EHZdsH9MjTVxXOdVFfTJXunKJR/v+fNNyO4TnoOn5HqobzfRlc70NC6HTcdg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + '@typescript-eslint/utils@6.21.0': resolution: {integrity: sha512-NfWVaC8HP9T8cbKQxHcsJBY5YE1O33+jpMwN45qzWWaPDZgLIbo12toGMWnmhvCpd3sIxkpDw3Wv1B3dYrbDQQ==} engines: {node: ^16.0.0 || >=18.0.0} @@ -6622,6 +6648,12 @@ packages: peerDependencies: eslint: ^8.57.0 || ^9.0.0 + '@typescript-eslint/utils@8.8.1': + resolution: {integrity: sha512-/QkNJDbV0bdL7H7d0/y0qBbV2HTtf0TIyjSDTvvmQEzeVx8jEImEbLuOA4EsvE8gIgqMitns0ifb5uQhMj8d9w==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + '@typescript-eslint/visitor-keys@6.21.0': resolution: {integrity: sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==} engines: {node: ^16.0.0 || >=18.0.0} @@ -6630,6 +6662,10 @@ packages: resolution: {integrity: sha512-zTQD6WLNTre1hj5wp09nBIDiOc2U5r/qmzo7wxPn4ZgAjHql09EofqhF9WF+fZHzL5aCyaIpPcT2hyxl73kr9A==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/visitor-keys@8.8.1': + resolution: {integrity: sha512-0/TdC3aeRAsW7MDvYRwEc1Uwm0TIBfzjPFgg60UU2Haj5qsCs9cc3zNgY71edqE3LbWfF/WoZQd3lJoDXFQpag==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@ungap/structured-clone@1.2.0': resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} @@ -7047,10 +7083,6 @@ packages: bl@4.1.0: resolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==} - body-parser@1.20.2: - resolution: {integrity: sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==} - engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} - body-parser@1.20.3: resolution: {integrity: sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==} engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} @@ -7957,6 +7989,10 @@ packages: resolution: {integrity: sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + eslint-visitor-keys@4.1.0: + resolution: {integrity: sha512-Q7lok0mqMUSf5a/AdAZkA5a/gHcO6snwQClVNNvFKCAVlxXucdU8pKydU5ZVZjBx5xr37vGbFFWtLQYreLzrZg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + eslint@8.57.0: resolution: {integrity: sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -7977,6 +8013,10 @@ packages: resolution: {integrity: sha512-M1M6CpiE6ffoigIOWYO9UDP8TMUw9kqb21tf+08IgDYjCsOvCuDt4jQcZmoYxx+w7zlKw9/N0KXfto+I8/FrXA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + espree@10.2.0: + resolution: {integrity: sha512-upbkBJbckcCNBDBDXEbuhjbP68n+scUd3k/U2EkyM9nw+I/jPiL4cLF/Al06CF96wRltFda16sxDFrxsI1v0/g==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + espree@9.6.1: resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -17403,6 +17443,16 @@ snapshots: '@smithy/types': 3.3.0 tslib: 2.7.0 + '@stylistic/eslint-plugin-ts@2.9.0(eslint@9.10.0)(typescript@5.5.4)': + dependencies: + '@typescript-eslint/utils': 8.8.1(eslint@9.10.0)(typescript@5.5.4) + eslint: 9.10.0 + eslint-visitor-keys: 4.1.0 + espree: 10.2.0 + transitivePeerDependencies: + - supports-color + - typescript + '@svgr/babel-plugin-add-jsx-attribute@8.0.0(@babel/core@7.25.2)': dependencies: '@babel/core': 7.25.2 @@ -17984,6 +18034,11 @@ snapshots: '@typescript-eslint/types': 8.4.0 '@typescript-eslint/visitor-keys': 8.4.0 + '@typescript-eslint/scope-manager@8.8.1': + dependencies: + '@typescript-eslint/types': 8.8.1 + '@typescript-eslint/visitor-keys': 8.8.1 + '@typescript-eslint/type-utils@8.4.0(eslint@9.10.0)(typescript@5.5.4)': dependencies: '@typescript-eslint/typescript-estree': 8.4.0(typescript@5.5.4) @@ -18000,6 +18055,8 @@ snapshots: '@typescript-eslint/types@8.4.0': {} + '@typescript-eslint/types@8.8.1': {} + '@typescript-eslint/typescript-estree@6.21.0(typescript@5.5.4)': dependencies: '@typescript-eslint/types': 6.21.0 @@ -18030,6 +18087,21 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/typescript-estree@8.8.1(typescript@5.5.4)': + dependencies: + '@typescript-eslint/types': 8.8.1 + '@typescript-eslint/visitor-keys': 8.8.1 + debug: 4.3.7 + fast-glob: 3.3.2 + is-glob: 4.0.3 + minimatch: 9.0.5 + semver: 7.6.3 + ts-api-utils: 1.3.0(typescript@5.5.4) + optionalDependencies: + typescript: 5.5.4 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/utils@6.21.0(eslint@8.57.0)(typescript@5.5.4)': dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) @@ -18055,6 +18127,17 @@ snapshots: - supports-color - typescript + '@typescript-eslint/utils@8.8.1(eslint@9.10.0)(typescript@5.5.4)': + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@9.10.0) + '@typescript-eslint/scope-manager': 8.8.1 + '@typescript-eslint/types': 8.8.1 + '@typescript-eslint/typescript-estree': 8.8.1(typescript@5.5.4) + eslint: 9.10.0 + transitivePeerDependencies: + - supports-color + - typescript + '@typescript-eslint/visitor-keys@6.21.0': dependencies: '@typescript-eslint/types': 6.21.0 @@ -18065,6 +18148,11 @@ snapshots: '@typescript-eslint/types': 8.4.0 eslint-visitor-keys: 3.4.3 + '@typescript-eslint/visitor-keys@8.8.1': + dependencies: + '@typescript-eslint/types': 8.8.1 + eslint-visitor-keys: 3.4.3 + '@ungap/structured-clone@1.2.0': {} '@urql/core@5.0.6(graphql@16.9.0)': @@ -18666,23 +18754,6 @@ snapshots: inherits: 2.0.4 readable-stream: 3.6.2 - body-parser@1.20.2: - dependencies: - bytes: 3.1.2 - content-type: 1.0.5 - debug: 2.6.9 - depd: 2.0.0 - destroy: 1.2.0 - http-errors: 2.0.0 - iconv-lite: 0.4.24 - on-finished: 2.4.1 - qs: 6.11.0 - raw-body: 2.5.2 - type-is: 1.6.18 - unpipe: 1.0.0 - transitivePeerDependencies: - - supports-color - body-parser@1.20.3: dependencies: bytes: 3.1.2 @@ -19717,6 +19788,8 @@ snapshots: eslint-visitor-keys@4.0.0: {} + eslint-visitor-keys@4.1.0: {} + eslint@8.57.0: dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) @@ -19805,6 +19878,12 @@ snapshots: acorn-jsx: 5.3.2(acorn@8.12.1) eslint-visitor-keys: 4.0.0 + espree@10.2.0: + dependencies: + acorn: 8.12.1 + acorn-jsx: 5.3.2(acorn@8.12.1) + eslint-visitor-keys: 4.1.0 + espree@9.6.1: dependencies: acorn: 8.12.1 diff --git a/tests/api-tests/omit.test.ts b/tests/api-tests/omit.test.ts index 263cbf16e63..b3d06961d8f 100644 --- a/tests/api-tests/omit.test.ts +++ b/tests/api-tests/omit.test.ts @@ -74,7 +74,7 @@ function makeList ({ isOrderable, omit, }: { - fields: typeof fieldsMatrix, + fields: typeof fieldsMatrix isFilterable: boolean isOrderable: boolean omit: