From b2fc9cdece6e66948c325a625ce4ebfda6c7ed8b Mon Sep 17 00:00:00 2001 From: Wanpan Date: Fri, 16 Aug 2024 01:14:20 +0800 Subject: [PATCH 1/2] fix: husky update useage, demo jsx to tsx --- .husky/pre-commit | 5 +---- README.md | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.husky/pre-commit b/.husky/pre-commit index d37daa07..c27d8893 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,4 +1 @@ -#!/bin/sh -. "$(dirname "$0")/_/husky.sh" - -npx --no-install lint-staged +lint-staged diff --git a/README.md b/README.md index 92a19672..c09d2d59 100644 --- a/README.md +++ b/README.md @@ -203,7 +203,7 @@ If `key` is not provided, the panel's index will be used instead. By default, Collapse will listen `onKeyDown`(<3.7.0 `onKeyPress`) event with `enter` key to toggle panel's active state when `collapsible` is not `disabled`. If you want to disable this behavior, you can prevent the event from bubbling like this: -```jsx +```tsx const App = () => { const items: CollapseProps['items'] = [ { diff --git a/package.json b/package.json index d6b25d27..ee1d669b 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "compile": "father build && lessc assets/index.less assets/index.css", "coverage": "npm test -- --coverage", "lint": "eslint src/ --ext .ts,.tsx,.jsx,.js,.md", - "prepare": "husky install", + "prepare": "husky", "prepublishOnly": "npm run compile && np --yolo --no-publish", "prettier": "prettier --write \"**/*.{ts,tsx,js,jsx,json,md}\"", "start": "dumi dev", From 66701d0f5986ce921013106070c3da1e6592d431 Mon Sep 17 00:00:00 2001 From: Wanpan Date: Fri, 16 Aug 2024 10:35:48 +0800 Subject: [PATCH 2/2] fix: demo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c09d2d59..e126af65 100644 --- a/README.md +++ b/README.md @@ -203,7 +203,7 @@ If `key` is not provided, the panel's index will be used instead. By default, Collapse will listen `onKeyDown`(<3.7.0 `onKeyPress`) event with `enter` key to toggle panel's active state when `collapsible` is not `disabled`. If you want to disable this behavior, you can prevent the event from bubbling like this: -```tsx +```tsx | pure const App = () => { const items: CollapseProps['items'] = [ {