File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,3 +4,4 @@ node_modules
44.yarn
55examples /example-bare /android
66examples /example-bare /ios
7+ * .md
Original file line number Diff line number Diff line change 3030 "lint:fix" : " eslint src/ examples/ --fix" ,
3131 "format" : " prettier --check ./src ./examples" ,
3232 "format:fix" : " prettier --write ./src ./examples" ,
33- "prepare" : " yarn build "
33+ "prepare" : " simple-git-hooks "
3434 },
3535 "homepage" : " https://github.com/troberts-28/react-native-timer-picker" ,
3636 "bugs" : {
108108 "eslint-plugin-react" : " ^7.37.5" ,
109109 "eslint-plugin-react-hooks" : " ^5.2.0" ,
110110 "jest" : " ^29.0.0" ,
111+ "lint-staged" : " ^16.2.7" ,
111112 "metro-react-native-babel-preset" : " ^0.71.1" ,
112113 "prettier" : " 2.8.8" ,
113114 "react" : " 18.2.0" ,
114115 "react-native" : " 0.72.0" ,
115116 "react-native-builder-bob" : " ^0.18.3" ,
116117 "react-test-renderer" : " 18.2.0" ,
118+ "simple-git-hooks" : " ^2.13.1" ,
117119 "typescript" : " ~5.8.0" ,
118120 "typescript-eslint" : " ^8.33.0"
119121 },
126128 " typescript"
127129 ]
128130 },
131+ "simple-git-hooks" : {
132+ "pre-commit" : " npx lint-staged"
133+ },
134+ "lint-staged" : {
135+ "*.{ts,tsx,js,jsx}" : [
136+ " eslint --fix" ,
137+ " prettier --write"
138+ ],
139+ "*.{json}" : [
140+ " prettier --write"
141+ ]
142+ },
129143 "eslintIgnore" : [
130144 " node_modules/" ,
131145 " dist/"
You canβt perform that action at this time.
0 commit comments