Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
9b6b9de
Add `configs` to `workspaces`
aryaemami59 Aug 27, 2024
7781664
use foreach so publish doesn't fail if package doesn't have tests, an…
EskiMojo14 Feb 8, 2024
b6e81dc
Build `config` packages on `postinstall`
aryaemami59 Aug 27, 2024
260f923
Initialize all the `config` packages
aryaemami59 Aug 27, 2024
a7586d3
Use the shareable Prettier config
aryaemami59 Aug 27, 2024
3f14e4a
Use the shareable ESLint config
aryaemami59 Aug 27, 2024
cc7230b
Use shareable `tsconfig.json` files
aryaemami59 Aug 28, 2024
0d71b78
Use the shareable Vitest config
aryaemami59 Aug 28, 2024
dca79bc
Run `yarn format` to format all files
aryaemami59 Sep 3, 2024
6ce8871
Add `AnyNonNullishValue` helper type
aryaemami59 Sep 3, 2024
275c2e0
Add `AnyFunction` helper type
aryaemami59 Sep 3, 2024
5b9b778
Add `EmptyObject` helper type
aryaemami59 Sep 3, 2024
718d0d2
Add `AnyObject` helper type
aryaemami59 Sep 3, 2024
e70c337
Add `isObject` and `hasBodyAndHeaders` utility functions
aryaemami59 Sep 3, 2024
a69e82c
Change all `let` variables to `const` to comply with `prefer-const` rule
aryaemami59 Sep 3, 2024
dc41266
Make `hasBodyAndHeaders` assertion looser
aryaemami59 Sep 3, 2024
88d1f17
Use `hasBodyAndHeaders` to fix TS issues in `fetchBaseQuery.test.tsx`
aryaemami59 Sep 3, 2024
0170457
Fix lint issues related to the `no-prototype-builtins` rule
aryaemami59 Sep 3, 2024
137f315
Fix `no-unsafe-optional-chaining` related problems
aryaemami59 Feb 3, 2024
2f78ece
Fix `@typescript-eslint/prefer-as-const` related problems
aryaemami59 Sep 3, 2024
affc5e8
Fix `no-extra-boolean-cast` related problems
aryaemami59 Sep 3, 2024
a596a5a
Fix `no-constant-condition` related problems
aryaemami59 Feb 3, 2024
b79b9e5
Fix `no-empty` related problems
aryaemami59 Feb 3, 2024
24c50e3
Replace all `Function` references with `AnyFunction`
aryaemami59 Feb 3, 2024
61086e8
Move custom matchers into `vitest.setup.ts`
aryaemami59 Feb 8, 2024
9127134
Fix `@typescript-eslint/no-unnecessary-type-constraint` related problems
aryaemami59 Sep 3, 2024
e6778e9
Disable `prefer-rest-params` inside `composeWithDevTools`
aryaemami59 Feb 8, 2024
d9d6b89
Fix `@typescript-eslint/no-var-requires` related problems
aryaemami59 Feb 3, 2024
f232712
Fix issues related to the `@typescript-eslint/prefer-function-type` rule
aryaemami59 Feb 3, 2024
618b4e2
Fix problems related to the `@typescript-eslint/no-empty-function` rule
aryaemami59 Feb 7, 2024
51521c0
Fix problems related to the `sort-imports` rule
aryaemami59 Sep 3, 2024
8704baa
Replace all `{}` types with `AnyNonNullishValue`
aryaemami59 Feb 3, 2024
9500a85
Remove unused ESLint disable directives
aryaemami59 Sep 4, 2024
a143442
Fix `@typescript-eslint/no-unused-expressions` related issues
aryaemami59 Jul 31, 2024
147cb81
Fix problems related to the `@typescript-eslint/array-type` rule
aryaemami59 Sep 4, 2024
48e889d
Fix `noImplicitReturns`-related issues in `src/tests/utils/helpers.tsx`
aryaemami59 Sep 4, 2024
a93bc7d
Fix issues related to `hasBodyAndHeaders` usage
aryaemami59 Sep 4, 2024
2d307b2
Lint files and check formatting during CI
aryaemami59 Sep 4, 2024
c7c2d3c
Fix TS issues related to `AnyNonNullishValue`
aryaemami59 Sep 5, 2024
d2f46c9
Fix TS issues related to `EmptyObject`
aryaemami59 Sep 5, 2024
2854438
Remove unused imports
aryaemami59 Sep 21, 2024
bc933f4
Resolve remaining lint errors
aryaemami59 Feb 14, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove unused imports
  • Loading branch information
aryaemami59 committed Oct 22, 2025
commit 285443810fbf697595f0d762c79e2cc791bcd570
18 changes: 11 additions & 7 deletions packages/toolkit/src/entities/tests/state_selectors.test.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
import { createDraftSafeSelectorCreator } from '../../createDraftSafeSelector'
import type { EntityAdapter, EntityState } from '../index'
import { createEntityAdapter } from '../index'
import type { EntitySelectors } from '../models'
import type {
EntityAdapter,
EntitySelectors,
EntityState,
Selector,
} from '@reduxjs/toolkit'
import {
createDraftSafeSelectorCreator,
createEntityAdapter,
createSelector,
} from '@reduxjs/toolkit'
import type { BookModel } from './fixtures/book'
import { AClockworkOrange, AnimalFarm, TheGreatGatsby } from './fixtures/book'
import type { Selector } from 'reselect'
import { createSelector, weakMapMemoize } from 'reselect'
import { vi } from 'vitest'

describe('Entity State Selectors', () => {
describe('Composed Selectors', () => {
Expand Down
1 change: 0 additions & 1 deletion packages/toolkit/src/immutableStateInvariantMiddleware.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type { Middleware } from 'redux'
import type { IgnorePaths } from './serializableStateInvariantMiddleware'
import type { AnyObject } from './tsHelpers'
import { getTimeMeasureUtils } from './utils'

type EntryProcessor = (key: string, value: any) => any
Expand Down
17 changes: 10 additions & 7 deletions packages/toolkit/src/listenerMiddleware/tests/fork.test.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
import type { EnhancedStore } from '@reduxjs/toolkit'
import { configureStore, createAction, createSlice } from '@reduxjs/toolkit'

import type { PayloadAction } from '@reduxjs/toolkit'
import type {
AbortSignalWithReason,
ForkedTaskExecutor,
PayloadAction,
TaskResult,
} from '../types'
import { TaskAbortError, createListenerMiddleware } from '../index'
} from '@reduxjs/toolkit'
import {
TaskAbortError,
configureStore,
createAction,
createListenerMiddleware,
createSlice,
} from '@reduxjs/toolkit'
import {
listenerCancelled,
listenerCompleted,
taskCancelled,
taskCompleted,
} from '../exceptions'
import type { AbortSignalWithReason } from '../types'

function delay(ms: number) {
return new Promise((resolve) => setTimeout(resolve, ms))
Expand Down
11 changes: 3 additions & 8 deletions packages/toolkit/src/listenerMiddleware/tests/useCases.test.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
import type { PayloadAction } from '@reduxjs/toolkit'
import {
TaskAbortError,
configureStore,
createAction,
createListenerMiddleware,
createSlice,
isAnyOf,
} from '@reduxjs/toolkit'

import type { PayloadAction } from '@reduxjs/toolkit'

import { createListenerMiddleware } from '../index'

import type { TypedAddListener } from '../index'
import { TaskAbortError } from '../exceptions'

interface CounterState {
value: number
}
Expand Down
5 changes: 1 addition & 4 deletions packages/toolkit/src/query/core/setupListeners.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import type {
ActionCreatorWithoutPayload,
ThunkDispatch, // Workaround for API-Extractor
} from '@reduxjs/toolkit'
import type { ThunkDispatch } from '@reduxjs/toolkit'
import { createAction } from './rtkImports'

export const onFocus = /* @__PURE__ */ createAction('__rtkq/focused')
Expand Down
1 change: 0 additions & 1 deletion packages/toolkit/src/query/tests/fetchBaseQuery.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import type { FetchArgs } from '@reduxjs/toolkit/query'
import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query'
import { headersToObject } from 'headers-polyfill'
import { HttpResponse, delay, http } from 'msw'
// @ts-ignore
import nodeFetch from 'node-fetch'
import queryString from 'query-string'
import { vi } from 'vitest'
Expand Down
12 changes: 7 additions & 5 deletions packages/toolkit/src/tests/autoBatchEnhancer.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import { configureStore } from '../configureStore'
import { createSlice } from '../createSlice'
import type { AutoBatchOptions } from '../autoBatchEnhancer'
import { autoBatchEnhancer, prepareAutoBatched } from '../autoBatchEnhancer'
import { delay } from '../utils'
import type { AutoBatchOptions } from '@reduxjs/toolkit'
import {
configureStore,
createSlice,
prepareAutoBatched,
} from '@reduxjs/toolkit'
import { debounce } from 'lodash'
import { delay } from '../utils'

interface CounterState {
value: number
Expand Down