Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Sean/update husky and lint staged config #1887

Merged
2 commits merged into from Jul 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
npm run pre-commit-lint
5 changes: 3 additions & 2 deletions .lintstagedrc
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"src/**/*.js": [
"prettier --write",
"eslint --fix",
"stylelint --formatter verbose",
"git add"
],
"src/**/*.{js,jsx,json,md}": [
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"src/**/*.{js,jsx,json,md}": [
"src/**/*.{js,jsx,json}": [

Is there an md file in the source folder?

"prettier --write",
]
}
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@
"translate:upload": "crowdin upload sources -b crowdin",
"deploy": "npm run build && gh-pages -d public -b master",
"deploy-dev": "npm run build && gh-pages -d public",
"deploy-branch": "PATH_PREFIX=/deriv-com/br/$branch_name npm run build && gh-pages -d public -e br/$branch_name"
"deploy-branch": "PATH_PREFIX=/deriv-com/br/$branch_name npm run build && gh-pages -d public -e br/$branch_name",
"prepare": "husky install",
"pre-commit-lint": "lint-staged"
},
"repository": {
"type": "git",
Expand Down