-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Chore: Start Typescript migration #3279
Conversation
This pull request introduces 1 alert when merging 802c7b2 into d1f35bb - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging acdc2ce into d1f35bb - view on LGTM.com new alerts:
|
This pull request introduces 1 alert and fixes 1 when merging a18b13c into d1f35bb - view on LGTM.com new alerts:
fixed alerts:
|
This pull request introduces 1 alert and fixes 1 when merging 19d8ab1 into d1f35bb - view on LGTM.com new alerts:
fixed alerts:
|
…ome @ts-ignore for not changing the implementation
This pull request introduces 1 alert and fixes 1 when merging f5eee1c into d1f35bb - view on LGTM.com new alerts:
fixed alerts:
|
This pull request introduces 1 alert and fixes 1 when merging d060edb into d1f35bb - view on LGTM.com new alerts:
fixed alerts:
|
This pull request introduces 1 alert and fixes 1 when merging 5ee7cda into 9c526b7 - view on LGTM.com new alerts:
fixed alerts:
|
This pull request introduces 1 alert and fixes 1 when merging 507bf76 into 9c526b7 - view on LGTM.com new alerts:
fixed alerts:
|
This pull request introduces 1 alert and fixes 1 when merging 5e5a886 into 9c526b7 - view on LGTM.com new alerts:
fixed alerts:
|
This pull request introduces 1 alert and fixes 1 when merging d824d86 into 9c526b7 - view on LGTM.com new alerts:
fixed alerts:
|
This pull request introduces 1 alert and fixes 1 when merging be4b3e8 into 9c526b7 - view on LGTM.com new alerts:
fixed alerts:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM :)
This pull request introduces 1 alert and fixes 1 when merging cb6eefa into 9c526b7 - view on LGTM.com new alerts:
fixed alerts:
|
f38633d
to
ada8583
Compare
This pull request introduces 1 alert and fixes 1 when merging ada8583 into 9c526b7 - view on LGTM.com new alerts:
fixed alerts:
|
This pull request introduces 1 alert and fixes 1 when merging 8d56490 into 9c526b7 - view on LGTM.com new alerts:
fixed alerts:
|
Proposed changes
The purpose of this PR is to start the project's migration to typescript.
With that, we need to pay attention to the following points:
tsconfig.json
file. In this process, I created this file with the default rules. At the moment, I'm allowing thetype: any
to be used, as this is the beginning of the migration, we still don't know all the types used, in the future it will be necessary to disable this option.airbnb
to@rocket.chat/eslint-config
, since our company has default lint rules, that's no reason to not use it.interfaces
as the default for typing in our repository, following the example below:All interface name needs start with an
I
, asIActionSheetData
,IAvatar
,IButton
... This is a common pattern, and helps all to know when see an interface on the codebase.app/constants
;app/containers
;app/presentation
;app/lib/Navigation.ts
andapp/lib/ShareNavigation.ts
. To use your resources elsewhere.Prettier
Taking advantage of all the changes made on
lint
, I also set upprettier
in the project, to help us with te code formatting.This tool has very interesting features, and I recommend that all developers involved in this project configure their IDE for automatic code checking and integration.
To more information, please see the link: Prettier.
Thinking about ensuring the quality of the code, I took the liberty of changing our pre-commit script, to not only run lint, but also check the formatting of the code using prettier. The new script now runs this command:
"prettier-lint": "yarn lint --fix && prettier --write ."
Important
Depends on RocketChat/Rocket.Chat.js.SDK#145
Depends on RocketChat/react-native-ui-lib#3
Issue(s)
Closes #786
How to test or reproduce
We can test the
prettier
following this steps:To check your code formatting, run this on your terminal:
To fix your code formatting issues, run this on your terminal:
Screenshots
N/A
Types of changes
Checklist
Further comments