From 46b4300b6427bb8021cc8cc7c43de7d49c518c8a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 3 Jul 2026 12:32:22 +0000 Subject: [PATCH 1/3] chore(deps): bump the npm-dependencies group with 3 updates Bumps the npm-dependencies group with 3 updates: [@babel/runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-runtime), [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js) and [eslint](https://github.com/eslint/eslint). Updates `@babel/runtime` from 7.29.7 to 8.0.0 - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v8.0.0/packages/babel-runtime) Updates `@eslint/js` from 9.39.4 to 10.0.1 - [Release notes](https://github.com/eslint/eslint/releases) - [Commits](https://github.com/eslint/eslint/commits/v10.0.1/packages/js) Updates `eslint` from 9.39.4 to 10.6.0 - [Release notes](https://github.com/eslint/eslint/releases) - [Commits](https://github.com/eslint/eslint/compare/v9.39.4...v10.6.0) --- updated-dependencies: - dependency-name: "@babel/runtime" dependency-version: 8.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: npm-dependencies - dependency-name: "@eslint/js" dependency-version: 10.0.1 dependency-type: direct:development update-type: version-update:semver-major dependency-group: npm-dependencies - dependency-name: eslint dependency-version: 10.6.0 dependency-type: direct:development update-type: version-update:semver-major dependency-group: npm-dependencies ... Signed-off-by: dependabot[bot] --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index c8b9677..c03c9b8 100644 --- a/package.json +++ b/package.json @@ -46,17 +46,17 @@ ] }, "dependencies": { - "@babel/runtime": "^7.29.7" + "@babel/runtime": "^8.0.0" }, "devDependencies": { - "@eslint/js": "^9.39.4", + "@eslint/js": "^10.0.1", "@rc-component/father-plugin": "^2.2.0", "@rc-component/np": "^1.0.4", "@types/jest": "^30.0.0", "@types/react": "^19.2.17", "@types/react-dom": "^19.2.3", "dumi": "^2.4.38", - "eslint": "^9.39.4", + "eslint": "^10.6.0", "eslint-config-prettier": "^10.1.8", "eslint-plugin-jest": "^29.15.4", "eslint-plugin-react": "^7.37.5", From 7e992fa443402c6fed263156a15c38f983fd1561 Mon Sep 17 00:00:00 2001 From: afc163 Date: Sun, 5 Jul 2026 15:35:22 +0800 Subject: [PATCH 2/3] fix: support eslint 10 dependency update --- eslint.config.mjs | 5 +++-- package.json | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index 40f08ec..a298e8e 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -1,4 +1,5 @@ import js from '@eslint/js'; +import { fixupConfigRules } from '@eslint/compat'; import { defineConfig } from 'eslint/config'; import { dirname } from 'node:path'; import { fileURLToPath } from 'node:url'; @@ -40,8 +41,8 @@ export default defineConfig([ files: ['**/*.{js,jsx,ts,tsx}'], extends: [ js.configs.recommended, - react.configs.flat.recommended, - react.configs.flat['jsx-runtime'], + ...fixupConfigRules(react.configs.flat.recommended), + ...fixupConfigRules(react.configs.flat['jsx-runtime']), prettier, ], plugins: { diff --git a/package.json b/package.json index c03c9b8..dd85c7b 100644 --- a/package.json +++ b/package.json @@ -50,6 +50,7 @@ }, "devDependencies": { "@eslint/js": "^10.0.1", + "@eslint/compat": "^2.1.0", "@rc-component/father-plugin": "^2.2.0", "@rc-component/np": "^1.0.4", "@types/jest": "^30.0.0", From a1e1035ac14187ea200b097459c5586e4f30f0f0 Mon Sep 17 00:00:00 2001 From: afc163 Date: Mon, 6 Jul 2026 09:33:11 +0800 Subject: [PATCH 3/3] fix: resolve eslint 10 lint errors --- src/index.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index 9738645..22f9a7c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -99,7 +99,6 @@ class Schema { function complete(results: (ValidateError | ValidateError[])[]) { let errors: ValidateError[] = []; - let fields: ValidateFieldsError = {}; function add(e: ValidateError | ValidateError[]) { if (Array.isArray(e)) { @@ -115,7 +114,7 @@ class Schema { if (!errors.length) { callback(null, source); } else { - fields = convertFieldsError(errors); + const fields: ValidateFieldsError = convertFieldsError(errors); (callback as (errors: ValidateError[], fields: ValidateFieldsError) => void)( errors, fields,