Skip to content

Commit 4328818

Browse files
authored
Install and set up husky and lint-staged (#161)
* Install and set up husky and lint-staged * Add a root .lintstagedrc.json
1 parent 1a68541 commit 4328818

File tree

6 files changed

+249
-3
lines changed

6 files changed

+249
-3
lines changed

.husky/pre-commit

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
yarn lint-staged

.lintstagedrc.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"*.{md,json}": "prettier --write"
3+
}

package.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,13 @@
66
"streamlit/frontend"
77
],
88
"scripts": {
9-
"new-version": "lerna version"
9+
"new-version": "lerna version",
10+
"prepare": "husky install"
1011
},
1112
"devDependencies": {
1213
"@lerna-lite/cli": "^1.11.0",
14+
"husky": "^8.0.1",
15+
"lint-staged": "^13.0.3",
1316
"prettier": "2.7.1"
1417
}
1518
}

packages/mountable/.lintstagedrc.json

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"*.{js,jsx,ts,tsx}": "eslint --cache --fix",
3+
"*.{js,jsx,ts,tsx,css,md,json}": "prettier --write"
4+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"*.{js,jsx,ts,tsx}": "eslint --cache --fix",
3+
"*.{js,jsx,ts,tsx,css,md,json}": "prettier --write"
4+
}

0 commit comments

Comments
 (0)