Skip to content

Commit

Permalink
chore: add typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
salmanm committed Oct 20, 2021
1 parent 27f835a commit bef0c8c
Show file tree
Hide file tree
Showing 35 changed files with 62 additions and 4 deletions.
1 change: 1 addition & 0 deletions jest.config.js
@@ -1,5 +1,6 @@
module.exports = {
preset: 'jest-expo/universal',
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
projects: [
{ preset: 'jest-expo/ios', setupFiles: ['./jest.setup.js'] },
{ preset: 'jest-expo/android', setupFiles: ['./jest.setup.js'] },
Expand Down
7 changes: 6 additions & 1 deletion package.json
Expand Up @@ -60,6 +60,10 @@
"@testing-library/jest-native": "^4.0.2",
"@testing-library/react-hooks": "^7.0.2",
"@testing-library/react-native": "^7.2.0",
"@types/jest": "^27.0.2",
"@types/react": "^17.0.30",
"@types/react-native": "^0.65.8",
"@types/react-test-renderer": "^17.0.1",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-import": "^2.25.2",
Expand All @@ -69,7 +73,8 @@
"jest": "^27.3.1",
"jest-expo": "^42.0.0",
"lint-staged": ">=11",
"prettier": "^2.4.1"
"prettier": "^2.4.1",
"typescript": "^4.4.4"
},
"lint-staged": {
"*.js": [
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
23 changes: 23 additions & 0 deletions tsconfig.json
@@ -0,0 +1,23 @@
{
"compilerOptions": {
"allowJs": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"isolatedModules": true,
"jsx": "react-native",
"lib": [
"es2017"
],
"moduleResolution": "node",
"noEmit": true,
"strict": true,
"target": "esnext"
},
"exclude": [
"node_modules",
"babel.config.js",
"metro.config.js",
"jest.config.js"
],
"extends": "expo/tsconfig.base"
}
35 changes: 32 additions & 3 deletions yarn.lock
Expand Up @@ -3031,6 +3031,14 @@
dependencies:
"@types/istanbul-lib-report" "*"

"@types/jest@^27.0.2":
version "27.0.2"
resolved "https://registry.yarnpkg.com/@types/jest/-/jest-27.0.2.tgz#ac383c4d4aaddd29bbf2b916d8d105c304a5fcd7"
integrity sha512-4dRxkS/AFX0c5XW6IPMNOydLn2tEhNhJV7DnYK+0bjoJZ+QTmfucBlihX7aoEsh/ocYtkLC73UbnBXBXIxsULA==
dependencies:
jest-diff "^27.0.0"
pretty-format "^27.0.0"

"@types/json-schema@^7.0.7":
version "7.0.7"
resolved "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.7.tgz"
Expand Down Expand Up @@ -3098,7 +3106,14 @@
dependencies:
"@types/react" "*"

"@types/react-test-renderer@>=16.9.0":
"@types/react-native@^0.65.8":
version "0.65.8"
resolved "https://registry.yarnpkg.com/@types/react-native/-/react-native-0.65.8.tgz#0923cceb0cf59ae674d915296554e726ea3a768a"
integrity sha512-dVZwSBBxkX+PlEQrFhAqnoA5Cln6ZF5H8GVi/NeA767KKH06bNPeezlZI8/J4Wa6quyB5qssVq4r5PvFJ9iKcw==
dependencies:
"@types/react" "*"

"@types/react-test-renderer@>=16.9.0", "@types/react-test-renderer@^17.0.1":
version "17.0.1"
resolved "https://registry.npmjs.org/@types/react-test-renderer/-/react-test-renderer-17.0.1.tgz"
integrity sha512-3Fi2O6Zzq/f3QR9dRnlnHso9bMl7weKCviFmfF6B4LS1Uat6Hkm15k0ZAQuDz+UBq6B3+g+NM6IT2nr5QgPzCw==
Expand All @@ -3114,6 +3129,15 @@
"@types/scheduler" "*"
csstype "^3.0.2"

"@types/react@^17.0.30":
version "17.0.30"
resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.30.tgz#2f8e6f5ab6415c091cc5e571942ee9064b17609e"
integrity sha512-3Dt/A8gd3TCXi2aRe84y7cK1K8G+N9CZRDG8kDGguOKa0kf/ZkSwTmVIDPsm/KbQOVMaDJXwhBtuOXxqwdpWVg==
dependencies:
"@types/prop-types" "*"
"@types/scheduler" "*"
csstype "^3.0.2"

"@types/scheduler@*":
version "0.16.1"
resolved "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.1.tgz"
Expand Down Expand Up @@ -7122,7 +7146,7 @@ jest-diff@^26.6.2:
jest-get-type "^26.3.0"
pretty-format "^26.6.2"

jest-diff@^27.3.1:
jest-diff@^27.0.0, jest-diff@^27.3.1:
version "27.3.1"
resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-27.3.1.tgz#d2775fea15411f5f5aeda2a5e02c2f36440f6d55"
integrity sha512-PCeuAH4AWUo2O5+ksW4pL9v5xJAcIKPUPfIhZBcG1RKv/0+dvaWTQK1Nrau8d67dp65fOqbeMdoil+6PedyEPQ==
Expand Down Expand Up @@ -9595,7 +9619,7 @@ pretty-format@^26.0.1, pretty-format@^26.4.0, pretty-format@^26.6.2:
ansi-styles "^4.0.0"
react-is "^17.0.1"

pretty-format@^27.3.1:
pretty-format@^27.0.0, pretty-format@^27.3.1:
version "27.3.1"
resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-27.3.1.tgz#7e9486365ccdd4a502061fa761d3ab9ca1b78df5"
integrity sha512-DR/c+pvFc52nLimLROYjnXPtolawm+uWDxr4FjuLDLUn+ktWnSN851KoHwHzzqq6rfCOjkzN8FLgDrSub6UDuA==
Expand Down Expand Up @@ -11286,6 +11310,11 @@ typescript@^4.4.3:
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.4.3.tgz#bdc5407caa2b109efd4f82fe130656f977a29324"
integrity sha512-4xfscpisVgqqDfPaJo5vkd+Qd/ItkoagnHpufr+i2QCHBsNYp+G7UAoyFl8aPtx879u38wPV65rZ8qbGZijalA==

typescript@^4.4.4:
version "4.4.4"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.4.4.tgz#2cd01a1a1f160704d3101fd5a58ff0f9fcb8030c"
integrity sha512-DqGhF5IKoBl8WNf8C1gu8q0xZSInh9j1kJJMqT3a94w1JzVaBU4EXOSMrz9yDqMT0xt3selp83fuFMQ0uzv6qA==

ua-parser-js@^0.7.18:
version "0.7.24"
resolved "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.24.tgz"
Expand Down

0 comments on commit bef0c8c

Please sign in to comment.