Skip to content

Commit aa39f65

Browse files
author
Lucas Araujo
committed
Merge branch 'develop' into chore/ddw-895-update-cardano-launcher
2 parents e4a6e84 + 206d3d8 commit aa39f65

File tree

2,218 files changed

+125337
-124837
lines changed

Some content is hidden

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

2,218 files changed

+125337
-124837
lines changed

.babelrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"presets": [
33
"@babel/preset-env",
44
"@babel/preset-react",
5-
"@babel/preset-flow"
5+
"@babel/preset-typescript"
66
],
77
"plugins": [
88
["@babel/plugin-proposal-decorators", { "legacy": true }],

.eslintrc

Lines changed: 32 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
{
2-
"parser": "@babel/eslint-parser",
2+
"parser": "@typescript-eslint/parser",
33
"parserOptions": {
44
"ecmaFeatures": {
55
"legacyDecorators": true
66
}
77
},
88
"extends": [
99
"airbnb",
10-
"plugin:flowtype/recommended",
10+
"plugin:@typescript-eslint/recommended",
1111
"plugin:react/recommended",
1212
"prettier",
1313
"prettier/babel",
14-
"prettier/flowtype",
14+
"prettier/@typescript-eslint",
1515
"prettier/react",
1616
"plugin:jest/recommended"
1717
],
@@ -24,7 +24,7 @@
2424
"rules": {
2525
"class-methods-use-this": 0,
2626
"consistent-return": "warn",
27-
"flowtype/generic-spacing": 0,
27+
"@typescript-eslint/generic-spacing": 0,
2828
"jsx-a11y/alt-text": 0,
2929
"lines-between-class-members": 0,
3030
"global-require": 0,
@@ -69,19 +69,24 @@
6969
"react/no-array-index-key": "warn",
7070
"react/no-unused-prop-types": "warn",
7171
"react/prefer-stateless-function": 0,
72-
"react/prop-types": "warn",
72+
"react/prop-types": 0,
7373
"react/require-default-props": 0,
74+
"react/jsx-first-prop-new-line": [1, "multiline-multiprop"],
75+
"@typescript-eslint/ban-ts-comment": 1,
76+
"@typescript-eslint/no-empty-function": 1,
77+
"@typescript-eslint/ban-types": 1,
78+
"import/no-unresolved": 1,
79+
"@typescript-eslint/no-var-requires": 1,
80+
"camelcase": 1,
81+
"no-empty": 1,
82+
"@typescript-eslint/no-explicit-any": 1,
83+
"no-shadow": 1,
84+
"react/no-did-update-set-state": 1,
7485
"react/sort-comp": 0,
7586
"react/state-in-constructor": 0,
7687
"react/static-property-placement": 0
7788
},
78-
"plugins": [
79-
"flowtype",
80-
"import",
81-
"promise",
82-
"react",
83-
"jest"
84-
],
89+
"plugins": ["@typescript-eslint", "import", "promise", "react", "jest"],
8590
"globals": {
8691
"API": true,
8792
"API_VERSION": true,
@@ -91,6 +96,19 @@
9196
"Process": true // TODO: remove after fix
9297
},
9398
"settings": {
94-
"import/resolver": "webpack"
95-
}
99+
"import/resolver": {
100+
"node": {
101+
"extensions": [".js", ".jsx", ".ts", ".tsx"]
102+
}
103+
}
104+
},
105+
"overrides": [
106+
{
107+
"files": "**/*.ts",
108+
"rules": {
109+
"no-useless-constructor": "off",
110+
"@typescript-eslint/no-useless-constructor": "error"
111+
}
112+
}
113+
]
96114
}

.flowconfig

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

.github/pull_request_template.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ or animated GIFs of important UI changes in both English and Japanese.
2020
Do not use shadow or any effects. On macOS this can be accomplished the following way:
2121
1. Use the Command+Shift+4 keyboard shortcut.
2222
2. Press the Spacebar.
23-
3. Hold the Option button and click the window you want to capture.
23+
3. Hold the Option button and click the window you want to capture.
2424
-->
2525

2626
## Testing Checklist
@@ -29,7 +29,6 @@ Do not use shadow or any effects. On macOS this can be accomplished the followin
2929
Open a thread on #daedalus-qa on Slack, mention `@daedalusqa` and `@daedalusteam`, link the thread below
3030
-->
3131

32-
3332
- [Slack QA thread](https://input-output-rnd.slack.com/messages/GGKFXSKC6)
3433
- [ ] Test
3534

@@ -38,34 +37,38 @@ Open a thread on #daedalus-qa on Slack, mention `@daedalusqa` and `@daedalusteam
3837
## Review Checklist
3938

4039
### Basics
41-
- [ ] PR assigned to the PR author(s)
40+
41+
- [ ] PR assigned to the PR author(s)
4242
- [ ] `input-output-hk/daedalus-dev` and `input-output-hk/daedalus-qa` assigned as PR reviewers
4343
- [ ] If there are UI changes, Alexander Rukin assigned as an additional reviewer
44-
- [ ] All visual regression testing has been reviewed (Go to Github Actions tab -> Select Chromatic workflow -> Run on your working branch)
44+
- [ ] All visual regression testing has been reviewed (assign `run Chromatic` label to PR to trigger the run)
4545
- [ ] PR has appropriate labels (`release-vNext`, `feature`/`bug`/`chore`, `WIP`)
4646
- [ ] PR link is added to a Jira ticket, ticket moved to In Review
4747
- [ ] PR is updated to the most recent version of the target branch (and there are no conflicts)
4848
- [ ] PR has a good description that summarizes all changes
4949
- [ ] PR contains screenshots (in case of UI changes)
50-
- [ ] CHANGELOG entry has been added to the top of the appropriate section (*Features*, *Fixes*, *Chores*) and is linked to the correct PR on GitHub
50+
- [ ] CHANGELOG entry has been added to the top of the appropriate section (_Features_, _Fixes_, _Chores_) and is linked to the correct PR on GitHub
5151
- [ ] There are no missing translations (running `yarn manage:translations` produces no changes)
5252
- [ ] Text changes are proofread and approved (Jane Wild / Amy Reeve)
5353
- [ ] Japanese text changes are proofread and approved (Junko Oda)
5454
- [ ] Storybook works and no stories are broken (`yarn storybook`)
5555
- [ ] In case of dependency changes `yarn.lock` file is updated
5656

5757
### Code Quality
58+
5859
- [ ] Important parts of the code are properly commented and documented
59-
- [ ] Code is properly typed with flow
60+
- [ ] Code is properly typed with typescript types
6061
- [ ] React components are split-up enough to avoid unnecessary re-renderings
6162
- [ ] Any code that only works in main process is neatly separated from components
6263

6364
### Testing
65+
6466
- [ ] New feature/change is covered by acceptance tests
6567
- [ ] New feature/change is manually tested and approved by QA team
6668
- [ ] All existing acceptance tests are still up-to-date
6769
- [ ] New feature/change is covered by Daedalus Testing scenario
6870
- [ ] All existing Daedalus Testing scenarios are still up-to-date
6971

7072
### After Review
73+
7174
- [ ] Update Slack QA thread by marking it with a green checkmark

.github/workflows/chromatic.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
name: 'Chromatic'
22
on:
3-
workflow_dispatch:
3+
pull_request:
4+
types:
5+
- labeled
46
push:
57
branches:
68
- develop
79

810
jobs:
911
chromatic-deployment:
12+
if: contains(github.event.pull_request.labels.*.name, 'run Chromatic') || github.ref == 'refs/heads/develop'
1013
runs-on: ubuntu-latest
14+
env:
15+
STORYBOOK_FREEZE_DATE: "true"
1116
steps:
1217
- uses: actions/checkout@v1
1318
- name: Setup Node.js
@@ -23,10 +28,12 @@ jobs:
2328
token: ${{ secrets.GITHUB_TOKEN }}
2429
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
2530
exitZeroOnChanges: true
31+
buildScriptName: 'storybook:build:chromatic'
2632
- name: Publish to Chromatic and auto accept changes
2733
if: github.ref == 'refs/heads/develop'
2834
uses: chromaui/action@v1
2935
with:
3036
token: ${{ secrets.GITHUB_TOKEN }}
3137
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
3238
autoAcceptChanges: true
39+
buildScriptName: 'storybook:build:chromatic'

.github/workflows/linter.yml

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

.github/workflows/run_tests_on_pr.yml

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

.github/workflows/verify_pr.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Verify Pull Request
2+
on:
3+
pull_request:
4+
jobs:
5+
tests:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- name: Checkout Repo
9+
uses: actions/checkout@v2
10+
- name: Setup Node.js
11+
uses: actions/setup-node@v2
12+
with:
13+
node-version: "14"
14+
- name: Restore node_modules from cache
15+
uses: actions/cache@v2
16+
with:
17+
path: '**/node_modules'
18+
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
19+
- name: Install dependencies
20+
run: yarn --frozen-lockfile
21+
- name: Run checks
22+
run: yarn check:all
23+
- name: Ensure there are no uncommited changes
24+
run: git diff --exit-code || (echo "Did you forget to run 'yarn check:all' and commit changes?" && exit 1)
25+
- name: Run tests
26+
run: yarn test:jest --maxWorkers=3

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,3 +119,6 @@ Debug
119119
/cardano-cli
120120
/cardano-wallet
121121
.vscode
122+
123+
# Typescript
124+
*.scss.d.ts

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
# But not these file types
1313
!*.js
14+
!*.ts
15+
!*.tsx
1416
!*.scss
1517
!*.json
1618

0 commit comments

Comments
 (0)