Skip to content

Commit e449557

Browse files
chore(deps): bump the npm-dependencies group with 3 updates (#447)
* 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](eslint/eslint@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] <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 98cd7ff commit e449557

4 files changed

Lines changed: 10 additions & 18 deletions

File tree

.github/workflows/surge-preview.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
- name: Build preview
3434
if: ${{ steps.surge-token.outputs.enabled == 'true' }}
3535
run: |
36-
npm install
36+
npm install --legacy-peer-deps
3737
npm run build
3838
- uses: afc163/surge-preview@bf90a5a86111f6311ca42f0a5a0f80fb0fb03cec
3939
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: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,14 @@
4646
"*": "prettier --write --ignore-unknown"
4747
},
4848
"dependencies": {
49-
"@babel/runtime": "^7.29.7",
49+
"@babel/runtime": "^8.0.0",
5050
"@rc-component/motion": "^1.1.4",
5151
"@rc-component/util": "^1.11.1",
5252
"clsx": "^2.1.1"
5353
},
5454
"devDependencies": {
55-
"@eslint/js": "^9.39.4",
55+
"@eslint/js": "^10.0.1",
56+
"@eslint/compat": "^2.1.0",
5657
"@rc-component/father-plugin": "^2.2.0",
5758
"@rc-component/np": "^1.0.4",
5859
"@testing-library/dom": "^10.4.1",
@@ -63,7 +64,7 @@
6364
"@types/react": "^19.2.17",
6465
"@types/react-dom": "^19.2.3",
6566
"dumi": "^2.4.38",
66-
"eslint": "^9.39.4",
67+
"eslint": "^10.6.0",
6768
"eslint-config-prettier": "^10.1.8",
6869
"eslint-plugin-jest": "^29.15.4",
6970
"eslint-plugin-react": "^7.37.5",

src/hooks/useItems.tsx

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,7 @@ const convertItemsToNodes = (items: ItemType[], props: Props) => {
7777
rawOnItemClick?.(value);
7878
};
7979

80-
let isActive = false;
81-
if (accordion) {
82-
isActive = activeKey[0] === key;
83-
} else {
84-
isActive = activeKey.indexOf(key) > -1;
85-
}
80+
const isActive = accordion ? activeKey[0] === key : activeKey.indexOf(key) > -1;
8681

8782
return (
8883
<CollapsePanel
@@ -142,12 +137,7 @@ const getNewChild = (
142137
onItemClick: childOnItemClick,
143138
} = child.props;
144139

145-
let isActive = false;
146-
if (accordion) {
147-
isActive = activeKey[0] === key;
148-
} else {
149-
isActive = activeKey.indexOf(key) > -1;
150-
}
140+
const isActive = accordion ? activeKey[0] === key : activeKey.indexOf(key) > -1;
151141

152142
const mergeCollapsible = childCollapsible ?? collapsible;
153143

0 commit comments

Comments
 (0)