Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Centralize tooling configs in monorepo #4138

Open
wants to merge 364 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 95 commits
Commits
Show all changes
364 commits
Select commit Hold shift + click to select a range
7755545
Merge branch 'master' of https://github.com/reduxjs/redux-toolkit int…
aryaemami59 Feb 12, 2024
e20881c
Fix ESLint issues in `create_adapter.ts`
aryaemami59 Feb 12, 2024
ba254be
Bump `@typescript-eslint`
aryaemami59 Feb 13, 2024
5062ee2
Remove unused ESLint directives
aryaemami59 Feb 13, 2024
549644b
Fix ESLint related issues in js files
aryaemami59 Feb 13, 2024
2b3e636
Rename `eslint.config.ts` to `eslint.legacy.config.ts`
aryaemami59 Feb 13, 2024
f452be3
Add ESLint flat config
aryaemami59 Feb 13, 2024
e18ca7e
Fix `eslint.legacy.config.ts`
aryaemami59 Feb 13, 2024
26fbc7f
Type check JS files
aryaemami59 Feb 13, 2024
16d6382
Change `moduleResolution` to `NodeNext` according to ts-eslint's docs
aryaemami59 Feb 13, 2024
2d62d10
Fix entry points
aryaemami59 Feb 13, 2024
403de4a
Fix `peerDependencies` according to ts-eslint's docs
aryaemami59 Feb 13, 2024
d738d2e
Fix dependencies according to ts-eslint's docs
aryaemami59 Feb 13, 2024
e3603b6
Fix all `devDependencies`
aryaemami59 Feb 13, 2024
c51ed07
Add different ESLint config files for a trial run
aryaemami59 Feb 13, 2024
15885c4
add `@ts-expect-error` directive
aryaemami59 Feb 13, 2024
eeec472
Fix type Imports
aryaemami59 Feb 13, 2024
90fa3b4
Remove flat config
aryaemami59 Feb 13, 2024
df015ce
Fix legacy config
aryaemami59 Feb 13, 2024
5fd815b
Remove flat config entry points
aryaemami59 Feb 13, 2024
ba1b4b5
Remove extra ESLint config files
aryaemami59 Feb 13, 2024
4eca259
Fix `lint` command
aryaemami59 Feb 13, 2024
629d4cf
Fix ESLint couldn't determine the plugin "@typescript-eslint" uniquely.
aryaemami59 Feb 13, 2024
4c075dc
Remove `"type": "module"` from `package.json`
aryaemami59 Feb 14, 2024
31e52c6
Add `vite-tsconfig-paths` to dependencies
aryaemami59 Feb 14, 2024
aad3bc4
Add `peerDependencies`
aryaemami59 Feb 14, 2024
7c40188
Add `tsconfigPaths`
aryaemami59 Feb 14, 2024
9722a89
Increase `testTimeout` to 10,000 ms
aryaemami59 Feb 14, 2024
faabbcb
Add additional config for in source testing
aryaemami59 Feb 14, 2024
a4fa765
Rename `.prettierrc.json` to `prettier.config.mjs`
aryaemami59 Feb 14, 2024
01fb6c0
Make `tsconfig.json` LF
aryaemami59 Feb 14, 2024
be65a80
Rename `prettierConfig` to `reduxPrettierConfig`
aryaemami59 Feb 14, 2024
f9c75e9
Reformat all files
aryaemami59 Feb 14, 2024
d59d633
Merge branch 'master' of https://github.com/reduxjs/redux-toolkit int…
aryaemami59 Feb 14, 2024
f253d34
Add `@ts-ignore` directive
aryaemami59 Feb 14, 2024
602b4b7
Add `.eslintcache` to `.gitignore` file
aryaemami59 Feb 14, 2024
0125a60
Enable caching for ESLint
aryaemami59 Feb 14, 2024
96efedd
Move `globals` to `dependencies`
aryaemami59 Feb 14, 2024
5370b73
Add `types` field` in `package.json`
aryaemami59 Feb 14, 2024
f494fdd
Remove `"type": "module"` from `package.json`
aryaemami59 Feb 14, 2024
e079cd8
Fix Prettier config's `tsconfig.json`
aryaemami59 Feb 14, 2024
ab1f4cd
Fix Prettier config's entry points
aryaemami59 Feb 14, 2024
018ce6a
Merge branch 'master' of https://github.com/reduxjs/redux-toolkit int…
aryaemami59 Feb 14, 2024
1367d82
Bump Prettier
aryaemami59 Feb 14, 2024
a5b2003
Format all files in the toolkit
aryaemami59 Feb 14, 2024
75ce919
Remove `"type": "module"` in `package.json` of `@reduxjs/tsconfig`
aryaemami59 Feb 14, 2024
47069e8
Update exports in `package.json`
aryaemami59 Feb 15, 2024
2d3e584
Update `vitestGlobals` in `eslint.legacy.config.ts`
aryaemami59 Feb 15, 2024
7f83fe2
Remove `tsconfig.test.json`
aryaemami59 Feb 15, 2024
5c5d1f1
Reformat files
aryaemami59 Feb 15, 2024
f60784e
Build `errors.json` file
aryaemami59 Feb 15, 2024
e56b8c0
Rename `vitestConfig` to `reduxVitestConfig`
aryaemami59 Feb 15, 2024
be2704a
Enable caching for Prettier
aryaemami59 Feb 15, 2024
153d8b2
Add entry points for `@reduxjs/vitest-config`
aryaemami59 Feb 15, 2024
8fd2aa7
Add all the config packages to `devDependencies`
aryaemami59 Feb 15, 2024
ed0e13a
Remove `postinstall` script from `package.json`
aryaemami59 Feb 15, 2024
a15d4fc
Fix `build:configs` command
aryaemami59 Feb 15, 2024
c7dc43c
Make shareable tsconfigs backwards compatible with TS < 5.0
aryaemami59 Feb 17, 2024
2235cff
Fix issue with extending tsconfigs
aryaemami59 Feb 17, 2024
c05ea67
Convert `mangleErrors.cjs` to `mangleErrors.mjs`
aryaemami59 Feb 17, 2024
75110d6
Slightly modify ESLint config
aryaemami59 Feb 17, 2024
39325d4
Add `preinstall` command
aryaemami59 Feb 17, 2024
486208d
Bump Vitest
aryaemami59 Feb 17, 2024
5463cf4
Change tsconfigs line endings to LF
aryaemami59 Feb 18, 2024
8b511e0
Sort `tsconfig.json`s
aryaemami59 Feb 18, 2024
f9a0ed4
Hoist the config files
aryaemami59 Feb 18, 2024
86c72e7
Use shareable Vitest config
aryaemami59 Feb 18, 2024
3471e14
Merge branch 'master' of https://github.com/reduxjs/redux-toolkit int…
aryaemami59 Feb 18, 2024
dec2b79
Add `createPrettierConfig` TS helper
aryaemami59 Feb 18, 2024
c26d131
Use the shareable Prettier config
aryaemami59 Feb 18, 2024
5a4e639
Add `createLegacyESLintConfig` TS helper
aryaemami59 Feb 18, 2024
f632999
Make parameter of `createPrettierConfig` optional
aryaemami59 Feb 18, 2024
65c6967
Reuse shareable `tsconfig.json` across monorepo
aryaemami59 Feb 18, 2024
e1f40e2
Remove `prettier` field from `package.json`
aryaemami59 Feb 20, 2024
d001ac3
Merge branch 'master' of https://github.com/reduxjs/redux-toolkit int…
aryaemami59 Feb 21, 2024
6f72cfd
Merge branch 'master' of https://github.com/reduxjs/redux-toolkit int…
aryaemami59 Feb 21, 2024
17e9ad5
Remove duplicate fields from `tsconfig.json`
aryaemami59 Feb 22, 2024
e48e1b3
Format all files
aryaemami59 Feb 22, 2024
8f6c98f
Fix `test/tsconfig.json` file for codegen
aryaemami59 Feb 22, 2024
e0aa8dd
Fix `package.json` for `@reduxjs/prettier-config`
aryaemami59 Feb 22, 2024
0e046a8
Fix `package.json` for `@reduxjs/eslint-config`
aryaemami59 Feb 22, 2024
d1f6dc2
Bump dependencies for `@reduxjs/eslint-config`
aryaemami59 Feb 22, 2024
be7103e
Rename `.eslintrc.json` to `.eslintrc.cjs`
aryaemami59 Feb 22, 2024
51302a7
Fix default export issue in `eslint.legacy.config.ts`
aryaemami59 Feb 22, 2024
8a6800b
Add JSDocs for `@reduxjs/eslint-config`
aryaemami59 Feb 22, 2024
aaa2924
Add JSDocs for `@reduxjs/prettier-config`
aryaemami59 Feb 22, 2024
3ab5261
Bump ESLint packages
aryaemami59 Feb 24, 2024
6375388
Fix peer dependencies for `@reduxjs/eslint-config`
aryaemami59 Feb 24, 2024
f967b44
Rename `eslint.legacy.config.ts` to `eslint.config.ts`
aryaemami59 Feb 24, 2024
b1a6f65
Rename `.eslintrc.cjs` to `eslint.config.mjs` and switch to flat config
aryaemami59 Feb 24, 2024
0c9b577
Fix prettier config
aryaemami59 Feb 24, 2024
707aea8
De-duplicate `typescript-eslint` instances
aryaemami59 Feb 24, 2024
7bdc8dc
Bump Vitest for `@reduxjs/vitest-config`
aryaemami59 Feb 24, 2024
377dbca
Deduplicate instances of Vitest
aryaemami59 Feb 24, 2024
a669289
Add JSDocs for `reduxESLintConfig`
aryaemami59 Feb 24, 2024
d1a35a6
Add JSDocs for `reduxVitestConfig`
aryaemami59 Feb 24, 2024
cb10613
Add `createVitestConfig` function for ease of use
aryaemami59 Feb 24, 2024
1fbfbcc
Use `createVitestConfig` instead.
aryaemami59 Feb 24, 2024
3771cfc
Fix `package.json` for `@reduxjs/vitest-config`
aryaemami59 Feb 24, 2024
489381b
Revert "Fix `package.json` for `@reduxjs/vitest-config`"
aryaemami59 Feb 24, 2024
8f5e55f
Bump `typescript-eslint`
aryaemami59 Feb 27, 2024
9377095
Fix linking codes in JSDocs
aryaemami59 Feb 27, 2024
e725e1f
Remove `preinstall` command for config packages
aryaemami59 Feb 27, 2024
6ccabe4
Add `install` command to root `package.json`
aryaemami59 Feb 27, 2024
a497364
Fix minor type issues inside related to `createPrettierConfig`
aryaemami59 Feb 27, 2024
23ff385
Fix dependencies of `@reduxjs/eslint-config`
aryaemami59 Feb 27, 2024
f261c9d
Add `@reduxjs/tsconfig` to dev dependencies of config packages
aryaemami59 Feb 28, 2024
3789283
Bump dependencies for `@reduxjs/eslint-config`
aryaemami59 Mar 5, 2024
7e8fe99
Move `@eslint/js` from dev dependencies to dependencies
aryaemami59 Mar 5, 2024
604d3bc
Merge branch 'master' of https://github.com/reduxjs/redux-toolkit int…
aryaemami59 Mar 5, 2024
0be4ab5
Merge branch 'master' of https://github.com/reduxjs/redux-toolkit int…
aryaemami59 Mar 5, 2024
4281a94
Update `eslint.config.ts` to import specific properties from `globals`
aryaemami59 Mar 7, 2024
a753a28
Refactor `createESLintConfig` to use `Array.concat()`
aryaemami59 Mar 7, 2024
2ca93cd
Add examples for using ESLint configuration in different module formats
aryaemami59 Mar 7, 2024
934c09a
Add examples in JSDocs for using Prettier configuration
aryaemami59 Mar 7, 2024
4055315
Rename `prettier.config.mts` to `prettier.config.ts`
aryaemami59 Mar 7, 2024
0c3c31b
Fix `package.json` entry points for `@reduxjs/prettier-config`
aryaemami59 Mar 7, 2024
4c80ac9
Move `types` field up to comply with Node.js guidelines
aryaemami59 Mar 7, 2024
06cbb0d
Add examples in JSDocs for using Vitest configuration
aryaemami59 Mar 7, 2024
d6988f8
Update `createVitestConfig` to use a default parameter
aryaemami59 Mar 7, 2024
52f5946
Destructure imports from `globals` instead of using named imports
aryaemami59 Mar 7, 2024
de1c1c9
Switch `tsconfig.json` `"module"` from `"NodeNext"` to `"ESNext"`
aryaemami59 Mar 7, 2024
31b553d
Rename `eslint.config.ts` to `eslint.config.mts`
aryaemami59 Mar 7, 2024
898e1f1
Fix `package.json` entry points for `@reduxjs/eslint-config`
aryaemami59 Mar 7, 2024
22772fd
Revise `eslint.config.mts` JSDocs for ESM in CJS via async IIFE
aryaemami59 Mar 7, 2024
863cb2a
Revert "Rename `prettier.config.mts` to `prettier.config.ts`"
aryaemami59 Mar 7, 2024
5059cb4
Switch `tsconfig.json` `"module"` from `"NodeNext"` to `"ESNext"`
aryaemami59 Mar 7, 2024
df03635
Revert "Fix `package.json` entry points for `@reduxjs/prettier-config`"
aryaemami59 Mar 7, 2024
0d10621
Revise `prettier.config.mts` JSDocs for ESM in CJS via async IIFE
aryaemami59 Mar 7, 2024
142b1b7
Drop `require` exports in `@reduxjs/prettier-config`'s `package.json`
aryaemami59 Mar 7, 2024
3be1556
Revise `vitest.config.mts` JSDocs for ESM in CJS via async IIFE
aryaemami59 Mar 7, 2024
0227fec
Merge branch 'master' of https://github.com/reduxjs/redux-toolkit int…
aryaemami59 Mar 8, 2024
4776eb9
Add `node` entry point for `@reduxjs/eslint-config`
aryaemami59 Mar 9, 2024
91b0bbc
Update `@typescript-eslint/parser` and `@typescript-eslint/utils`
aryaemami59 Mar 9, 2024
c91377f
Fix `@reduxjs/eslint-config` according to `typescript-eslint`'s new docs
aryaemami59 Mar 9, 2024
fc9004e
Add `node` entry point for `@reduxjs/prettier-config`
aryaemami59 Mar 10, 2024
94fb3a7
Merge branch 'master' of https://github.com/reduxjs/redux-toolkit int…
aryaemami59 Mar 11, 2024
e097452
Bump `typescript-eslint` related deps for `@reduxjs/eslint-config`
aryaemami59 Mar 13, 2024
cfea945
Use `ConfigWithExtends`
aryaemami59 Mar 13, 2024
7658c06
Fix `files` for `@reduxjs/eslint-config`
aryaemami59 Mar 13, 2024
c4b5e12
Add `"declaration": false` to `tsconfig.test.json`
aryaemami59 Mar 13, 2024
de7adcd
Bump `typescript-eslint` packages for toolkit
aryaemami59 Mar 13, 2024
0971e20
Fix dependencies of `@reduxjs/eslint-config`
aryaemami59 Mar 13, 2024
ca952bf
Bump TypeScript for `@reduxjs/eslint-config`
aryaemami59 Mar 13, 2024
c74c0cc
Remove `eslint-config-prettier` from `devDependencies`
aryaemami59 Mar 13, 2024
00dc289
Fix `files` of `@reduxjs/prettier-config`
aryaemami59 Mar 13, 2024
7be4ee6
Bump TypeScript for `@reduxjs/prettier-config`
aryaemami59 Mar 13, 2024
ad3204c
Add `node` entry point for `@reduxjs/vitest-config`
aryaemami59 Mar 13, 2024
9a23b41
Fix `files` of `@reduxjs/vitest-config`
aryaemami59 Mar 13, 2024
caffd10
Bump TypeScript for `@reduxjs/vitest-config`
aryaemami59 Mar 13, 2024
850d85f
Fix `peerDependencies` of `@reduxjs/vitest-config`
aryaemami59 Mar 13, 2024
cb1ea5a
Update the `repository` field for all config packages
aryaemami59 Mar 13, 2024
5271b3e
Bump `vitest` for `@reduxjs/vitest-config`
aryaemami59 Mar 16, 2024
892ca28
Bump `vitest` to latest version for `toolkit`
aryaemami59 Mar 16, 2024
609ed68
Bump `vite-tsconfig-paths` for `@reduxjs/vitest-config`
aryaemami59 Mar 16, 2024
3c84941
Bump `typescript-eslint` packages for `@reduxjs/eslint-config`
aryaemami59 Mar 19, 2024
96639bb
Update lockfile
aryaemami59 Mar 19, 2024
2a7dbfd
Merge branch 'master' of https://github.com/reduxjs/redux-toolkit int…
aryaemami59 Mar 21, 2024
d062a49
Bump `@types/eslint` for `@reduxjs/eslint-config`
aryaemami59 Mar 22, 2024
5fad22d
Bump TypeScript for `@reduxjs/eslint-config`
aryaemami59 Mar 22, 2024
d602acc
Bump TypeScript for `@reduxjs/prettier-config`
aryaemami59 Mar 22, 2024
b6eca6a
Bump TypeScript for `@reduxjs/vitest-config`
aryaemami59 Mar 22, 2024
7b3f1ba
Bump `globals` for `@reduxjs/eslint-config`
aryaemami59 Mar 26, 2024
a897b70
Bump `typescript-eslint` packages for `@reduxjs/eslint-config`
aryaemami59 Mar 26, 2024
326e06e
Bump `eslint` for `toolkit`
aryaemami59 Mar 26, 2024
e51365c
Bump `typescript-eslint` packages for `@reduxjs/toolkit`
aryaemami59 Mar 26, 2024
ff33a82
Merge branch 'master' of https://github.com/reduxjs/redux-toolkit int…
aryaemami59 Apr 2, 2024
906de3b
Fix lockfile
aryaemami59 Apr 2, 2024
5e2f154
Bump `typescript-eslint` packages for `@reduxjs/eslint-config`
aryaemami59 Apr 2, 2024
fa3773f
Bump `@types/eslint` for `@reduxjs/eslint-config`
aryaemami59 Apr 2, 2024
a1ab915
Fix `api` type in `ApiProvider` to use `AnyNonNullishValue`
aryaemami59 Apr 2, 2024
221b2da
Update `React` import in `apiProvider.test.tsx`
aryaemami59 Apr 2, 2024
0f957aa
Fix `api` type inside `ApiProvider` to use `Record<never, never>`
aryaemami59 Apr 2, 2024
f54ce14
Fix `package.json` entry points for `@reduxjs/eslint-config`
aryaemami59 Apr 2, 2024
563ab7e
Fix `package.json` entry points for `@reduxjs/prettier-config`
aryaemami59 Apr 2, 2024
743f596
Fix `package.json` entry points for `@reduxjs/vitest-config`
aryaemami59 Apr 2, 2024
233a978
Bump `typescript-eslint` packages for `@reduxjs/toolkit`
aryaemami59 Apr 2, 2024
e285436
Merge branch 'master' of https://github.com/reduxjs/redux-toolkit int…
aryaemami59 Apr 5, 2024
0de4162
Bump TypeScript version to 5.4.4 for `@reduxjs/eslint-config`
aryaemami59 Apr 6, 2024
6c791bc
Bump ESLint to version 9 for `@reduxjs/eslint-config`
aryaemami59 Apr 6, 2024
7728db5
Bump TypeScript version to 5.4.4 for `@reduxjs/prettier-config`
aryaemami59 Apr 6, 2024
1dfbe14
Bump TypeScript version to 5.4.4 for `@reduxjs/vitest-config`
aryaemami59 Apr 6, 2024
e59a582
Fix dependencies of `@reduxjs/eslint-config`
aryaemami59 Apr 9, 2024
3ecb61a
Fix `@typescript-eslint` namespace per `typescript-eslint` docs
aryaemami59 Apr 9, 2024
b2e3e7f
Merge branch 'master' of https://github.com/reduxjs/redux-toolkit int…
aryaemami59 Apr 12, 2024
3d60312
Bump TypeScript version to 5.4.5 for `@reduxjs/vitest-config`
aryaemami59 Apr 12, 2024
21b65c8
Bump `vitest` version to 1.5.0 for `@reduxjs/vitest-config`
aryaemami59 Apr 12, 2024
a0022f2
Bump `vitest` version to 1.5.0 for `toolkit`
aryaemami59 Apr 12, 2024
08560a2
Bump TypeScript version to 5.4.5 for `@reduxjs/eslint-config`
aryaemami59 Apr 12, 2024
448cef9
Bump `@types/eslint` to version 8.56.8 for `@reduxjs/eslint-config`
aryaemami59 Apr 12, 2024
4f9837f
Bump TypeScript version to 5.4.5 for `@reduxjs/prettier-config`
aryaemami59 Apr 12, 2024
4b99d71
Merge branch 'master' of https://github.com/reduxjs/redux-toolkit int…
aryaemami59 Apr 16, 2024
bdf3b75
Bump `@types/eslint` for `@reduxjs/eslint-config`
aryaemami59 Apr 16, 2024
4b6298d
Bump `typescript-eslint` for `@reduxjs/eslint-config`
aryaemami59 Apr 16, 2024
bd16655
Disable `no-undef` rule per `typescript-eslint`'s docs
aryaemami59 Apr 16, 2024
220b565
Fix `ignores` field to only ignore directories that start with a dot
aryaemami59 Apr 16, 2024
0d7241e
Add comment about `ignores` being a replacement for `.eslintignore`
aryaemami59 Apr 16, 2024
88dbb01
Allow `.cjs` files to use `require` syntax
aryaemami59 Apr 16, 2024
c969d81
Fix type issues inside `.size-limit.cjs`
aryaemami59 Apr 16, 2024
ce6ac1e
Include files that start with a dot during type checking
aryaemami59 Apr 16, 2024
170bbcb
Make `peerDependencies` of `@reduxjs/eslint-config` optional
aryaemami59 Apr 16, 2024
02f382d
Fix `peerDependencies` of `@reduxjs/prettier-config`
aryaemami59 Apr 16, 2024
c2537b4
Fix `peerDependencies` of `@reduxjs/vitest-config`
aryaemami59 Apr 16, 2024
ead7e1a
Fix `peerDependencies` of `@reduxjs/tsconfig`
aryaemami59 Apr 16, 2024
0b1887b
Merge branch 'master' of https://github.com/reduxjs/redux-toolkit int…
aryaemami59 Apr 17, 2024
8f984bc
Bump `typescript-eslint` to 7.7.1 for `@reduxjs/eslint-config`
aryaemami59 Apr 22, 2024
88b194a
Bump `@types/eslint` to 8.56.10 for `@reduxjs/eslint-config`
aryaemami59 Apr 22, 2024
a90630d
Bump `@eslint/js` to 9.1.1 for `@reduxjs/eslint-config`
aryaemami59 Apr 22, 2024
1b43a0f
Bump `eslint` to 9.1.1 for `@reduxjs/eslint-config`
aryaemami59 Apr 22, 2024
96e6eb2
Bump `globals` to version 15.1.0 for `@reduxjs/eslint-config`
aryaemami59 Apr 29, 2024
68c6515
Bump `vitest` to version 1.5.2 for `@reduxjs/vitest-config`
aryaemami59 Apr 29, 2024
c260be5
Bump `vitest` to version 1.5.2 for `toolkit`
aryaemami59 Apr 29, 2024
27718ee
Move `vitest` from `dependencies` to `peerDependencies`
aryaemami59 Apr 29, 2024
248d027
Add `onTestFailed` and `onTestFinished` to `vitestGlobals`
aryaemami59 Apr 29, 2024
2346e2c
Remove `@typescript-eslint` packages from `toolkit`
aryaemami59 Apr 29, 2024
f2ea52a
Update `@typescript-eslint` packages to version 7.7.1
aryaemami59 Apr 29, 2024
54eeacf
Bump `typescript-eslint` to version 7.8.0 for `@reduxjs/eslint-config`
aryaemami59 Apr 29, 2024
7c79018
Update `@typescript-eslint` packages to version 7.8.0
aryaemami59 Apr 29, 2024
0cc88c6
Make ESLint a required peer dependency of `@reduxjs/eslint-config`
aryaemami59 Apr 29, 2024
63d7b31
Bump `vitest` to version 1.5.3 for `@reduxjs/vitest-config`
aryaemami59 Apr 30, 2024
03ebe78
Merge branch 'master' of https://github.com/reduxjs/redux-toolkit int…
aryaemami59 May 1, 2024
3ea0e84
Merge branch 'master' of https://github.com/reduxjs/redux-toolkit int…
aryaemami59 May 1, 2024
d366368
Merge branch 'master' of https://github.com/reduxjs/redux-toolkit int…
aryaemami59 May 2, 2024
2a4935b
Merge branch 'master' of https://github.com/reduxjs/redux-toolkit int…
aryaemami59 May 6, 2024
ff173f2
Bump `vitest` to 1.6.0 for `@reduxjs/vitest-config`
aryaemami59 May 6, 2024
c34149b
Bump ESLint for `@reduxjs/eslint-config`
aryaemami59 May 6, 2024
2e966ea
Merge branch 'master' of https://github.com/reduxjs/redux-toolkit int…
aryaemami59 May 7, 2024
b624627
Merge branch 'master' of https://github.com/reduxjs/redux-toolkit int…
aryaemami59 May 9, 2024
4a4a666
Merge branch 'master' of https://github.com/reduxjs/redux-toolkit int…
aryaemami59 May 9, 2024
139cc75
Merge branch 'master' of https://github.com/reduxjs/redux-toolkit int…
aryaemami59 May 14, 2024
fa0d275
Bump `globals` to version 15.2.0 for `@reduxjs/eslint-config`
aryaemami59 May 14, 2024
1dae12f
Bump `typescript-eslint` to version 7.9.0 for `@reduxjs/eslint-config`
aryaemami59 May 14, 2024
7a3627e
Bump `rimraf` to version 5.0.7 for `@reduxjs/prettier-config`
aryaemami59 May 14, 2024
eac1e9a
Bump `rimraf` to version 5.0.7 for `@reduxjs/vitest-config`
aryaemami59 May 14, 2024
d38d2d8
Bump `rimraf` to version 5.0.7 for `@reduxjs/eslint-config`
aryaemami59 May 14, 2024
cd58d83
Add `tslib` to `devDependencies` of `@reduxjs/vitest-config`
aryaemami59 May 14, 2024
3339947
Add `tslib` to `devDependencies` of `@reduxjs/prettier-config`
aryaemami59 May 14, 2024
9abfdaf
Merge branch 'master' of https://github.com/reduxjs/redux-toolkit int…
aryaemami59 May 16, 2024
61feea6
Merge branch 'master' of https://github.com/reduxjs/redux-toolkit int…
aryaemami59 May 16, 2024
83445ac
Merge branch 'master' of https://github.com/reduxjs/redux-toolkit int…
aryaemami59 May 25, 2024
deec317
Bump `eslint` and `@eslint/js` to 9.3.0 for `@reduxjs/eslint-config`
aryaemami59 May 25, 2024
7638c7c
Bump `globals` to 15.3.0 for `@reduxjs/eslint-config`
aryaemami59 May 25, 2024
8cdfe3e
Bump `typescript-eslint` to 7.10.0 for `@reduxjs/eslint-config`
aryaemami59 May 25, 2024
2a2ccc8
Fix lint issues in `sorted_state_adapter.test.ts`
aryaemami59 May 25, 2024
ea31796
Bump `eslint` to version 9.3.0 for `@reduxjs/toolkit`
aryaemami59 May 25, 2024
e02375d
Bump `tsx` to version 4.11.0 for `@reduxjs/toolkit`
aryaemami59 May 25, 2024
6184e96
Rename `eslint.config.mjs` to `eslint.config.mts`
aryaemami59 May 25, 2024
0d58070
Fix `lint` and `lint:fix` commands
aryaemami59 May 25, 2024
b7d5217
Run `yarn lint:fix` to fix remaining lint issues
aryaemami59 May 25, 2024
92384ea
Bump `vitest` to version 1.6.0 for `@reduxjs/toolkit`
aryaemami59 May 25, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/api/actionCreatorMiddleware.mdx
Expand Up @@ -22,7 +22,7 @@ export interface ActionCreatorInvariantMiddlewareOptions {
* The function to identify whether a value is an action creator.
* The default checks for a function with a static type property and match method.
*/
isActionCreator?: (action: unknown) => action is Function & { type?: unknown }
isActionCreator?: (action: unknown) => action is ((...args: any[]) => any) & { type?: unknown }
}
```

Expand Down Expand Up @@ -54,7 +54,7 @@ import reducer from './reducer'
// Augment middleware to consider all functions with a static type property to be action creators
const isActionCreator = (
action: unknown,
): action is Function & { type: unknown } =>
): action is ((...args: any[]) => any) & { type: unknown } =>
typeof action === 'function' && 'type' in action

const actionCreatorMiddleware = createActionCreatorInvariantMiddleware({
Expand Down
3 changes: 2 additions & 1 deletion package.json
Expand Up @@ -20,7 +20,8 @@
"docs",
"website",
"examples/query/react/*",
"examples/action-listener/*"
"examples/action-listener/*",
"packages/configs/*"
],
"devDependencies": {
"@typescript-eslint/eslint-plugin": "6.12.0",
Expand Down
5 changes: 5 additions & 0 deletions packages/configs/eslint/.gitignore
@@ -0,0 +1,5 @@
# Dependencies
node_modules

# IDE
.vscode
1 change: 1 addition & 0 deletions packages/configs/eslint/README.md
@@ -0,0 +1 @@
# ESLint Config
76 changes: 76 additions & 0 deletions packages/configs/eslint/eslint.config.ts
@@ -0,0 +1,76 @@
import type { Linter } from 'eslint'

const eslintConfig: Linter.Config = {
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/stylistic',
// 'plugin:@typescript-eslint/recommended-type-checked',
// 'plugin:@typescript-eslint/stylistic-type-checked',
'prettier',
],
env: { jest: true, browser: true, node: true, es2024: true },
globals: {
suite: true,
expectTypeOf: true,
assertType: true,
assert: true,
vitest: true,
vi: true,
},
rules: {
'@typescript-eslint/consistent-type-imports': [
2,
{ fixStyle: 'separate-type-imports', disallowTypeAnnotations: false },
],
'@typescript-eslint/consistent-type-exports': [2],
'@typescript-eslint/no-unused-vars': [0],
'@typescript-eslint/array-type': [2, { default: 'array-simple' }],
'@typescript-eslint/no-explicit-any': [0],
'@typescript-eslint/no-empty-interface': [2, { allowSingleExtends: true }],
'@typescript-eslint/no-unsafe-argument': [0],
'@typescript-eslint/ban-types': [
2,
// {
// extendDefaults: true,
// types: {
// '{}': { fixWith: 'AnyNonNullishValue' },
// Function: { fixWith: 'AnyFunction' },
// },
// },
],
// '@typescript-eslint/prefer-as-const': [2],
// '@typescript-eslint/no-unnecessary-type-constraint': [2],
// '@typescript-eslint/no-var-requires': [2],
// 'no-unsafe-optional-chaining': [2],
// '@typescript-eslint/no-unsafe-return': [0],
// '@typescript-eslint/no-unsafe-assignment': [0],
// '@typescript-eslint/no-empty-function': [0],
'@typescript-eslint/no-namespace': [
2,
{ allowDeclarations: true, allowDefinitionFiles: true },
],
'@typescript-eslint/ban-ts-comment': [0],
'sort-imports': [
2,
{
ignoreCase: false,
ignoreDeclarationSort: true,
ignoreMemberSort: false,
memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'],
allowSeparatedGroups: true,
},
],
},
parser: '@typescript-eslint/parser',
parserOptions: { project: true, ecmaVersion: 'latest' },
plugins: ['@typescript-eslint'],
ignorePatterns: ['dist'],
root: true,
overrides: [
{ files: ['*.{c,m,}{t,j}s', '*.{t,j}sx'] },
{ files: ['*{test,spec}.{t,j}s?(x)'] },
aryaemami59 marked this conversation as resolved.
Show resolved Hide resolved
],
}

module.exports = eslintConfig
34 changes: 34 additions & 0 deletions packages/configs/eslint/package.json
@@ -0,0 +1,34 @@
{
"name": "@reduxjs/eslint-config",
"version": "0.0.1",
"description": "ESLint configuration for Redux projects",
"main": "./dist/eslint.config.js",
"types": "./dist/eslint.config.d.ts",
"scripts": {
"build": "yarn clean && tsc",
"clean": "rimraf dist"
},
"keywords": [
"eslint",
"config",
"eslint-config",
"reduxjs",
"redux-toolkit",
"configuration"
],
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "git+https://github.com/reduxjs/redux-toolkit.git"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^6.20.0",
"@typescript-eslint/parser": "^6.20.0",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"rimraf": "^5.0.5",
"typescript": "^5.3.3"
}
}
13 changes: 13 additions & 0 deletions packages/configs/eslint/tsconfig.json
@@ -0,0 +1,13 @@
{
"compilerOptions": {
"target": "ESNext",
"module": "CommonJS",
"moduleResolution": "Node",
"esModuleInterop": true,
"declaration": true,
"outDir": "dist",
"forceConsistentCasingInFileNames": true,
"strict": true,
"skipLibCheck": true,
},
}
5 changes: 5 additions & 0 deletions packages/configs/prettier/.gitignore
@@ -0,0 +1,5 @@
# Dependencies
node_modules

# IDE
.vscode
1 change: 1 addition & 0 deletions packages/configs/prettier/README.md
@@ -0,0 +1 @@
# Prettier Config
33 changes: 33 additions & 0 deletions packages/configs/prettier/package.json
@@ -0,0 +1,33 @@
{
"name": "@reduxjs/prettier-config",
"version": "0.0.1",
"description": "Prettier configuration for Redux projects",
"main": "./dist/prettier.config.mjs",
"types": "./dist/prettier.config.d.mts",
"type": "module",
"scripts": {
"build": "yarn clean && tsc",
"clean": "rimraf dist"
},
"keywords": [
"prettier",
"config",
"prettier-config",
"reduxjs",
"redux-toolkit",
"configuration"
],
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "git+https://github.com/reduxjs/redux-toolkit.git"
},
"devDependencies": {
"prettier": "^3.2.4",
"rimraf": "^5.0.5",
"typescript": "^5.3.3"
},
"prettier": "./dist/prettier.config.mjs"
}
8 changes: 8 additions & 0 deletions packages/configs/prettier/prettier.config.mts
@@ -0,0 +1,8 @@
import type { Config } from 'prettier'

export const prettierConfig: Config = {
semi: false,
singleQuote: true,
}

export default prettierConfig
13 changes: 13 additions & 0 deletions packages/configs/prettier/tsconfig.json
@@ -0,0 +1,13 @@
{
"compilerOptions": {
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "Node",
"esModuleInterop": true,
"declaration": true,
"outDir": "dist",
"forceConsistentCasingInFileNames": true,
"strict": true,
"skipLibCheck": true,
},
}
5 changes: 5 additions & 0 deletions packages/configs/typescript/.gitignore
@@ -0,0 +1,5 @@
# Dependencies
node_modules

# IDE
.vscode
1 change: 1 addition & 0 deletions packages/configs/typescript/README.md
@@ -0,0 +1 @@
# TypeScript Config
26 changes: 26 additions & 0 deletions packages/configs/typescript/package.json
@@ -0,0 +1,26 @@
{
aryaemami59 marked this conversation as resolved.
Show resolved Hide resolved
"name": "@reduxjs/tsconfig",
"version": "0.0.1",
"description": "TypeScript configuration for Redux projects",
"main": "tsconfig.json",
"type": "module",
"files": [
"tsconfig*.json"
],
"keywords": [
"config",
"reduxjs",
"redux-toolkit",
"tsconfig",
"typescript",
"ts",
"configuration"
],
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "git+https://github.com/reduxjs/redux-toolkit.git"
}
}
41 changes: 41 additions & 0 deletions packages/configs/typescript/tsconfig.base.json
@@ -0,0 +1,41 @@
{
"compilerOptions": {
"allowSyntheticDefaultImports": true,
"baseUrl": ".",
// output .d.ts declaration files for consumers
"declaration": true,
"downlevelIteration": false,
"emitDeclarationOnly": true,
// interop between ESM and CJS modules. Recommended by TS
"esModuleInterop": true,
// error out if import and file system have a casing mismatch. Recommended by TS
"forceConsistentCasingInFileNames": true,
"importHelpers": true,
// ensure that each file can be safely transpiled by babel (etc.) without relying on other imports
"isolatedModules": true,
// transpile JSX to React.createElement
"jsx": "react",
"lib": ["DOM", "ESNext"],
"module": "ESnext",
// use Node's module resolution algorithm, instead of the legacy TS one
"moduleResolution": "Node",
"noErrorTruncation": true,
// linter checks for common issues
"noFallthroughCasesInSwitch": true,
// noUnused* overlap with @typescript-eslint/no-unused-vars, can disable if duplicative
"noUnusedLocals": false,
"noUnusedParameters": false,
"outDir": "dist",
"paths": {
"@internal/*": ["src/*"]
},
// match output dir to input dir. e.g. dist/index instead of dist/src/index
"rootDir": ".",
// significant perf increase by skipping checking .d.ts files, particularly those in node_modules. Recommended by TS
"skipLibCheck": true,
// stricter type-checking for stronger correctness. Recommended by TS
"strict": true,
"target": "ESnext",
"types": ["vitest/globals", "vitest/importMeta"]
}
}
15 changes: 15 additions & 0 deletions packages/configs/typescript/tsconfig.build.json
@@ -0,0 +1,15 @@
{
// For building the library.
"extends": "./tsconfig.base.json",
"compilerOptions": {
"outDir": "dist"
},
"include": ["src"],
"exclude": [
"src/**/*.test.ts*",
"src/**/*.test-d.ts*",
"src/**/*.spec.ts*",
"src/**/tests/*",
"src/**/*.typetest.ts*"
]
}
11 changes: 11 additions & 0 deletions packages/configs/typescript/tsconfig.json
@@ -0,0 +1,11 @@
{
// For general development and intellisense.
// Scans the entire source code against the current TS version
// we are using during development.
"extends": "./tsconfig.test.json",
"compilerOptions": {
"skipLibCheck": true,
"rootDir": ".",
},
"include": ["."],
}
19 changes: 19 additions & 0 deletions packages/configs/typescript/tsconfig.test.json
@@ -0,0 +1,19 @@
{
// For runtime and type tests during CI.
"extends": "./tsconfig.base.json",
"compilerOptions": {
"emitDeclarationOnly": false,
"noEmit": true,
"jsx": "react-jsx",
"skipLibCheck": true,
"noImplicitReturns": false
},
"exclude": ["dist"],
"include": [
"./**/*.test.ts*",
"./**/*.test-d.ts*",
"./**/*.spec.ts*",
"./**/tests/**/*",
"./**/*.typetest.ts*"
]
}
5 changes: 5 additions & 0 deletions packages/configs/vitest/.gitignore
@@ -0,0 +1,5 @@
# Dependencies
node_modules

# IDE
.vscode
1 change: 1 addition & 0 deletions packages/configs/vitest/README.md
@@ -0,0 +1 @@
# Vitest Config
33 changes: 33 additions & 0 deletions packages/configs/vitest/package.json
@@ -0,0 +1,33 @@
{
"name": "@reduxjs/vitest-config",
"version": "0.0.1",
"description": "Vitest configuration for Redux projects",
"main": "./dist/vitest.config.mjs",
"types": "./dist/vitest.config.d.mts",
"type": "module",
"scripts": {
"build": "yarn clean && tsc",
"clean": "rimraf dist"
},
"keywords": [
"config",
"reduxjs",
"redux-toolkit",
"vitest-config",
"vitest",
"vite",
"configuration"
],
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "git+https://github.com/reduxjs/redux-toolkit.git"
},
"devDependencies": {
"rimraf": "^5.0.5",
"typescript": "^5.3.3",
"vitest": "^1.2.2"
}
}