Skip to content

Commit 7a3e257

Browse files
authored
Fix pre-commit hook (PostHog#6902)
* pre commit hook * final config options * try new approach * update prettierignore
1 parent ad3445e commit 7a3e257

File tree

7 files changed

+28
-306
lines changed

7 files changed

+28
-306
lines changed

.prettierignore

+2
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,5 @@ frontend/dist/
1313
.yalc
1414
.python-version
1515
storybook-static
16+
dist/
17+
node_modules/

package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@
170170
"history": "^5.0.1",
171171
"html-webpack-harddisk-plugin": "^1.0.2",
172172
"html-webpack-plugin": "^4.5.2",
173-
"husky": "^4.3.0",
173+
"husky": "^4.3.8",
174174
"jest": "^26.6.3",
175175
"kea-test-utils": "^0.2.1",
176176
"kea-typegen": "^1.2.2",
@@ -203,7 +203,8 @@
203203
},
204204
"lint-staged": {
205205
"*.{js,ts,mjs,tsx,json,yaml,yml,css,scss}": "prettier --write",
206-
"*.{js,ts,mjs,tsx}": "eslint --fix",
206+
"(posthog/**/*)*.{js,ts,mjs,tsx}": "eslint -c .eslintrc.js --fix",
207+
"(plugin-server/**/*)*.{js,ts,mjs,tsx}": "eslint -c plugin-server/.eslintrc.js --fix",
207208
"*.{py,pyi}": [
208209
"flake8 --select=E9,F63,F7,F82,W605",
209210
"black",

plugin-server/.prettierignore

-1
This file was deleted.

plugin-server/.prettierrc

-7
This file was deleted.

plugin-server/package.json

-11
Original file line numberDiff line numberDiff line change
@@ -116,23 +116,12 @@
116116
"eslint-plugin-promise": "^5.1.0",
117117
"eslint-plugin-react": "^7.24.0",
118118
"eslint-plugin-simple-import-sort": "^7.0.0",
119-
"husky": "~4.3.5",
120119
"jest": "^27.0.4",
121-
"lint-staged": "~10.5.4",
122120
"prettier": "^2.3.1",
123121
"rimraf": "^3.0.2",
124122
"ts-jest": "^27.0.3",
125123
"ts-node": "^10.0.0",
126124
"ts-node-dev": "^1.1.6",
127125
"typescript": "^4.4.0"
128-
},
129-
"husky": {
130-
"hooks": {
131-
"pre-commit": "lint-staged"
132-
}
133-
},
134-
"lint-staged": {
135-
"*.{js,ts}": "eslint --fix",
136-
"*.{js,ts,css,scss,json,yml,yaml,md}": "prettier --write"
137126
}
138127
}

0 commit comments

Comments
 (0)