Skip to content

Commit

Permalink
feat: migrate from Flow to TS (callstack#1114)
Browse files Browse the repository at this point in the history
  • Loading branch information
wojteg1337 authored and Trancever committed Jun 26, 2019
1 parent fcf3ec9 commit d3db78f
Show file tree
Hide file tree
Showing 274 changed files with 14,694 additions and 12,300 deletions.
9 changes: 4 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ jobs:
- dependencies-example-{{ checksum "example/package.json" }}
- dependencies-example-
- run: |
yarn install --cwd example --frozen-lockfile
yarn install --cwd docs --frozen-lockfile
yarn install --frozen-lockfile
cd docs && yarn install --frozen-lockfile && cd ..
cd example && yarn install --frozen-lockfile && cd ..
- save_cache:
key: dependencies-{{ checksum "package.json" }}
paths: node_modules
Expand All @@ -40,14 +40,13 @@ jobs:
- persist_to_workspace:
root: .
paths: .
lint-and-flow:
lint:
<<: *defaults
steps:
- attach_workspace:
at: ~/react-native-paper
- run: |
yarn lint
yarn flow check
typescript:
<<: *defaults
steps:
Expand Down Expand Up @@ -106,7 +105,7 @@ workflows:
build-and-test:
jobs:
- install-dependencies
- lint-and-flow:
- lint:
requires:
- install-dependencies
- typescript:
Expand Down
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@ node_modules/
flow-typed/
coverage/
docs/dist/

# generated by bob
lib/
25 changes: 15 additions & 10 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"browser": true
},

"extends": ["callstack-io"],
"extends": ["@callstack"],

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

Expand All @@ -13,18 +13,23 @@
"no-nested-ternary": "off",
"global-require": "off",

"flowtype/define-flow-type": "error",
"flowtype/no-weak-types": "off",
"flowtype/require-variable-type": "off",
"flowtype/sort-keys": "off",
"flowtype/type-id-match": "off",
"flowtype/use-flow-type": "error",
"flowtype/valid-syntax": "error",

"import/no-extraneous-dependencies": "off",
"import/first": "off",

"react-native/no-unused-styles": "error",
"react-native/split-platform-components": "off"
"react-native/split-platform-components": "off",
"react-native/no-raw-text": "off"
},

"settings": {
"import/extensions": [".js", ".ts", ".tsx"],
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"]
},
"import/resolver": {
"node": {
"extensions": [".js", ".ts", ".tsx"]
}
}
}
}
3 changes: 1 addition & 2 deletions .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
[libs]
node_modules/react-native/Libraries/react-native/react-native-interface.js
node_modules/react-native/flow/
node_modules/react-native/flow-github/

[options]
emoji=true
Expand Down Expand Up @@ -80,4 +79,4 @@ suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError

[version]
^0.78.0
^0.92.0
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

# VSCode
.vscode/
tsconfig.json
jsconfig.json

# Xcode
Expand Down Expand Up @@ -58,3 +57,6 @@ dist/
# Release
#
CHANGELOG.md

# generated by bob
lib/
9 changes: 0 additions & 9 deletions __ts-tests__/ActivityIndicator.test.tsx

This file was deleted.

26 changes: 0 additions & 26 deletions __ts-tests__/Appbar.test.tsx

This file was deleted.

27 changes: 0 additions & 27 deletions __ts-tests__/AppbarHeader.test.tsx

This file was deleted.

7 changes: 0 additions & 7 deletions __ts-tests__/AvatarIcon.test.tsx

This file was deleted.

7 changes: 0 additions & 7 deletions __ts-tests__/AvatarImage.test.tsx

This file was deleted.

7 changes: 0 additions & 7 deletions __ts-tests__/AvatarText.test.tsx

This file was deleted.

9 changes: 0 additions & 9 deletions __ts-tests__/Badge.test.tsx

This file was deleted.

39 changes: 0 additions & 39 deletions __ts-tests__/Banner.test.tsx

This file was deleted.

38 changes: 0 additions & 38 deletions __ts-tests__/BottomNavigation.test.tsx

This file was deleted.

11 changes: 0 additions & 11 deletions __ts-tests__/Button.test.tsx

This file was deleted.

9 changes: 0 additions & 9 deletions __ts-tests__/Caption.test.tsx

This file was deleted.

20 changes: 0 additions & 20 deletions __ts-tests__/Card.test.tsx

This file was deleted.

14 changes: 0 additions & 14 deletions __ts-tests__/CardActions.test.tsx

This file was deleted.

14 changes: 0 additions & 14 deletions __ts-tests__/CardContent.test.tsx

This file was deleted.

11 changes: 0 additions & 11 deletions __ts-tests__/CardCover.test.tsx

This file was deleted.

14 changes: 0 additions & 14 deletions __ts-tests__/CardTitle.test.tsx

This file was deleted.

Loading

0 comments on commit d3db78f

Please sign in to comment.