Skip to content

Commit d3db78f

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

274 files changed

Lines changed: 14694 additions & 12300 deletions

File tree

Some content is hidden

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

.circleci/config.yml

Lines changed: 4 additions & 5 deletions
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:

.eslintignore

Lines changed: 3 additions & 0 deletions
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/

.eslintrc

Lines changed: 15 additions & 10 deletions
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
}

.flowconfig

Lines changed: 1 addition & 2 deletions
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

.gitignore

Lines changed: 3 additions & 1 deletion
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/

__ts-tests__/ActivityIndicator.test.tsx

Lines changed: 0 additions & 9 deletions
This file was deleted.

__ts-tests__/Appbar.test.tsx

Lines changed: 0 additions & 26 deletions
This file was deleted.

__ts-tests__/AppbarHeader.test.tsx

Lines changed: 0 additions & 27 deletions
This file was deleted.

__ts-tests__/AvatarIcon.test.tsx

Lines changed: 0 additions & 7 deletions
This file was deleted.

__ts-tests__/AvatarImage.test.tsx

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)