Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected ts migration for LLM #1000

Merged
merged 86 commits into from
Aug 22, 2022
Merged

Unexpected ts migration for LLM #1000

merged 86 commits into from
Aug 22, 2022

Conversation

juan-cortes
Copy link
Contributor

@juan-cortes juan-cortes commented Aug 19, 2022

image

This turned into an unexpected typescript migration and I don't know exactly how it happened.

📝 Description

I promise it was not my intention to hijack the purpose of #991 but it ended up being basically what this is. Following the proposed approach from @LFBarreto over there I went over all the files in the repo, and completed a migration. We have a bunch of house cleaning to do after this though, we need to go over all the warnings, all the unused files, etc. Left more data for this over on slack but it's not yet published so I can't link there just yet.

❓ Context

  • Impacted projects: ledger-live-mobile
  • Linked resource(s): https://ledgerhq.atlassian.net/browse/LIVE-2505

✅ Checklist

  • Test coverage
  • Atomic delivery
  • No breaking changes

📸 Demo

No demo needed.

🚀 Expectations to reach

Nothing to test if CI is happy.

@vercel
Copy link

vercel bot commented Aug 19, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
live-common-tools ✅ Ready (Inspect) Visit Preview Aug 21, 2022 at 7:04PM (UTC)
3 Ignored Deployments
Name Status Preview Updated
ledger-live-github-bot ⬜️ Ignored (Inspect) Aug 21, 2022 at 7:04PM (UTC)
native-ui-storybook ⬜️ Ignored (Inspect) Aug 21, 2022 at 7:04PM (UTC)
react-ui-storybook ⬜️ Ignored (Inspect) Aug 21, 2022 at 7:04PM (UTC)

@changeset-bot
Copy link

changeset-bot bot commented Aug 19, 2022

🦋 Changeset detected

Latest commit: 4d0a7aa

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
live-mobile Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added the mobile Has changes in LLM label Aug 19, 2022
@ofreyssinet-ledger
Copy link
Contributor

you're not a pawn, you're the chess player, I'm just a spectator making comments hahaha

@codecov
Copy link

codecov bot commented Aug 19, 2022

Codecov Report

Merging #1000 (4d0a7aa) into develop (909407c) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff            @@
##           develop    #1000   +/-   ##
========================================
  Coverage    47.49%   47.49%           
========================================
  Files          640      640           
  Lines        28678    28678           
  Branches      7387     7387           
========================================
  Hits         13622    13622           
  Misses       14998    14998           
  Partials        58       58           
Flag Coverage Δ
test 47.49% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

apps/ledger-live-mobile/.eslintrc.js Outdated Show resolved Hide resolved
apps/ledger-live-mobile/.eslintrc.js Show resolved Hide resolved
.changeset/eighty-hairs-nail.md Outdated Show resolved Hide resolved
apps/ledger-live-mobile/package.json Show resolved Hide resolved
@github-actions
Copy link

github-actions bot commented Aug 19, 2022

@juan-cortes

Screenshots: ❌

It seems this PR contains screenshots that are different from the base branch.
If you are sure all those changes are correct, you can comment on this PR with /generate-screenshots to update those screenshots.

Make sure all the changes are correct before running the command, as it will commit and push the new result to the PR.

windows

Actual Diff Expected
market-btc-buy-page-actual market-btc-buy-page-diff market-btc-buy-page-expected
market-btc-buy-page-actual market-btc-buy-page-diff market-btc-buy-page-expected

@juan-cortes juan-cortes changed the title support/LIVE-3405 Add eslint support for ts support/LIVE-3405 Unexpected ts migration for LLM Aug 21, 2022
@juan-cortes juan-cortes changed the title support/LIVE-3405 Unexpected ts migration for LLM Unexpected ts migration for LLM Aug 21, 2022
@juan-cortes
Copy link
Contributor Author

Come on CI, locally there are no errors, don't ruin my sunday.

Copy link
Contributor

@Justkant Justkant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work, thanks for pushing that forward, you're a beast !!
I think we can improve a little bit the eslint config

"live-mobile": minor
---

Migration from JavaScript to TypeScript for LLM
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still don't think we need to bump the version of mobile for a refactor

@@ -5,15 +5,22 @@ module.exports = {
"airbnb",
"prettier",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we update prettier to use the same proper config ? https://github.com/prettier/eslint-plugin-prettier#recommended-configuration

Suggested change
"prettier",
"plugin:prettier/recommended",

@@ -5,15 +5,22 @@ module.exports = {
"airbnb",
"prettier",
"plugin:json/recommended",
"plugin:@typescript-eslint/recommended",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can add the recommended rules for the import plugin: https://github.com/import-js/eslint-plugin-import#typescript

Suggested change
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended",
"plugin:import/recommended",
"plugin:import/typescript",

We can probably also add the typed rules for typescript: https://typescript-eslint.io/docs/linting/typed-linting/

},
},
plugins: ["prettier", "detox"],
plugins: ["prettier", "detox", "@typescript-eslint", "import"],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not be needed when using the recommended rules config for @typescript-eslint and import plugins (and even prettier if we use the correct config):

Suggested change
plugins: ["prettier", "detox", "@typescript-eslint", "import"],
plugins: ["detox"],

@elbywan elbywan merged commit aba7b62 into develop Aug 22, 2022
@elbywan elbywan deleted the support/LIVE-3405 branch August 22, 2022 09:04
@elbywan elbywan mentioned this pull request Aug 22, 2022
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mobile Has changes in LLM translations Translation files have been touched
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants