Skip to content

Commit

Permalink
feat: migrate from Flow to TypeScript
Browse files Browse the repository at this point in the history
- Migrated all Flow files to TypeScript
- Disabled 'dot-notation' ESLint rule conflicting with TypeScript
- Use more default Prettier settings
- Moved ESLint and Prettier config into package.json
  • Loading branch information
tido64 committed Feb 3, 2022
1 parent 49cdfa4 commit a7895cd
Show file tree
Hide file tree
Showing 39 changed files with 1,201 additions and 1,170 deletions.
13 changes: 6 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ default config for macOS: &macos_defaults
macos:
xcode: '12.5.1'


config for macOS (android): &macos_defaults_android
<<: *defaults
resource_class: 'medium'
Expand Down Expand Up @@ -143,13 +142,13 @@ jobs:
name: Lint check
command: yarn test:lint

"Test: flow":
"Test: TypeScript":
<<: *js_defaults
steps:
- *addWorkspace
- run:
name: Flow check
command: yarn test:flow
name: TypeScript check
command: yarn test:ts

"Test: Android unit":
<<: *android_defaults
Expand Down Expand Up @@ -322,7 +321,7 @@ workflows:
- "Test: lint":
requires:
- "Setup environment"
- "Test: flow":
- "Test: TypeScript":
requires:
- "Setup environment"
- "Test: Android unit":
Expand All @@ -331,11 +330,11 @@ workflows:
- "Test: iOS e2e":
requires:
- "Test: lint"
- "Test: flow"
- "Test: TypeScript"
- "Build: Android release apk":
requires:
- "Test: lint"
- "Test: flow"
- "Test: TypeScript"
- "Test: Android unit"
- "Test: Android e2e":
requires:
Expand Down
17 changes: 0 additions & 17 deletions .eslintrc

This file was deleted.

75 changes: 0 additions & 75 deletions .flowconfig

This file was deleted.

4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ body:
attributes:
label: Version
description: What version of `@react-native-async-storage/async-storage` are you using?
placeholder: "Example: 1.15.9"
placeholder: 'Example: 1.15.9'
validations:
required: true
- type: checkboxes
id: platforms
attributes:
label: What platforms are you seeing this issue on?
description: "Select all that apply:"
description: 'Select all that apply:'
options:
- label: Android
- label: iOS
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
pull_request:
jobs:
macos:
name: "macOS"
name: 'macOS'
runs-on: macos-latest
steps:
- name: Set up Node.js
Expand Down Expand Up @@ -34,7 +34,7 @@ jobs:
run: |
yarn test:e2e:macos
windows:
name: "Windows"
name: 'Windows'
runs-on: windows-latest
steps:
- name: Set up MSBuild
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
name: Mark stale issues and pull requests
on:
schedule:
- cron: "30 1 * * *"
- cron: '30 1 * * *'
jobs:
stale:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/stale@v4
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'This issue has been marked as stale due to inactivity. Please respond or otherwise resolve the issue within 7 days or it will be closed.'
stale-pr-message: 'This PR has been marked as stale due to inactivity. Please address any comments within 7 days or it will be closed.'
exempt-issue-labels: 'help wanted :octocat:'
exempt-pr-labels: 'WIP'
- uses: actions/stale@v4
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'This issue has been marked as stale due to inactivity. Please respond or otherwise resolve the issue within 7 days or it will be closed.'
stale-pr-message: 'This PR has been marked as stale due to inactivity. Please address any comments within 7 days or it will be closed.'
exempt-issue-labels: 'help wanted :octocat:'
exempt-pr-labels: 'WIP'
41 changes: 19 additions & 22 deletions .github/workflows/website-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,30 @@ name: Website Deployment
on:
push:
branches:
- master
- master
paths:
- 'website/**'
- 'website/**'

jobs:
deploy:
name: Deploy website
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Cache/restore dependencies
uses: actions/cache@v1
id: cache
with:
path: ./website/node_modules
key: website-${{ hashFiles('website/yarn.lock') }}
- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile --cwd ./website
- name: Release
working-directory: ./website
run: |
git config --global user.name ${{ secrets.GH_DEPLOY_NAME }}
git config --global user.email ${{ secrets.GH_DEPLOY_EMAIL }}
echo "machine github.com login ${{ secrets.GH_DEPLOY_NAME }} password ${{ secrets.GH_DEPLOY_TOKEN }}" > ~/.netrc
GIT_USER=${{ secrets.GH_DEPLOY_NAME }} yarn run deploy
- uses: actions/checkout@v2
- name: Cache/restore dependencies
uses: actions/cache@v1
id: cache
with:
path: ./website/node_modules
key: website-${{ hashFiles('website/yarn.lock') }}
- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile --cwd ./website
- name: Release
working-directory: ./website
run: |
git config --global user.name ${{ secrets.GH_DEPLOY_NAME }}
git config --global user.email ${{ secrets.GH_DEPLOY_EMAIL }}
echo "machine github.com login ${{ secrets.GH_DEPLOY_NAME }} password ${{ secrets.GH_DEPLOY_TOKEN }}" > ~/.netrc
GIT_USER=${{ secrets.GH_DEPLOY_NAME }} yarn run deploy
1 change: 0 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ README.md
babel.config.js
.clang-format
.eslintrc
.flowconfig
.watchmanconfig
.npmrc
.circleci
Expand Down
8 changes: 0 additions & 8 deletions .prettierrc

This file was deleted.

19 changes: 0 additions & 19 deletions .releaserc

This file was deleted.

Loading

0 comments on commit a7895cd

Please sign in to comment.