add husky with precommit hook for linting FE code (#16515)
This commit is contained in:
committed by
GitHub
parent
e97bb2a153
commit
94ad50b3e7
1
.husky/.gitignore
vendored
Normal file
1
.husky/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
_
|
||||
4
.husky/pre-commit
Executable file
4
.husky/pre-commit
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
. "$(dirname "$0")/_/husky.sh"
|
||||
|
||||
yarn precommit
|
||||
@@ -156,7 +156,8 @@
|
||||
"webpack-postcss-tools": "^1.1.2",
|
||||
"xhr-mock": "^2.4.1",
|
||||
"xlsx": "^0.16.8",
|
||||
"yaml-lint": "^1.2.4"
|
||||
"yaml-lint": "^1.2.4",
|
||||
"husky": "^6.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
"concurrently": "yarn && concurrently --kill-others -p name",
|
||||
@@ -203,7 +204,8 @@
|
||||
"test-cypress-open": "./bin/build-for-test && yarn test-cypress-no-build --open",
|
||||
"test-cypress-open-no-backend": "E2E_HOST='http://localhost:3000' yarn test-cypress-no-build --open",
|
||||
"test-cypress-no-build": "yarn && CONFIG_FILE=frontend/test/__support__/e2e/cypress.json babel-node ./frontend/test/__runner__/run_cypress_tests.js",
|
||||
"test-cypress-smoketest": "yarn test-cypress-no-build --folder frontend/test/metabase-smoketest"
|
||||
"test-cypress-smoketest": "yarn test-cypress-no-build --folder frontend/test/metabase-smoketest",
|
||||
"prepare": "husky install"
|
||||
},
|
||||
"lint-staged": {
|
||||
"frontend/**/*.{js,jsx,css}": [
|
||||
|
||||
@@ -6838,6 +6838,11 @@ humanize-plus@^1.8.1:
|
||||
resolved "https://registry.yarnpkg.com/humanize-plus/-/humanize-plus-1.8.2.tgz#a65b34459ad6367adbb3707a82a3c9f916167030"
|
||||
integrity sha1-pls0RZrWNnrbs3B6gqPJ+RYWcDA=
|
||||
|
||||
husky@^6.0.0:
|
||||
version "6.0.0"
|
||||
resolved "https://registry.yarnpkg.com/husky/-/husky-6.0.0.tgz#810f11869adf51604c32ea577edbc377d7f9319e"
|
||||
integrity sha512-SQS2gDTB7tBN486QSoKPKQItZw97BMOd+Kdb6ghfpBc0yXyzrddI0oDV5MkDAbuB4X2mO3/nj60TRMcYxwzZeQ==
|
||||
|
||||
icepick@2.3.0:
|
||||
version "2.3.0"
|
||||
resolved "https://registry.yarnpkg.com/icepick/-/icepick-2.3.0.tgz#1d1b0b28b80c1ff720a1f62359dab46392806f5c"
|
||||
|
||||
Reference in New Issue
Block a user