|
23 | 23 | "react-native-navigation": ">=6.5.0"
|
24 | 24 | },
|
25 | 25 | "scripts": {
|
| 26 | + "build": "tsc", |
| 27 | + "clean:dist": "rm -rf dist", |
26 | 28 | "lint": "eslint src",
|
27 |
| - "build": "rm -rf ./dist && tsc", |
| 29 | + "prebuild": "yarn clean:dist", |
| 30 | + "prepare": "yarn build", |
28 | 31 | "test": "jest src",
|
29 | 32 | "test:coverage": "jest --coverage",
|
30 | 33 | "release": "semantic-release"
|
31 | 34 | },
|
| 35 | + "dependencies": { |
| 36 | + "hoist-non-react-statics": "3.3.2" |
| 37 | + }, |
32 | 38 | "devDependencies": {
|
33 | 39 | "@react-native-community/eslint-config": "2.0.0",
|
34 | 40 | "@semantic-release/changelog": "5.0.1",
|
35 | 41 | "@semantic-release/git": "9.0.0",
|
36 | 42 | "@semantic-release/npm": "7.0.5",
|
37 | 43 | "@testing-library/react-hooks": "3.4.1",
|
| 44 | + "@testing-library/react-native": "7.0.1", |
| 45 | + "@types/hoist-non-react-statics": "3.3.1", |
38 | 46 | "@types/jest": "26.0.9",
|
39 | 47 | "@types/react": "16.9.19",
|
40 | 48 | "@types/react-native": "0.63.6",
|
|
46 | 54 | "eslint-plugin-react-native": "3.8.1",
|
47 | 55 | "husky": "4.2.5",
|
48 | 56 | "jest": "26.2.2",
|
| 57 | + "lint-staged": "10.2.11", |
49 | 58 | "metro-react-native-babel-preset": "0.61.0",
|
50 | 59 | "prettier": "2.0.5",
|
51 | 60 | "react": "16.13.1",
|
|
71 | 80 | "jest": {
|
72 | 81 | "preset": "react-native"
|
73 | 82 | },
|
| 83 | + "lint-staged": { |
| 84 | + "**/*.{js,jsx,ts,tsx}": "yarn eslint" |
| 85 | + }, |
74 | 86 | "husky": {
|
75 | 87 | "hooks": {
|
76 | 88 | "prepare-commit-msg": "exec < /dev/tty && git cz --hook || true",
|
77 |
| - "pre-push": "yarn lint && yarn test" |
| 89 | + "pre-commit": "yarn lint-staged && yarn test", |
| 90 | + "pre-push": "yarn tsc && yarn lint --quiet && yarn test" |
78 | 91 | }
|
79 | 92 | },
|
80 | 93 | "config": {
|
|
0 commit comments