diff --git a/.husky/pre-commit b/.husky/pre-commit index c37466e2b30..78f90addcb1 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,4 +1,4 @@ #!/bin/sh . "$(dirname "$0")/_/husky.sh" -npx lint-staged \ No newline at end of file +npm run pre-commit-lint \ No newline at end of file diff --git a/.lintstagedrc b/.lintstagedrc index 073463f6901..0e59783ce91 100644 --- a/.lintstagedrc +++ b/.lintstagedrc @@ -1,8 +1,9 @@ { "src/**/*.js": [ - "prettier --write", "eslint --fix", "stylelint --formatter verbose", - "git add" + ], + "src/**/*.{js,jsx,json,md}": [ + "prettier --write", ] } \ No newline at end of file diff --git a/package.json b/package.json index 7043b4c5bbe..531ad775563 100644 --- a/package.json +++ b/package.json @@ -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",