diff --git a/package.json b/package.json index 745513040770..e3f805a3274c 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "devDependencies": { "@anansi/babel-preset": "6.0.9", "@anansi/browserslist-config": "1.5.1", - "@anansi/eslint-plugin": "1.0.17", + "@anansi/eslint-plugin": "1.0.18", "@anansi/jest-preset": "0.11.8", "@babel/cli": "7.25.9", "@babel/core": "7.26.0", @@ -62,7 +62,7 @@ "@react-navigation/native-stack": "^7.0.0", "@testing-library/react": "16.0.1", "@testing-library/react-hooks": "8.0.1", - "@testing-library/react-native": "12.8.1", + "@testing-library/react-native": "12.9.0", "@types/jest": "29.5.14", "@types/node": "22.10.1", "@types/react": "npm:types-react@19.0.0-rc.1", @@ -77,7 +77,7 @@ "cpy-cli": "5.0.0", "cross-fetch": "^4.0.0", "downlevel-dts": "^0.10.0", - "eslint": "9.15.0", + "eslint": "9.16.0", "globals": "^15.9.0", "ignore-styles": "^5.0.1", "jest": "29.7.0", @@ -86,7 +86,7 @@ "nock": "13.3.1", "node-fetch": "^3.3.0", "npm-run-all": "^4.1.5", - "prettier": "3.3.3", + "prettier": "3.4.1", "react": "^19.0.0-rc.1", "react-dom": "^19.0.0-rc.1", "react-native": "0.76.3", diff --git a/packages/core/src/controller/Controller.ts b/packages/core/src/controller/Controller.ts index d6ef72b86ad4..82cd1b992ad9 100644 --- a/packages/core/src/controller/Controller.ts +++ b/packages/core/src/controller/Controller.ts @@ -464,7 +464,7 @@ export default class Controller< } // second argument is false if any entities are missing - // eslint-disable-next-line prefer-const + const { data, paths } = this.memo.denormalize( schema, input, diff --git a/packages/core/src/manager/DevtoolsManager.ts b/packages/core/src/manager/DevtoolsManager.ts index 721d01ca6384..5416a559bbc1 100644 --- a/packages/core/src/manager/DevtoolsManager.ts +++ b/packages/core/src/manager/DevtoolsManager.ts @@ -1,4 +1,3 @@ -/* eslint-disable no-inner-declarations */ import type { DevToolsConfig } from './devtoolsTypes.js'; import type { Controller, EndpointInterface } from '../index.js'; import type { Middleware } from '../middlewareTypes.js'; @@ -90,10 +89,10 @@ if (process.env.NODE_ENV !== 'production') { */ export default class DevToolsManager implements Manager { declare middleware: Middleware; - protected declare devTools: undefined | any; + declare protected devTools: undefined | any; protected started = false; protected actions: [ActionTypes, State][] = []; - protected declare controller: Controller; + declare protected controller: Controller; declare skipLogging?: (action: ActionTypes) => boolean; maxBufferLength = 100; diff --git a/packages/core/src/manager/PollingSubscription.ts b/packages/core/src/manager/PollingSubscription.ts index 6ea9b51a65d6..6f59af9d9388 100644 --- a/packages/core/src/manager/PollingSubscription.ts +++ b/packages/core/src/manager/PollingSubscription.ts @@ -14,16 +14,16 @@ import type { SubscribeAction } from '../types.js'; * @see https://dataclient.io/docs/api/PollingSubscription */ export default class PollingSubscription implements Subscription { - protected declare readonly endpoint: EndpointInterface; - protected declare readonly args: readonly any[]; - protected declare readonly key: string; - protected declare frequency: number; + declare protected readonly endpoint: EndpointInterface; + declare protected readonly args: readonly any[]; + declare protected readonly key: string; + declare protected frequency: number; protected frequencyHistogram: Map = new Map(); - protected declare controller: Controller; - protected declare intervalId?: ReturnType; - protected declare lastIntervalId?: ReturnType; - protected declare startId?: ReturnType; - private declare connectionListener: ConnectionListener; + declare protected controller: Controller; + declare protected intervalId?: ReturnType; + declare protected lastIntervalId?: ReturnType; + declare protected startId?: ReturnType; + declare private connectionListener: ConnectionListener; constructor( action: Omit, diff --git a/packages/core/src/manager/SubscriptionManager.ts b/packages/core/src/manager/SubscriptionManager.ts index 574b7e130431..9fd0e7154cf7 100644 --- a/packages/core/src/manager/SubscriptionManager.ts +++ b/packages/core/src/manager/SubscriptionManager.ts @@ -40,7 +40,7 @@ export default class SubscriptionManager< [key: string]: InstanceType; } = {}; - protected declare readonly Subscription: S; + declare protected readonly Subscription: S; protected controller: Controller = new Controller(); constructor(Subscription: S) { diff --git a/packages/endpoint/src/__tests__/endpoint.ts b/packages/endpoint/src/__tests__/endpoint.ts index d328c61fda28..1bfed8eb8da8 100644 --- a/packages/endpoint/src/__tests__/endpoint.ts +++ b/packages/endpoint/src/__tests__/endpoint.ts @@ -7,7 +7,7 @@ import Entity from '../schemas/Entity'; describe.each([true, false])(`Endpoint (CSP %s)`, mockCSP => { jest.resetModules(); jest.mock('../CSP', () => ({ CSP: mockCSP })); - // eslint-disable-next-line @typescript-eslint/no-var-requires + const Endpoint: typeof TEndpoint = require('../endpoint').default; afterAll(() => { jest.clearAllMocks(); diff --git a/packages/endpoint/src/__tests__/validateRequired.test.ts b/packages/endpoint/src/__tests__/validateRequired.test.ts index 4d02e3ac545d..7593fff66807 100644 --- a/packages/endpoint/src/__tests__/validateRequired.test.ts +++ b/packages/endpoint/src/__tests__/validateRequired.test.ts @@ -9,7 +9,7 @@ import validateRequired from '../validateRequired'; let dateSpy: jest.SpyInstance; beforeAll(() => { dateSpy = jest - // eslint-disable-next-line no-undef + .spyOn(global.Date, 'now') .mockImplementation(() => new Date('2019-05-14T11:01:58.135Z').valueOf()); }); diff --git a/packages/endpoint/src/schemas/Collection.ts b/packages/endpoint/src/schemas/Collection.ts index 8bddda82d1bb..36f14e2f483e 100644 --- a/packages/endpoint/src/schemas/Collection.ts +++ b/packages/endpoint/src/schemas/Collection.ts @@ -24,9 +24,9 @@ export default class CollectionSchema< Args extends any[] = DefaultArgs, Parent = any, > { - protected declare nestKey: (parent: any, key: string) => Record; + declare protected nestKey: (parent: any, key: string) => Record; - protected declare argsKey?: (...args: any) => Record; + declare protected argsKey?: (...args: any) => Record; declare readonly schema: S; diff --git a/packages/endpoint/src/schemas/Entity.ts b/packages/endpoint/src/schemas/Entity.ts index 5428634e271b..35e55c4361e3 100644 --- a/packages/endpoint/src/schemas/Entity.ts +++ b/packages/endpoint/src/schemas/Entity.ts @@ -22,7 +22,7 @@ export default abstract class Entity extends EntityMixin(EmptyBase) { * * Note: this only applies to non-nested members. */ - protected declare static automaticValidation?: 'warn' | 'silent'; + declare protected static automaticValidation?: 'warn' | 'silent'; /** Factory method to convert from Plain JS Objects. * diff --git a/packages/endpoint/src/schemas/Invalidate.ts b/packages/endpoint/src/schemas/Invalidate.ts index 9f292780969d..603587123b73 100644 --- a/packages/endpoint/src/schemas/Invalidate.ts +++ b/packages/endpoint/src/schemas/Invalidate.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/explicit-module-boundary-types */ import type { EntityInterface, SchemaSimple } from '../interface.js'; import type { AbstractInstanceType } from '../normal.js'; import { INVALID } from '../special.js'; @@ -16,7 +15,7 @@ export default class Invalidate< }, > implements SchemaSimple { - protected declare _entity: E; + declare protected _entity: E; /** * Marks entity as Invalid. diff --git a/packages/endpoint/src/schemas/Polymorphic.ts b/packages/endpoint/src/schemas/Polymorphic.ts index f0e5cf03f3df..8f14b5a37dec 100644 --- a/packages/endpoint/src/schemas/Polymorphic.ts +++ b/packages/endpoint/src/schemas/Polymorphic.ts @@ -2,7 +2,7 @@ import { isImmutable } from './ImmutableUtils.js'; import { Visit } from '../interface.js'; export default class PolymorphicSchema { - private declare _schemaAttribute: any; + declare private _schemaAttribute: any; protected schema: any; constructor( diff --git a/packages/endpoint/src/schemas/__tests__/All.test.ts b/packages/endpoint/src/schemas/__tests__/All.test.ts index 9c61eeb31f90..90b9e26da2d7 100644 --- a/packages/endpoint/src/schemas/__tests__/All.test.ts +++ b/packages/endpoint/src/schemas/__tests__/All.test.ts @@ -9,7 +9,7 @@ import { INVALID } from '../../special'; let dateSpy: jest.SpyInstance; beforeAll(() => { dateSpy = jest - // eslint-disable-next-line no-undef + .spyOn(global.Date, 'now') .mockImplementation(() => new Date('2019-05-14T11:01:58.135Z').valueOf()); }); diff --git a/packages/endpoint/src/schemas/__tests__/Array.test.js b/packages/endpoint/src/schemas/__tests__/Array.test.js index d0d69e9e21d8..0b4a2db22909 100644 --- a/packages/endpoint/src/schemas/__tests__/Array.test.js +++ b/packages/endpoint/src/schemas/__tests__/Array.test.js @@ -8,7 +8,7 @@ import { schema } from '../../'; let dateSpy; beforeAll(() => { dateSpy = jest - // eslint-disable-next-line no-undef + .spyOn(global.Date, 'now') .mockImplementation(() => new Date('2019-05-14T11:01:58.135Z').valueOf()); }); diff --git a/packages/endpoint/src/schemas/__tests__/Entity.test.ts b/packages/endpoint/src/schemas/__tests__/Entity.test.ts index 8b22bfb61bbb..b50f8c9285a0 100644 --- a/packages/endpoint/src/schemas/__tests__/Entity.test.ts +++ b/packages/endpoint/src/schemas/__tests__/Entity.test.ts @@ -13,7 +13,7 @@ import Entity from '../Entity'; let dateSpy: jest.SpyInstance; beforeAll(() => { dateSpy = jest - // eslint-disable-next-line no-undef + .spyOn(global.Date, 'now') .mockImplementation(() => new Date('2019-05-14T11:01:58.135Z').valueOf()); }); diff --git a/packages/endpoint/src/schemas/__tests__/Invalidate.test.ts b/packages/endpoint/src/schemas/__tests__/Invalidate.test.ts index ea6c24f1c27a..e92faff870f9 100644 --- a/packages/endpoint/src/schemas/__tests__/Invalidate.test.ts +++ b/packages/endpoint/src/schemas/__tests__/Invalidate.test.ts @@ -11,7 +11,7 @@ import Entity from '../Entity'; let dateSpy: jest.SpyInstance; beforeAll(() => { dateSpy = jest - // eslint-disable-next-line no-undef + .spyOn(global.Date, 'now') .mockImplementation(() => new Date('2019-05-14T11:01:58.135Z').valueOf()); }); diff --git a/packages/endpoint/src/schemas/__tests__/Object.test.js b/packages/endpoint/src/schemas/__tests__/Object.test.js index b1b594b4069e..e73dd2438ef4 100644 --- a/packages/endpoint/src/schemas/__tests__/Object.test.js +++ b/packages/endpoint/src/schemas/__tests__/Object.test.js @@ -10,7 +10,7 @@ import Entity from '../Entity'; let dateSpy; beforeAll(() => { dateSpy = jest - // eslint-disable-next-line no-undef + .spyOn(global.Date, 'now') .mockImplementation(() => new Date('2019-05-14T11:01:58.135Z').valueOf()); }); diff --git a/packages/endpoint/src/schemas/__tests__/Query.test.ts b/packages/endpoint/src/schemas/__tests__/Query.test.ts index 7eae1389a043..298966590759 100644 --- a/packages/endpoint/src/schemas/__tests__/Query.test.ts +++ b/packages/endpoint/src/schemas/__tests__/Query.test.ts @@ -10,7 +10,7 @@ import { schema, DenormalizeNullable } from '../..'; let dateSpy: jest.SpyInstance; beforeAll(() => { dateSpy = jest - // eslint-disable-next-line no-undef + .spyOn(global.Date, 'now') .mockImplementation(() => new Date('2019-05-14T11:01:58.135Z').valueOf()); }); diff --git a/packages/endpoint/src/schemas/__tests__/Serializable.test.ts b/packages/endpoint/src/schemas/__tests__/Serializable.test.ts index a60cf181ad7d..6d2c231d6560 100644 --- a/packages/endpoint/src/schemas/__tests__/Serializable.test.ts +++ b/packages/endpoint/src/schemas/__tests__/Serializable.test.ts @@ -8,7 +8,7 @@ import SimpleMemoCache from './denormalize'; let dateSpy; beforeAll(() => { dateSpy = jest - // eslint-disable-next-line no-undef + .spyOn(global.Date, 'now') .mockImplementation(() => new Date('2019-05-14T11:01:58.135Z').valueOf()); }); diff --git a/packages/endpoint/src/schemas/__tests__/Union.test.js b/packages/endpoint/src/schemas/__tests__/Union.test.js index e39c203e8078..317fe0ce3873 100644 --- a/packages/endpoint/src/schemas/__tests__/Union.test.js +++ b/packages/endpoint/src/schemas/__tests__/Union.test.js @@ -10,7 +10,7 @@ import { schema } from '../../'; let dateSpy; beforeAll(() => { dateSpy = jest - // eslint-disable-next-line no-undef + .spyOn(global.Date, 'now') .mockImplementation(() => new Date('2019-05-14T11:01:58.135Z').valueOf()); }); diff --git a/packages/endpoint/src/schemas/__tests__/Values.test.js b/packages/endpoint/src/schemas/__tests__/Values.test.js index 89ed33eaa224..0f41a4f76160 100644 --- a/packages/endpoint/src/schemas/__tests__/Values.test.js +++ b/packages/endpoint/src/schemas/__tests__/Values.test.js @@ -11,7 +11,7 @@ import Entity from '../Entity'; let dateSpy; beforeAll(() => { dateSpy = jest - // eslint-disable-next-line no-undef + .spyOn(global.Date, 'now') .mockImplementation(() => new Date('2019-05-14T11:01:58.135Z').valueOf()); }); diff --git a/packages/graphql/src/__tests__/gql.ts b/packages/graphql/src/__tests__/gql.ts index 63385757ebc9..e8bd0a0d8ed5 100644 --- a/packages/graphql/src/__tests__/gql.ts +++ b/packages/graphql/src/__tests__/gql.ts @@ -231,7 +231,6 @@ describe('GQLEndpoint', () => { expect(error).toBeDefined(); expect(error.status).toBe(400); - // eslint-disable-next-line require-atomic-updates console.error = oldError; }); }); diff --git a/packages/normalizr/src/__tests__/MemoCache.ts b/packages/normalizr/src/__tests__/MemoCache.ts index 42ab58e4a786..71cd7cfda98b 100644 --- a/packages/normalizr/src/__tests__/MemoCache.ts +++ b/packages/normalizr/src/__tests__/MemoCache.ts @@ -26,7 +26,7 @@ class Tacos extends IDEntity { let dateSpy; beforeAll(() => { dateSpy = jest - // eslint-disable-next-line no-undef + .spyOn(global.Date, 'now') .mockImplementation(() => new Date('2019-05-14T11:01:58.135Z').valueOf()); }); diff --git a/packages/normalizr/src/__tests__/index.test.js b/packages/normalizr/src/__tests__/index.test.js index 2a8c960d86f9..806414b4ecbd 100644 --- a/packages/normalizr/src/__tests__/index.test.js +++ b/packages/normalizr/src/__tests__/index.test.js @@ -21,7 +21,7 @@ class Tacos extends IDEntity { let dateSpy; beforeAll(() => { dateSpy = jest - // eslint-disable-next-line no-undef + .spyOn(global.Date, 'now') .mockImplementation(() => new Date('2019-05-14T11:01:58.135Z').valueOf()); }); diff --git a/packages/normalizr/src/memo/globalCache.ts b/packages/normalizr/src/memo/globalCache.ts index 5195be1ad04b..ee88657e78cf 100644 --- a/packages/normalizr/src/memo/globalCache.ts +++ b/packages/normalizr/src/memo/globalCache.ts @@ -11,13 +11,13 @@ export default class GlobalCache implements Cache { private cycleIndex = -1; private localCache: Record> = {}; - private declare getCache: ( + declare private getCache: ( pk: string, schema: EntityInterface, ) => WeakDependencyMap; - private declare _getEntity: GetEntity; - private declare resultCache: EndpointsCache; + declare private _getEntity: GetEntity; + declare private resultCache: EndpointsCache; constructor( getEntity: GetEntity, diff --git a/packages/normalizr/src/normalizr/addEntities.ts b/packages/normalizr/src/normalizr/addEntities.ts index 619aeeab6b50..3200aefda186 100644 --- a/packages/normalizr/src/normalizr/addEntities.ts +++ b/packages/normalizr/src/normalizr/addEntities.ts @@ -107,7 +107,6 @@ function handleIndexes( if (index in entity) { indexMap[entity[index]] = id; } /* istanbul ignore next */ else if ( - // eslint-disable-next-line no-undef process.env.NODE_ENV !== 'production' ) { console.warn(`Index not found in entity. Indexes must be top-level members of your entity. diff --git a/packages/normalizr/src/normalizr/normalize.ts b/packages/normalizr/src/normalizr/normalize.ts index 7c65547445f5..3f14084d3185 100644 --- a/packages/normalizr/src/normalizr/normalize.ts +++ b/packages/normalizr/src/normalizr/normalize.ts @@ -9,7 +9,6 @@ import type { StoreData, } from '../types.js'; -// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types export const normalize = < S extends Schema = Schema, E extends Record | undefined> = Record< diff --git a/packages/react/src/components/BackupLoading.native.js b/packages/react/src/components/BackupLoading.native.js index 66460733471a..e4d17bc91127 100644 --- a/packages/react/src/components/BackupLoading.native.js +++ b/packages/react/src/components/BackupLoading.native.js @@ -1,4 +1,3 @@ -/* eslint-disable react/prop-types */ import React, { useEffect } from 'react'; import { Text, Linking, View } from 'react-native'; diff --git a/packages/react/src/components/ErrorBoundary.tsx b/packages/react/src/components/ErrorBoundary.tsx index 6daeb9d68f4d..a075852e2640 100644 --- a/packages/react/src/components/ErrorBoundary.tsx +++ b/packages/react/src/components/ErrorBoundary.tsx @@ -36,7 +36,7 @@ export default class ErrorBoundary extends React.Component< return { error }; } - private declare unsubscribe: undefined | (() => void); + declare private unsubscribe: undefined | (() => void); state: ErrorState = {}; componentDidMount() { diff --git a/packages/react/src/hooks/__tests__/useDLE.native.tsx b/packages/react/src/hooks/__tests__/useDLE.native.tsx index 60708bf40378..4c78a8f6022b 100644 --- a/packages/react/src/hooks/__tests__/useDLE.native.tsx +++ b/packages/react/src/hooks/__tests__/useDLE.native.tsx @@ -198,7 +198,7 @@ describe('useDLE', () => { rerender(); await result.current; expect(fetchMock).toHaveBeenCalledTimes(0); - // eslint-disable-next-line require-atomic-updates + time += 610000000; rerender(); await result.current; diff --git a/packages/react/src/hooks/__tests__/useFetch.native.tsx b/packages/react/src/hooks/__tests__/useFetch.native.tsx index c3ca27470d59..2db8a46a727e 100644 --- a/packages/react/src/hooks/__tests__/useFetch.native.tsx +++ b/packages/react/src/hooks/__tests__/useFetch.native.tsx @@ -181,7 +181,7 @@ describe('useFetch', () => { rerender(); await result.current; expect(fetchMock).toHaveBeenCalledTimes(0); - // eslint-disable-next-line require-atomic-updates + time += 610000000; rerender(); await result.current; diff --git a/packages/react/src/hooks/__tests__/useFetch.web.tsx b/packages/react/src/hooks/__tests__/useFetch.web.tsx index cf500b22c59f..d36356b0f0c4 100644 --- a/packages/react/src/hooks/__tests__/useFetch.web.tsx +++ b/packages/react/src/hooks/__tests__/useFetch.web.tsx @@ -171,7 +171,7 @@ describe('useFetch', () => { rerender(); await result.current; expect(fetchMock).toHaveBeenCalledTimes(0); - // eslint-disable-next-line require-atomic-updates + time += 610000000; rerender(); await result.current; diff --git a/packages/react/src/hooks/useCache.ts b/packages/react/src/hooks/useCache.ts index 2233f08ad03e..e0923131757e 100644 --- a/packages/react/src/hooks/useCache.ts +++ b/packages/react/src/hooks/useCache.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/ban-ts-comment */ import type { EndpointInterface, DenormalizeNullable, diff --git a/packages/react/src/hooks/useDLE.native.ts b/packages/react/src/hooks/useDLE.native.ts index a84c5e9a3ce2..f604454815c3 100644 --- a/packages/react/src/hooks/useDLE.native.ts +++ b/packages/react/src/hooks/useDLE.native.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/ban-ts-comment */ import type { Denormalize, DenormalizeNullable, diff --git a/packages/react/src/hooks/useDLE.ts b/packages/react/src/hooks/useDLE.ts index 90f58015ffbb..bddbedae74d7 100644 --- a/packages/react/src/hooks/useDLE.ts +++ b/packages/react/src/hooks/useDLE.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/ban-ts-comment */ import type { Denormalize, DenormalizeNullable, diff --git a/packages/react/src/hooks/useError.ts b/packages/react/src/hooks/useError.ts index 99f9043c9ae3..a8a3e1468322 100644 --- a/packages/react/src/hooks/useError.ts +++ b/packages/react/src/hooks/useError.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/ban-ts-comment */ import type { NetworkError, UnknownError } from '@data-client/core'; import { EndpointInterface } from '@data-client/core'; diff --git a/packages/react/src/hooks/useFetch.native.ts b/packages/react/src/hooks/useFetch.native.ts index c2c63572ecbc..a3b03aeff797 100644 --- a/packages/react/src/hooks/useFetch.native.ts +++ b/packages/react/src/hooks/useFetch.native.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/ban-ts-comment */ import { DenormalizeNullable, ExpiryStatus, NI } from '@data-client/core'; import { EndpointInterface, diff --git a/packages/react/src/hooks/useFetch.ts b/packages/react/src/hooks/useFetch.ts index 12bcba21c293..ae9639dad642 100644 --- a/packages/react/src/hooks/useFetch.ts +++ b/packages/react/src/hooks/useFetch.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/ban-ts-comment */ import { DenormalizeNullable, ExpiryStatus, NI } from '@data-client/core'; import { EndpointInterface, diff --git a/packages/react/src/hooks/useLive.ts b/packages/react/src/hooks/useLive.ts index dbd97d2603e7..4f66c02c55c2 100644 --- a/packages/react/src/hooks/useLive.ts +++ b/packages/react/src/hooks/useLive.ts @@ -1,5 +1,5 @@ 'use client'; -/* eslint-disable @typescript-eslint/ban-ts-comment */ + import { EndpointInterface, Denormalize, diff --git a/packages/react/src/hooks/useQuery.ts b/packages/react/src/hooks/useQuery.ts index 2fbcdecd293e..ad48e23d31f7 100644 --- a/packages/react/src/hooks/useQuery.ts +++ b/packages/react/src/hooks/useQuery.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/ban-ts-comment */ import type { DenormalizeNullable, NI, diff --git a/packages/react/src/hooks/useSubscription.native.tsx b/packages/react/src/hooks/useSubscription.native.tsx index 800cf6ab0c31..5a47a264c2fe 100644 --- a/packages/react/src/hooks/useSubscription.native.tsx +++ b/packages/react/src/hooks/useSubscription.native.tsx @@ -33,8 +33,6 @@ export default function useSubscription< return () => { controller.unsubscribe(endpoint, ...cleanedArgs); }; - - // eslint-disable-next-line react-hooks/exhaustive-deps }, [controller, key], true, diff --git a/packages/react/src/hooks/useSuspense.native.ts b/packages/react/src/hooks/useSuspense.native.ts index b4f2da155f05..c71e12652752 100644 --- a/packages/react/src/hooks/useSuspense.native.ts +++ b/packages/react/src/hooks/useSuspense.native.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/ban-ts-comment */ import { ExpiryStatus } from '@data-client/core'; import type { EndpointInterface, diff --git a/packages/react/src/hooks/useSuspense.ts b/packages/react/src/hooks/useSuspense.ts index ef3475553eac..434853e63dee 100644 --- a/packages/react/src/hooks/useSuspense.ts +++ b/packages/react/src/hooks/useSuspense.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/ban-ts-comment */ import { ExpiryStatus } from '@data-client/core'; import type { EndpointInterface, diff --git a/packages/react/src/hooks/useUniversal.ts b/packages/react/src/hooks/useUniversal.ts index 42f6657f28f8..d0467c1a6b73 100644 --- a/packages/react/src/hooks/useUniversal.ts +++ b/packages/react/src/hooks/useUniversal.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/ban-ts-comment */ import React, { useContext } from 'react'; const useUniversal: (context: React.Context) => T = diff --git a/packages/react/src/managers/__tests__/RIC.web.ts b/packages/react/src/managers/__tests__/RIC.web.ts index b35ddf3e4541..1758a077317a 100644 --- a/packages/react/src/managers/__tests__/RIC.web.ts +++ b/packages/react/src/managers/__tests__/RIC.web.ts @@ -3,7 +3,7 @@ describe('RequestIdleCallback', () => { const requestIdle = (global as any).requestIdleCallback; (global as any).requestIdleCallback = undefined; jest.resetModules(); - // eslint-disable-next-line @typescript-eslint/no-var-requires + const { IdlingNetworkManager } = await import('..'); const fn = jest.fn(); jest.useFakeTimers(); @@ -17,7 +17,7 @@ describe('RequestIdleCallback', () => { it('should run through requestIdleCallback', async () => { jest.resetModules(); - // eslint-disable-next-line @typescript-eslint/no-var-requires + const { IdlingNetworkManager } = await import('..'); const fn = jest.fn(); jest.useFakeTimers(); diff --git a/packages/react/src/server/nextjs/DataProvider/createPersistedStoreServer.tsx b/packages/react/src/server/nextjs/DataProvider/createPersistedStoreServer.tsx index da2774860659..15c4e9e31757 100644 --- a/packages/react/src/server/nextjs/DataProvider/createPersistedStoreServer.tsx +++ b/packages/react/src/server/nextjs/DataProvider/createPersistedStoreServer.tsx @@ -42,7 +42,7 @@ export default function createPersistedStore(managers?: Manager[]) { const initPromise: Promise> = (async () => { let firstRender = true; - // eslint-disable-next-line no-constant-condition + while (true) { const inFlightFetches = networkManager.allSettled(); if (inFlightFetches) { diff --git a/packages/rest/src/__tests__/RestEndpoint.ts b/packages/rest/src/__tests__/RestEndpoint.ts index 17baae05355e..e0c5a89bb784 100644 --- a/packages/rest/src/__tests__/RestEndpoint.ts +++ b/packages/rest/src/__tests__/RestEndpoint.ts @@ -1369,7 +1369,6 @@ describe('RestEndpoint.fetch()', () => { expect(error).toBeDefined(); expect(error.status).toBe(500); - // eslint-disable-next-line require-atomic-updates console.error = oldError; }); diff --git a/packages/ssr/src/nextjs/DataProvider/createPersistedStoreServer.tsx b/packages/ssr/src/nextjs/DataProvider/createPersistedStoreServer.tsx index d5b9b86c6f18..99f3d67dbb9c 100644 --- a/packages/ssr/src/nextjs/DataProvider/createPersistedStoreServer.tsx +++ b/packages/ssr/src/nextjs/DataProvider/createPersistedStoreServer.tsx @@ -39,7 +39,7 @@ export default function createPersistedStore(managers?: Manager[]) { const initPromise: Promise> = (async () => { let firstRender = true; - // eslint-disable-next-line no-constant-condition + while (true) { const inFlightFetches = networkManager.allSettled(); if (inFlightFetches) { diff --git a/yarn.lock b/yarn.lock index cba804c5137d..6db54fc2c82d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -338,13 +338,13 @@ __metadata: languageName: node linkType: hard -"@anansi/eslint-plugin@npm:1.0.17": - version: 1.0.17 - resolution: "@anansi/eslint-plugin@npm:1.0.17" +"@anansi/eslint-plugin@npm:1.0.18": + version: 1.0.18 + resolution: "@anansi/eslint-plugin@npm:1.0.18" dependencies: "@babel/eslint-parser": "npm:^7.25.9" "@babel/eslint-plugin": "npm:^7.25.9" - "@eslint/js": "npm:^9.15.0" + "@eslint/js": "npm:^9.16.0" eslint-config-prettier: "npm:^9.1.0" eslint-import-resolver-typescript: "npm:^3.6.3" eslint-import-resolver-webpack: "npm:^0.13.9" @@ -355,7 +355,7 @@ __metadata: eslint-plugin-react-hooks: "npm:^5.0.0" globals: "npm:^15.12.0" semver: "npm:^7.6.3" - typescript-eslint: "npm:^8.15.0" + typescript-eslint: "npm:^8.16.0" peerDependencies: "@babel/core": ^7.0.0 eslint: ^9.0.0 @@ -369,7 +369,7 @@ __metadata: optional: true webpack: optional: true - checksum: 10c0/3f551e95493225df4ae6a1b1fc5c27208c111bc7941bf03d96950c1c029dfcc697b2a038d5644b6f345f4e252a7783676ac5e3e7bf84aca4dc86b24a1424c2e2 + checksum: 10c0/51eef8ff723a796bbfa33475ff345aacbd9a26904fe7f005c8e5dd3e19e215642be2b3dda642a27e7b05833c0688813efc8c96770a83042eadbca45f7f27c49d languageName: node linkType: hard @@ -4050,10 +4050,10 @@ __metadata: languageName: node linkType: hard -"@eslint/js@npm:9.15.0, @eslint/js@npm:^9.15.0": - version: 9.15.0 - resolution: "@eslint/js@npm:9.15.0" - checksum: 10c0/56552966ab1aa95332f70d0e006db5746b511c5f8b5e0c6a9b2d6764ff6d964e0b2622731877cbc4e3f0e74c5b39191290d5f48147be19175292575130d499ab +"@eslint/js@npm:9.16.0, @eslint/js@npm:^9.16.0": + version: 9.16.0 + resolution: "@eslint/js@npm:9.16.0" + checksum: 10c0/a55846a4ddade720662d36682f3eaaf38eac06eeee12c83bb837bba2b7d550dadcb3445b104219f0bc1da2e09b4fe5fb5ba123b8338c8c787bcfbd540878df75 languageName: node linkType: hard @@ -6572,9 +6572,9 @@ __metadata: languageName: node linkType: hard -"@testing-library/react-native@npm:12.8.1, @testing-library/react-native@npm:^12.0.1": - version: 12.8.1 - resolution: "@testing-library/react-native@npm:12.8.1" +"@testing-library/react-native@npm:12.9.0, @testing-library/react-native@npm:^12.0.1": + version: 12.9.0 + resolution: "@testing-library/react-native@npm:12.9.0" dependencies: jest-matcher-utils: "npm:^29.7.0" pretty-format: "npm:^29.7.0" @@ -6587,7 +6587,7 @@ __metadata: peerDependenciesMeta: jest: optional: true - checksum: 10c0/8fc3ba4b1e5767fc1d24133a907515aa155b3b400fd8a681bf5957a9bb56e0885569234ab4f7fe66441e91ca9de5f761b1db1fdfc049735bc0c4ecc2b6d92bc5 + checksum: 10c0/d29a2c9a4f1318a8fbf7d53927e42c34bd3bc00c46ba7e4010828c927a2b504cbaa3284deba7780fa467b6b1b2d5ce1a4a2ab9f2d1d08d7a1740dc5b2242df21 languageName: node linkType: hard @@ -7799,15 +7799,15 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/eslint-plugin@npm:8.15.0": - version: 8.15.0 - resolution: "@typescript-eslint/eslint-plugin@npm:8.15.0" +"@typescript-eslint/eslint-plugin@npm:8.16.0": + version: 8.16.0 + resolution: "@typescript-eslint/eslint-plugin@npm:8.16.0" dependencies: "@eslint-community/regexpp": "npm:^4.10.0" - "@typescript-eslint/scope-manager": "npm:8.15.0" - "@typescript-eslint/type-utils": "npm:8.15.0" - "@typescript-eslint/utils": "npm:8.15.0" - "@typescript-eslint/visitor-keys": "npm:8.15.0" + "@typescript-eslint/scope-manager": "npm:8.16.0" + "@typescript-eslint/type-utils": "npm:8.16.0" + "@typescript-eslint/utils": "npm:8.16.0" + "@typescript-eslint/visitor-keys": "npm:8.16.0" graphemer: "npm:^1.4.0" ignore: "npm:^5.3.1" natural-compare: "npm:^1.4.0" @@ -7818,44 +7818,44 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 10c0/90ef10cc7d37a81abec4f4a3ffdfc3a0da8e99d949e03c75437e96e8ab2e896e34b85ab64718690180a7712581031b8611c5d8e7666d6ed4d60b9ace834d58e3 + checksum: 10c0/b03612b726ee5aff631cd50e05ceeb06a522e64465e4efdc134e3a27a09406b959ef7a05ec4acef1956b3674dc4fedb6d3a62ce69382f9e30c227bd4093003e5 languageName: node linkType: hard -"@typescript-eslint/parser@npm:8.15.0": - version: 8.15.0 - resolution: "@typescript-eslint/parser@npm:8.15.0" +"@typescript-eslint/parser@npm:8.16.0": + version: 8.16.0 + resolution: "@typescript-eslint/parser@npm:8.16.0" dependencies: - "@typescript-eslint/scope-manager": "npm:8.15.0" - "@typescript-eslint/types": "npm:8.15.0" - "@typescript-eslint/typescript-estree": "npm:8.15.0" - "@typescript-eslint/visitor-keys": "npm:8.15.0" + "@typescript-eslint/scope-manager": "npm:8.16.0" + "@typescript-eslint/types": "npm:8.16.0" + "@typescript-eslint/typescript-estree": "npm:8.16.0" + "@typescript-eslint/visitor-keys": "npm:8.16.0" debug: "npm:^4.3.4" peerDependencies: eslint: ^8.57.0 || ^9.0.0 peerDependenciesMeta: typescript: optional: true - checksum: 10c0/19c25aea0dc51faa758701a5319a89950fd30494d9d645db8ced84fb60714c5e7d4b51fc4ee8ccb07ddefec88c51ee307ee7e49addd6330ee8f3e7ee9ba329fc + checksum: 10c0/e49c6640a7a863a16baecfbc5b99392a4731e9c7e9c9aaae4efbc354e305485fe0f39a28bf0acfae85bc01ce37fe0cc140fd315fdaca8b18f9b5e0addff8ceae languageName: node linkType: hard -"@typescript-eslint/scope-manager@npm:8.15.0": - version: 8.15.0 - resolution: "@typescript-eslint/scope-manager@npm:8.15.0" +"@typescript-eslint/scope-manager@npm:8.16.0": + version: 8.16.0 + resolution: "@typescript-eslint/scope-manager@npm:8.16.0" dependencies: - "@typescript-eslint/types": "npm:8.15.0" - "@typescript-eslint/visitor-keys": "npm:8.15.0" - checksum: 10c0/c27dfdcea4100cc2d6fa967f857067cbc93155b55e648f9f10887a1b9372bb76cf864f7c804f3fa48d7868d9461cdef10bcea3dab7637d5337e8aa8042dc08b9 + "@typescript-eslint/types": "npm:8.16.0" + "@typescript-eslint/visitor-keys": "npm:8.16.0" + checksum: 10c0/23b7c738b83f381c6419a36e6ca951944187e3e00abb8e012bce8041880410fe498303e28bdeb0e619023a69b14cf32a5ec1f9427c5382807788cd8e52a46a6e languageName: node linkType: hard -"@typescript-eslint/type-utils@npm:8.15.0": - version: 8.15.0 - resolution: "@typescript-eslint/type-utils@npm:8.15.0" +"@typescript-eslint/type-utils@npm:8.16.0": + version: 8.16.0 + resolution: "@typescript-eslint/type-utils@npm:8.16.0" dependencies: - "@typescript-eslint/typescript-estree": "npm:8.15.0" - "@typescript-eslint/utils": "npm:8.15.0" + "@typescript-eslint/typescript-estree": "npm:8.16.0" + "@typescript-eslint/utils": "npm:8.16.0" debug: "npm:^4.3.4" ts-api-utils: "npm:^1.3.0" peerDependencies: @@ -7863,23 +7863,23 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 10c0/20f09c79c83b38a962cf7eff10d47a2c01bcc0bab7bf6d762594221cd89023ef8c7aec26751c47b524f53f5c8d38bba55a282529b3df82d5f5ab4350496316f9 + checksum: 10c0/24c0e815c8bdf99bf488c7528bd6a7c790e8b3b674cb7fb075663afc2ee26b48e6f4cf7c0d14bb21e2376ca62bd8525cbcb5688f36135b00b62b1d353d7235b9 languageName: node linkType: hard -"@typescript-eslint/types@npm:8.15.0": - version: 8.15.0 - resolution: "@typescript-eslint/types@npm:8.15.0" - checksum: 10c0/84abc6fd954aff13822a76ac49efdcb90a55c0025c20eee5d8cebcfb68faff33b79bbc711ea524e0209cecd90c5ee3a5f92babc7083c081d3a383a0710264a41 +"@typescript-eslint/types@npm:8.16.0": + version: 8.16.0 + resolution: "@typescript-eslint/types@npm:8.16.0" + checksum: 10c0/141e257ab4060a9c0e2e14334ca14ab6be713659bfa38acd13be70a699fb5f36932a2584376b063063ab3d723b24bc703dbfb1ce57d61d7cfd7ec5bd8a975129 languageName: node linkType: hard -"@typescript-eslint/typescript-estree@npm:8.15.0": - version: 8.15.0 - resolution: "@typescript-eslint/typescript-estree@npm:8.15.0" +"@typescript-eslint/typescript-estree@npm:8.16.0": + version: 8.16.0 + resolution: "@typescript-eslint/typescript-estree@npm:8.16.0" dependencies: - "@typescript-eslint/types": "npm:8.15.0" - "@typescript-eslint/visitor-keys": "npm:8.15.0" + "@typescript-eslint/types": "npm:8.16.0" + "@typescript-eslint/visitor-keys": "npm:8.16.0" debug: "npm:^4.3.4" fast-glob: "npm:^3.3.2" is-glob: "npm:^4.0.3" @@ -7889,34 +7889,34 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 10c0/3af5c129532db3575349571bbf64d32aeccc4f4df924ac447f5d8f6af8b387148df51965eb2c9b99991951d3dadef4f2509d7ce69bf34a2885d013c040762412 + checksum: 10c0/f28fea5af4798a718b6735d1758b791a331af17386b83cb2856d89934a5d1693f7cb805e73c3b33f29140884ac8ead9931b1d7c3de10176fa18ca7a346fe10d0 languageName: node linkType: hard -"@typescript-eslint/utils@npm:8.15.0": - version: 8.15.0 - resolution: "@typescript-eslint/utils@npm:8.15.0" +"@typescript-eslint/utils@npm:8.16.0": + version: 8.16.0 + resolution: "@typescript-eslint/utils@npm:8.16.0" dependencies: "@eslint-community/eslint-utils": "npm:^4.4.0" - "@typescript-eslint/scope-manager": "npm:8.15.0" - "@typescript-eslint/types": "npm:8.15.0" - "@typescript-eslint/typescript-estree": "npm:8.15.0" + "@typescript-eslint/scope-manager": "npm:8.16.0" + "@typescript-eslint/types": "npm:8.16.0" + "@typescript-eslint/typescript-estree": "npm:8.16.0" peerDependencies: eslint: ^8.57.0 || ^9.0.0 peerDependenciesMeta: typescript: optional: true - checksum: 10c0/65743f51845a1f6fd2d21f66ca56182ba33e966716bdca73d30b7a67c294e47889c322de7d7b90ab0818296cd33c628e5eeeb03cec7ef2f76c47de7a453eeda2 + checksum: 10c0/1e61187eef3da1ab1486d2a977d8f3b1cb8ef7fa26338500a17eb875ca42a8942ef3f2241f509eef74cf7b5620c109483afc7d83d5b0ab79b1e15920f5a49818 languageName: node linkType: hard -"@typescript-eslint/visitor-keys@npm:8.15.0": - version: 8.15.0 - resolution: "@typescript-eslint/visitor-keys@npm:8.15.0" +"@typescript-eslint/visitor-keys@npm:8.16.0": + version: 8.16.0 + resolution: "@typescript-eslint/visitor-keys@npm:8.16.0" dependencies: - "@typescript-eslint/types": "npm:8.15.0" + "@typescript-eslint/types": "npm:8.16.0" eslint-visitor-keys: "npm:^4.2.0" - checksum: 10c0/02a954c3752c4328482a884eb1da06ca8fb72ae78ef28f1d854b18f3779406ed47263af22321cf3f65a637ec7584e5f483e34a263b5c8cec60ec85aebc263574 + checksum: 10c0/537df37801831aa8d91082b2adbffafd40305ed4518f0e7d3cbb17cc466d8b9ac95ac91fa232e7fe585d7c522d1564489ec80052ebb2a6ab9bbf89ef9dd9b7bc languageName: node linkType: hard @@ -13857,16 +13857,16 @@ __metadata: languageName: node linkType: hard -"eslint@npm:9.15.0": - version: 9.15.0 - resolution: "eslint@npm:9.15.0" +"eslint@npm:9.16.0": + version: 9.16.0 + resolution: "eslint@npm:9.16.0" dependencies: "@eslint-community/eslint-utils": "npm:^4.2.0" "@eslint-community/regexpp": "npm:^4.12.1" "@eslint/config-array": "npm:^0.19.0" "@eslint/core": "npm:^0.9.0" "@eslint/eslintrc": "npm:^3.2.0" - "@eslint/js": "npm:9.15.0" + "@eslint/js": "npm:9.16.0" "@eslint/plugin-kit": "npm:^0.2.3" "@humanfs/node": "npm:^0.16.6" "@humanwhocodes/module-importer": "npm:^1.0.1" @@ -13902,7 +13902,7 @@ __metadata: optional: true bin: eslint: bin/eslint.js - checksum: 10c0/d0d7606f36bfcccb1c3703d0a24df32067b207a616f17efe5fb1765a91d13f085afffc4fc97ecde4ab9c9f4edd64d9b4ce750e13ff7937a25074b24bee15b20f + checksum: 10c0/f36d12652c6f20bab8a77375b8ad29a6af030c3840deb0a5f9dd4cee49d68a2d68d7dc73b0c25918df59d83cd686dd5712e11387e696e1f3842e8dde15cd3255 languageName: node linkType: hard @@ -24676,12 +24676,12 @@ __metadata: languageName: node linkType: hard -"prettier@npm:3.3.3, prettier@npm:^3.0.0": - version: 3.3.3 - resolution: "prettier@npm:3.3.3" +"prettier@npm:3.4.1, prettier@npm:^3.0.0": + version: 3.4.1 + resolution: "prettier@npm:3.4.1" bin: prettier: bin/prettier.cjs - checksum: 10c0/b85828b08e7505716324e4245549b9205c0cacb25342a030ba8885aba2039a115dbcf75a0b7ca3b37bc9d101ee61fab8113fc69ca3359f2a226f1ecc07ad2e26 + checksum: 10c0/2d6cc3101ad9de72b49c59339480b0983e6ff6742143da0c43f476bf3b5ef88ede42ebd9956d7a0a8fa59f7a5990e8ef03c9ad4c37f7e4c9e5db43ee0853156c languageName: node linkType: hard @@ -26707,7 +26707,7 @@ __metadata: dependencies: "@anansi/babel-preset": "npm:6.0.9" "@anansi/browserslist-config": "npm:1.5.1" - "@anansi/eslint-plugin": "npm:1.0.17" + "@anansi/eslint-plugin": "npm:1.0.18" "@anansi/jest-preset": "npm:0.11.8" "@babel/cli": "npm:7.25.9" "@babel/core": "npm:7.26.0" @@ -26722,7 +26722,7 @@ __metadata: "@react-navigation/native-stack": "npm:^7.0.0" "@testing-library/react": "npm:16.0.1" "@testing-library/react-hooks": "npm:8.0.1" - "@testing-library/react-native": "npm:12.8.1" + "@testing-library/react-native": "npm:12.9.0" "@types/jest": "npm:29.5.14" "@types/node": "npm:22.10.1" "@types/react": "npm:types-react@19.0.0-rc.1" @@ -26737,7 +26737,7 @@ __metadata: cpy-cli: "npm:5.0.0" cross-fetch: "npm:^4.0.0" downlevel-dts: "npm:^0.10.0" - eslint: "npm:9.15.0" + eslint: "npm:9.16.0" globals: "npm:^15.9.0" ignore-styles: "npm:^5.0.1" jest: "npm:29.7.0" @@ -26746,7 +26746,7 @@ __metadata: nock: "npm:13.3.1" node-fetch: "npm:^3.3.0" npm-run-all: "npm:^4.1.5" - prettier: "npm:3.3.3" + prettier: "npm:3.4.1" react: "npm:^19.0.0-rc.1" react-dom: "npm:^19.0.0-rc.1" react-native: "npm:0.76.3" @@ -29418,19 +29418,19 @@ __metadata: languageName: node linkType: hard -"typescript-eslint@npm:^8.15.0": - version: 8.15.0 - resolution: "typescript-eslint@npm:8.15.0" +"typescript-eslint@npm:^8.16.0": + version: 8.16.0 + resolution: "typescript-eslint@npm:8.16.0" dependencies: - "@typescript-eslint/eslint-plugin": "npm:8.15.0" - "@typescript-eslint/parser": "npm:8.15.0" - "@typescript-eslint/utils": "npm:8.15.0" + "@typescript-eslint/eslint-plugin": "npm:8.16.0" + "@typescript-eslint/parser": "npm:8.16.0" + "@typescript-eslint/utils": "npm:8.16.0" peerDependencies: eslint: ^8.57.0 || ^9.0.0 peerDependenciesMeta: typescript: optional: true - checksum: 10c0/589aebf0d0b9b79db1cd0b7c2ea08c6b5727c1db095d39077d070c332066c7d549a0eb2ef60b0d41619720c317c1955236c5c8ee6320bc7c6ae475add7223b55 + checksum: 10c0/3da9401d6c2416b9d95c96a41a9423a5379d233a120cd3304e2c03f191d350ce91cf0c7e60017f7b10c93b4cc1190592702735735b771c1ce1bf68f71a9f1647 languageName: node linkType: hard