Skip to content

Commit

Permalink
Use the shareable ESLint config
Browse files Browse the repository at this point in the history
  • Loading branch information
aryaemami59 committed Nov 13, 2024
1 parent 0369dfa commit d27f4e9
Show file tree
Hide file tree
Showing 10 changed files with 73 additions and 728 deletions.
61 changes: 0 additions & 61 deletions .eslintrc.js

This file was deleted.

3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@ typesversions
.pnp.*
*.tgz

tsconfig.vitest-temp.json
tsconfig.vitest-temp.json
.eslintcache
7 changes: 7 additions & 0 deletions eslint.config.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { createESLintConfig } from '@reduxjs/eslint-config'
import { configs } from 'typescript-eslint'

export default createESLintConfig([
{ name: 'root-workspace/global-ignores', ignores: ['**/'] },
configs.disableTypeChecked,
])
19 changes: 7 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,12 @@
"@babel/helper-compilation-targets": "^7.23.6",
"@babel/traverse": "^7.24.1",
"@babel/types": "^7.24.0",
"@reduxjs/eslint-config": "workspace:^",
"@reduxjs/prettier-config": "workspace:^",
"@types/react": "^18.2.77",
"@types/react-dom": "^18.2.25",
"@typescript-eslint/eslint-plugin": "6.12.0",
"@typescript-eslint/parser": "6.12.0",
"eslint": "^7.25.0",
"eslint-config-prettier": "^9.1.0",
"eslint-config-react-app": "^7.0.1",
"eslint-plugin-flowtype": "^5.7.2",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-react": "^7.23.2",
"eslint-plugin-react-hooks": "^4.2.0",
"eslint": "^9.14.0",
"jiti": "^2.4.0",
"netlify-plugin-cache": "^1.0.3",
"prettier": "^3.2.5",
"react": "^18.2.0",
Expand All @@ -53,7 +45,8 @@
"release-it": "^14.12.5",
"serve": "^14.2.0",
"ts-node": "^10.9.2",
"typescript": "^5.5.4"
"typescript": "^5.5.4",
"typescript-eslint": "^8.14.0"
},
"resolutions": {
"jest-snapshot": "29.3.1"
Expand All @@ -63,6 +56,8 @@
"test": "yarn test:packages",
"format": "prettier --write .",
"format-check": "prettier --check .",
"lint": "eslint --flag unstable_ts_config -c eslint.config.mts",
"lint-fix": "eslint --flag unstable_ts_config -c eslint.config.mts --fix",
"install": "yarn build-configs",
"build-configs": "yarn workspaces foreach -Atip --include '@reduxjs/*config' run build",
"build:examples": "yarn workspaces foreach -A --include '@reduxjs/*' --include '@examples-query-react/*' --include '@examples-action-listener/*' -vtp run build",
Expand Down
11 changes: 0 additions & 11 deletions packages/rtk-codemods/.eslintrc.json

This file was deleted.

6 changes: 6 additions & 0 deletions packages/rtk-codemods/eslint.config.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { createESLintConfig } from '@reduxjs/eslint-config'

export default createESLintConfig([
{ ignores: ['**/__testfixtures__/'] },
{ rules: { '@typescript-eslint/array-type': [0] } }
])
11 changes: 5 additions & 6 deletions packages/rtk-codemods/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"scripts": {
"format": "prettier --config prettier.config.mjs --write .",
"format-check": "prettier --config prettier.config.mjs --check .",
"lint": "eslint .",
"lint": "eslint --flag unstable_ts_config -c eslint.config.mts",
"lint-fix": "eslint --flag unstable_ts_config -c eslint.config.mts --fix",
"test": "vitest --run",
"test:watch": "vitest --watch",
"test:coverage": "vitest --coverage"
Expand All @@ -31,13 +32,11 @@
"typescript": "^5.3.3"
},
"devDependencies": {
"@reduxjs/eslint-config": "workspace:^",
"@reduxjs/prettier-config": "workspace:^",
"@types/jscodeshift": "^0.11.11",
"@typescript-eslint/parser": "^6.19.1",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^5.1.3",
"eslint": "^9.14.0",
"jiti": "^2.4.0",
"prettier": "^3.2.5",
"vitest": "^1.6.0"
},
Expand Down
3 changes: 3 additions & 0 deletions packages/toolkit/eslint.config.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { createESLintConfig } from '@reduxjs/eslint-config'

export default createESLintConfig()
17 changes: 5 additions & 12 deletions packages/toolkit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
"@babel/helper-module-imports": "^7.24.7",
"@microsoft/api-extractor": "^7.13.2",
"@phryneas/ts-version": "^1.0.2",
"@reduxjs/eslint-config": "workspace:^",
"@reduxjs/prettier-config": "workspace:^",
"@size-limit/file": "^11.0.1",
"@size-limit/webpack": "^11.0.1",
Expand All @@ -68,23 +69,14 @@
"@types/react": "^18.0.12",
"@types/react-dom": "^18.0.5",
"@types/yargs": "^16.0.1",
"@typescript-eslint/eslint-plugin": "^6",
"@typescript-eslint/parser": "^6",
"axios": "^0.19.2",
"console-testing-library": "patch:console-testing-library@npm%3A0.6.1#~/.yarn/patches/console-testing-library-npm-0.6.1-4d9957d402.patch",
"esbuild": "^0.23.0",
"esbuild-extra": "^0.4.0",
"eslint": "^7.25.0",
"eslint-config-prettier": "^9.1.0",
"eslint-config-react-app": "^7.0.1",
"eslint-plugin-flowtype": "^5.7.2",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-react": "^7.23.2",
"eslint-plugin-react-hooks": "^4.2.0",
"eslint": "^9.14.0",
"fs-extra": "^9.1.0",
"invariant": "^2.2.4",
"jiti": "^2.4.0",
"jsdom": "^21.0.0",
"json-stringify-safe": "^5.0.1",
"msw": "^2.1.4",
Expand All @@ -108,7 +100,8 @@
"build-only": "yarn clean && yarn run-build",
"format": "prettier --config prettier.config.mjs --write .",
"format-check": "prettier --config prettier.config.mjs --check .",
"lint": "eslint src examples",
"lint": "eslint --flag unstable_ts_config -c eslint.config.mts",
"lint-fix": "eslint --flag unstable_ts_config -c eslint.config.mts --fix",
"test": "vitest --typecheck --run ",
"test:watch": "vitest --watch",
"type-tests": "yarn tsc -p tsconfig.test.json --noEmit",
Expand Down
Loading

0 comments on commit d27f4e9

Please sign in to comment.