Skip to content

Commit d3db78f

Browse files
wojteg1337Trancever
authored andcommitted
feat: migrate from Flow to TS (callstack#1114)
1 parent fcf3ec9 commit d3db78f

File tree

274 files changed

+14694
-12300
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

274 files changed

+14694
-12300
lines changed

Diff for: .circleci/config.yml

+4-5
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ jobs:
2525
- dependencies-example-{{ checksum "example/package.json" }}
2626
- dependencies-example-
2727
- run: |
28+
yarn install --cwd example --frozen-lockfile
29+
yarn install --cwd docs --frozen-lockfile
2830
yarn install --frozen-lockfile
29-
cd docs && yarn install --frozen-lockfile && cd ..
30-
cd example && yarn install --frozen-lockfile && cd ..
3131
- save_cache:
3232
key: dependencies-{{ checksum "package.json" }}
3333
paths: node_modules
@@ -40,14 +40,13 @@ jobs:
4040
- persist_to_workspace:
4141
root: .
4242
paths: .
43-
lint-and-flow:
43+
lint:
4444
<<: *defaults
4545
steps:
4646
- attach_workspace:
4747
at: ~/react-native-paper
4848
- run: |
4949
yarn lint
50-
yarn flow check
5150
typescript:
5251
<<: *defaults
5352
steps:
@@ -106,7 +105,7 @@ workflows:
106105
build-and-test:
107106
jobs:
108107
- install-dependencies
109-
- lint-and-flow:
108+
- lint:
110109
requires:
111110
- install-dependencies
112111
- typescript:

Diff for: .eslintignore

+3
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@ node_modules/
22
flow-typed/
33
coverage/
44
docs/dist/
5+
6+
# generated by bob
7+
lib/

Diff for: .eslintrc

+15-10
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"browser": true
44
},
55

6-
"extends": ["callstack-io"],
6+
"extends": ["@callstack"],
77

88
"plugins": ["react-native"],
99

@@ -13,18 +13,23 @@
1313
"no-nested-ternary": "off",
1414
"global-require": "off",
1515

16-
"flowtype/define-flow-type": "error",
17-
"flowtype/no-weak-types": "off",
18-
"flowtype/require-variable-type": "off",
19-
"flowtype/sort-keys": "off",
20-
"flowtype/type-id-match": "off",
21-
"flowtype/use-flow-type": "error",
22-
"flowtype/valid-syntax": "error",
23-
2416
"import/no-extraneous-dependencies": "off",
2517
"import/first": "off",
2618

2719
"react-native/no-unused-styles": "error",
28-
"react-native/split-platform-components": "off"
20+
"react-native/split-platform-components": "off",
21+
"react-native/no-raw-text": "off"
22+
},
23+
24+
"settings": {
25+
"import/extensions": [".js", ".ts", ".tsx"],
26+
"import/parsers": {
27+
"@typescript-eslint/parser": [".ts", ".tsx"]
28+
},
29+
"import/resolver": {
30+
"node": {
31+
"extensions": [".js", ".ts", ".tsx"]
32+
}
33+
}
2934
}
3035
}

Diff for: .flowconfig

+1-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
[libs]
3434
node_modules/react-native/Libraries/react-native/react-native-interface.js
3535
node_modules/react-native/flow/
36-
node_modules/react-native/flow-github/
3736

3837
[options]
3938
emoji=true
@@ -80,4 +79,4 @@ suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
8079
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
8180

8281
[version]
83-
^0.78.0
82+
^0.92.0

Diff for: .gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
# VSCode
66
.vscode/
7-
tsconfig.json
87
jsconfig.json
98

109
# Xcode
@@ -58,3 +57,6 @@ dist/
5857
# Release
5958
#
6059
CHANGELOG.md
60+
61+
# generated by bob
62+
lib/

Diff for: __ts-tests__/ActivityIndicator.test.tsx

-9
This file was deleted.

Diff for: __ts-tests__/Appbar.test.tsx

-26
This file was deleted.

Diff for: __ts-tests__/AppbarHeader.test.tsx

-27
This file was deleted.

Diff for: __ts-tests__/AvatarIcon.test.tsx

-7
This file was deleted.

Diff for: __ts-tests__/AvatarImage.test.tsx

-7
This file was deleted.

Diff for: __ts-tests__/AvatarText.test.tsx

-7
This file was deleted.

Diff for: __ts-tests__/Badge.test.tsx

-9
This file was deleted.

Diff for: __ts-tests__/Banner.test.tsx

-39
This file was deleted.

Diff for: __ts-tests__/BottomNavigation.test.tsx

-38
This file was deleted.

Diff for: __ts-tests__/Button.test.tsx

-11
This file was deleted.

Diff for: __ts-tests__/Caption.test.tsx

-9
This file was deleted.

Diff for: __ts-tests__/Card.test.tsx

-20
This file was deleted.

Diff for: __ts-tests__/CardActions.test.tsx

-14
This file was deleted.

Diff for: __ts-tests__/CardContent.test.tsx

-14
This file was deleted.

Diff for: __ts-tests__/CardCover.test.tsx

-11
This file was deleted.

Diff for: __ts-tests__/CardTitle.test.tsx

-14
This file was deleted.

0 commit comments

Comments
 (0)