Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite Examples to TS #1273

Merged
merged 83 commits into from
Dec 17, 2020
Merged
Show file tree
Hide file tree
Changes from 73 commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
94368a5
feat: move Example to Example.old
WoLewicki Dec 8, 2020
717d75c
feat: add ts Example project
WoLewicki Dec 8, 2020
8e35731
feat: add first look on RNGH resolving
WoLewicki Dec 8, 2020
4bc169e
feat: add working Android and iOS
WoLewicki Dec 9, 2020
59898c1
feat: rewrite all files to TS
WoLewicki Dec 9, 2020
6e2cd18
fix: remove some TODOs
WoLewicki Dec 10, 2020
2c3dd38
fix: ref types and comment
WoLewicki Dec 10, 2020
20d6807
fix: remove some more TODOs
WoLewicki Dec 10, 2020
1dfb2e9
fix: rest of issues
WoLewicki Dec 11, 2020
97f3b05
Add resolver module for eslint
jakub-gonet Dec 12, 2020
e4c22cf
Remove Example.old
jakub-gonet Dec 12, 2020
0783a15
Remove unncessary config files
jakub-gonet Dec 12, 2020
d4c5b38
Remove @format directive in tests
jakub-gonet Dec 12, 2020
44a2c3e
Add types for react-test-renderer
jakub-gonet Dec 12, 2020
64ae488
Remove buck
jakub-gonet Dec 12, 2020
af97c69
Register RNGH root view
jakub-gonet Dec 12, 2020
f059a61
Merge branch 'master' into @wolewicki/example-to-ts
jakub-gonet Dec 12, 2020
df1ba1a
Add missing eslint resolver configuration
jakub-gonet Dec 12, 2020
d018a00
Update iOS project data
jakub-gonet Dec 12, 2020
0358b50
Update travis config
jakub-gonet Dec 12, 2020
3906c79
Use xcpretty and remove sdkmanager --licences
jakub-gonet Dec 12, 2020
7071d51
Add build tools 28.0.3 to android build
jakub-gonet Dec 13, 2020
392a5ea
Re-add MBFingerTipWindow library
jakub-gonet Dec 13, 2020
830ee3c
Comment out iOS test
jakub-gonet Dec 13, 2020
ec13c51
Move jestSetup & webpack config to Example
jakub-gonet Dec 13, 2020
f62da06
Add @types/jest
jakub-gonet Dec 13, 2020
dcd91e1
Remove jest test for Example
jakub-gonet Dec 13, 2020
cac9ebd
Move files into src/ dir
jakub-gonet Dec 13, 2020
af3d8c2
Change any in c-tor to correct type
jakub-gonet Dec 13, 2020
135cbee
Add private modifier to the most class members
jakub-gonet Dec 13, 2020
dcd454e
Remove App.tsx from examples/
jakub-gonet Dec 13, 2020
810e9ee
Fix style prop type in draggable
jakub-gonet Dec 13, 2020
95dfece
Add eslint and prettier configs
jakub-gonet Dec 13, 2020
e69f52c
Reformat & use interpolation in drawer
jakub-gonet Dec 13, 2020
4bd07c2
Provide default styles for PanResponder
jakub-gonet Dec 13, 2020
d936b99
Remove type assertion from App.tsx
jakub-gonet Dec 13, 2020
c22e1a5
Use default bracket spacing option and reformat Example
jakub-gonet Dec 13, 2020
64cbded
Upgrade eslint plugins and add eslint-plugin-jest
jakub-gonet Dec 13, 2020
1d4063a
Remove webpack config
jakub-gonet Dec 13, 2020
00903e2
Add explicitly metro-config
jakub-gonet Dec 13, 2020
7afcb16
Use root eslint config, add new TS & jest rules, quote props consiste…
jakub-gonet Dec 13, 2020
5d3323c
Quote props consistently
jakub-gonet Dec 13, 2020
2e88a1e
Use escape code for apostrophe
jakub-gonet Dec 13, 2020
0d81586
Use setState callback where eslint reported
jakub-gonet Dec 13, 2020
bbcda37
Remove unused styles
jakub-gonet Dec 13, 2020
a046635
Add type to style prop
jakub-gonet Dec 13, 2020
b7668f6
Allow using more memory for JVM
jakub-gonet Dec 13, 2020
314f721
Ignore dist/ in tsconfig and .gitignore
jakub-gonet Dec 14, 2020
125dbc7
Reformat RNGH types declaration file
jakub-gonet Dec 14, 2020
c4d2c77
Upgrade types for react-native
jakub-gonet Dec 14, 2020
6ed1d00
Remove unnesessary comment
jakub-gonet Dec 14, 2020
803d0bf
Add type for ref callback
jakub-gonet Dec 14, 2020
70b5fbb
Update example package name to conform to naming standards
jakub-gonet Dec 14, 2020
279685e
Add lint and TS check to Travis
jakub-gonet Dec 14, 2020
82b3b0a
Merge branch 'master' into @wolewicki/example-to-ts
jakub-gonet Dec 14, 2020
af7341b
Run yarn in Example when building in CI
jakub-gonet Dec 14, 2020
15ee72d
fix: some easy anys
WoLewicki Dec 14, 2020
482d0e8
feat: add new types and remove ts-ignore
WoLewicki Dec 14, 2020
00a9ba9
fix: add changes in touchables
WoLewicki Dec 14, 2020
c3114c0
feat: update tsconfig
WoLewicki Dec 14, 2020
d77e96d
Escape quotes
jakub-gonet Dec 14, 2020
6cadf5c
Remove start yarn command
jakub-gonet Dec 14, 2020
e178a64
fix: remove unnecessary vars
WoLewicki Dec 14, 2020
21cd23d
fix: remove ts-ignore
WoLewicki Dec 14, 2020
ab52698
fix: navigation in touchables
WoLewicki Dec 14, 2020
b1f4d5a
fix: update panResponder
WoLewicki Dec 14, 2020
4590ca5
fix: change type in combo
WoLewicki Dec 14, 2020
c522590
fix: name unused parameters in swipeable
WoLewicki Dec 14, 2020
24d8693
fix: unused vars in swipeable
WoLewicki Dec 14, 2020
0b0911b
fix: change name to Example
WoLewicki Dec 14, 2020
d60704b
fix: change android app display name
WoLewicki Dec 14, 2020
700ad53
fix: remove unused import
WoLewicki Dec 14, 2020
159323f
Don't generate declarations and include only ts files
jakub-gonet Dec 14, 2020
4a246de
Remove _ prefix from orivate variables
jakub-gonet Dec 15, 2020
ebc0d58
Fix some Component<{}> type errors
jakub-gonet Dec 15, 2020
11314d3
Add typescript eslint packages
jakub-gonet Dec 16, 2020
30d103e
Update lint config
jakub-gonet Dec 16, 2020
1c97274
Use escape codes
jakub-gonet Dec 16, 2020
5cde8f2
Fix eslint warnings
jakub-gonet Dec 16, 2020
fd3a541
Merge branch 'master' into @wolewicki/example-to-ts
jakub-gonet Dec 16, 2020
5d18902
Update Podfile.lock
jakub-gonet Dec 17, 2020
8f6ca4d
Remove Reanimated from Example
jakub-gonet Dec 17, 2020
00cbf5d
Rename index.tsx to index.js
jakub-gonet Dec 17, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"extends": "satya164",
"settings": {
"react": { "version": "16" },
"import/resolver": {
"babel-module": {}
}
},
"env": { "browser": true, "node": true, "jest/globals": true },
"plugins": ["jest"],
"rules": {
"import/named": "off",
"react/sort-comp": "off",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "error",
"no-use-before-define": "off",
"@typescript-eslint/no-use-before-define": "error"
}
}
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,7 @@ jsconfig.json
.project
.settings/
.vscode

# TS

dist/
23 changes: 19 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,9 @@ matrix:
components:
- tools
- platform-tools
- build-tools-29.0.2
- build-tools-28.0.3
- android-28
- android-29
install:
- nvm install $NODE_VERSION
- nvm use $NODE_VERSION
Expand All @@ -76,8 +77,8 @@ matrix:
- language: objective-c
os: osx
osx_image: xcode12.2
xcode_workspace: './Example/ios/GestureHandler.xcworkspace'
xcode_scheme: GestureHandler
xcode_workspace: './Example/ios/Example.xcworkspace'
xcode_scheme: Example
podfile: './Example/ios/Podfile'
xcode_sdk: iphonesimulator12.2
xcode_destination: platform=iOS Simulator,OS=12.2,name=iPhone X
Expand Down Expand Up @@ -107,4 +108,18 @@ matrix:
- export PRODUCT_BUNDLE_IDENTIFIER="com.swmansion.rn_gesture_handler_example"

script:
- xcodebuild -workspace ios/GestureHandler.xcworkspace -destination 'platform=iOS Simulator,OS=12.2,name=iPhone X' -scheme GestureHandler -parallelizeTargets -configuration Debug -derivedDataPath ios/build -UseModernBuildSystem=YES
- xcodebuild -workspace ios/Example.xcworkspace -destination 'platform=iOS Simulator,OS=12.2,name=iPhone X' -scheme Example -parallelizeTargets -configuration Debug -derivedDataPath ios/build -UseModernBuildSystem=YES | xcpretty

- language: node_js
node_js:
- 12
cache:
directories:
- node_modules
script:
- yarn
- cd examples/Example
- yarn
- cd ../..
- yarn tsc --noEmit
- yarn lint-check
19 changes: 14 additions & 5 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
module.exports = function(api) {
api.cache(true);
return {
presets: ['babel-preset-expo'],
};
module.exports = {
presets: [
[
'@babel/preset-env',
{
targets: {
node: 'current',
},
},
],
'@babel/preset-typescript',
'module:metro-react-native-babel-preset',
],
plugins: ['@babel/plugin-proposal-class-properties'],
};
1 change: 0 additions & 1 deletion examples/App.js

This file was deleted.

17 changes: 0 additions & 17 deletions examples/Example/.babelrc

This file was deleted.

1 change: 1 addition & 0 deletions examples/Example/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.pbxproj -text
9 changes: 4 additions & 5 deletions examples/Example/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ DerivedData
*.hmap
*.ipa
*.xcuserstate
xcshareddata

# Android/IntelliJ
#
Expand All @@ -30,6 +29,10 @@ build/
local.properties
*.iml

# Visual Studio Code
#
.vscode/

# node.js
#
node_modules/
Expand Down Expand Up @@ -58,7 +61,3 @@ buck-out/

# CocoaPods
/ios/Pods/

# Expo
/.expo
/web-build
9 changes: 9 additions & 0 deletions examples/Example/.prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"jsxBracketSameLine": true,
"printWidth": 80,
"tabWidth": 2,
"semi": true,
"singleQuote": true,
"trailingComma": "es5",
"quoteProps": "consistent"
}
196 changes: 0 additions & 196 deletions examples/Example/App.js

This file was deleted.

9 changes: 0 additions & 9 deletions examples/Example/__tests__/App.js

This file was deleted.

Loading