Skip to content

Commit d818600

Browse files
build(deps-dev): bump the npm-dependencies group with 2 updates (#673)
* build(deps-dev): bump the npm-dependencies group with 2 updates Bumps the npm-dependencies group with 2 updates: [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js) and [eslint](https://github.com/eslint/eslint). 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](eslint/eslint@v9.39.4...v10.6.0) --- updated-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] <support@github.com> * fix: support eslint 10 dependency update * fix: resolve eslint 10 lint errors --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: afc163 <afc163@gmail.com>
1 parent 2a43478 commit d818600

4 files changed

Lines changed: 8 additions & 12 deletions

File tree

.github/workflows/surge-preview.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
- name: Build preview
3232
if: ${{ steps.surge-token.outputs.enabled == 'true' }}
3333
run: |
34-
npm install
34+
npm install --legacy-peer-deps
3535
npm run build
3636
- uses: afc163/surge-preview@bf90a5a86111f6311ca42f0a5a0f80fb0fb03cec
3737
if: ${{ steps.surge-token.outputs.enabled == 'true' }}

eslint.config.mjs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import js from '@eslint/js';
2+
import { fixupConfigRules } from '@eslint/compat';
23
import { defineConfig } from 'eslint/config';
34
import { dirname } from 'node:path';
45
import { fileURLToPath } from 'node:url';
@@ -40,8 +41,8 @@ export default defineConfig([
4041
files: ['**/*.{js,jsx,ts,tsx}'],
4142
extends: [
4243
js.configs.recommended,
43-
react.configs.flat.recommended,
44-
react.configs.flat['jsx-runtime'],
44+
...fixupConfigRules(react.configs.flat.recommended),
45+
...fixupConfigRules(react.configs.flat['jsx-runtime']),
4546
prettier,
4647
],
4748
plugins: {

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@
4949
"clsx": "^2.1.1"
5050
},
5151
"devDependencies": {
52-
"@eslint/js": "^9.39.4",
52+
"@eslint/js": "^10.0.1",
53+
"@eslint/compat": "^2.1.0",
5354
"@rc-component/dialog": "^1.2.0",
5455
"@rc-component/father-plugin": "^2.2.0",
5556
"@rc-component/form": "^1.4.0",
@@ -66,7 +67,7 @@
6667
"@types/warning": "^3.0.4",
6768
"cross-env": "^10.1.0",
6869
"dumi": "^2.4.38",
69-
"eslint": "^9.39.4",
70+
"eslint": "^10.6.0",
7071
"eslint-config-prettier": "^10.1.8",
7172
"eslint-plugin-jest": "^29.15.4",
7273
"eslint-plugin-react": "^7.37.5",

src/OptionList.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -255,19 +255,13 @@ const OptionList: React.ForwardRefRenderFunction<ReviseRefOptionListProps> = (_,
255255
if (!open) {
256256
return;
257257
}
258-
let nextActiveKey = null;
259-
260258
const getFirstNode = () => {
261259
const firstNode = getFirstMatchingNode(memoTreeData);
262260
return firstNode ? firstNode[fieldNames.value] : null;
263261
};
264262

265263
// single mode active first checked node
266-
if (!multiple && checkedKeys.length && !searchValue) {
267-
nextActiveKey = checkedKeys[0];
268-
} else {
269-
nextActiveKey = getFirstNode();
270-
}
264+
const nextActiveKey = !multiple && checkedKeys.length && !searchValue ? checkedKeys[0] : getFirstNode();
271265

272266
setActiveKey(nextActiveKey);
273267
// eslint-disable-next-line react-hooks/exhaustive-deps

0 commit comments

Comments
 (0)