Skip to content

Commit

Permalink
Fix/format (#945)
Browse files Browse the repository at this point in the history
* build: add husky hook for pre-commit

* fix: code format

* fix: change lint-staged only used by prettier

* revert: code format

* build: remove script husky-hook

* ci: fix npm7 run scripts bug
  • Loading branch information
RedJue authored Jan 30, 2023
1 parent 275374e commit 27a8241
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
key: lock-${{ github.sha }}

- name: create package-lock.json
run: npm i --package-lock-only
run: npm i --package-lock-only --ignore-scripts

- name: hack for singe file
run: |
Expand Down
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx --no-install lint-staged
13 changes: 11 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
"prepublishOnly": "npm run compile && np --no-cleanup --yolo --no-publish",
"lint": "eslint src/ --ext .tsx,.ts",
"lint:tsc": "tsc -p tsconfig.json --noEmit",
"now-build": "npm run docs:build"
"now-build": "npm run docs:build",
"prepare": "husky install"
},
"peerDependencies": {
"react": ">=16.9.0",
Expand Down Expand Up @@ -74,8 +75,10 @@
"father": "^4.0.0",
"gh-pages": "^3.1.0",
"glob": "^7.1.6",
"husky": "^8.0.3",
"immutability-helper": "^3.0.0",
"less": "^3.10.3",
"lint-staged": "^13.1.0",
"np": "^7.0.0",
"prettier": "^2.0.1",
"rc-animate": "^3.0.0",
Expand All @@ -93,5 +96,11 @@
"regenerator-runtime": "^0.13.7",
"styled-components": "^5.0.1",
"typescript": "^4.8.4"
},
"lint-staged": {
"**/*.{js,jsx,tsx,ts,md,json}": [
"prettier --write",
"git add"
]
}
}
}

1 comment on commit 27a8241

@vercel
Copy link

@vercel vercel bot commented on 27a8241 Jan 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

table – ./

table-react-component.vercel.app
table-git-master-react-component.vercel.app

Please sign in to comment.