-
Notifications
You must be signed in to change notification settings - Fork 42
[MOB-9671] fix-linting-issues #579
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
[MOB-9671] fix-linting-issues #579
Conversation
This commit refactors the `IterableAction` and `IterableActionContext` classes. It moves them from the `src` folder to the `ts` folder. Additionally, it removes the unused `use strict` directive and renames the `index` file. The changes aim to improve the code organization and maintainability.
Refactor IterableInbox.tsx and remove unused imports Add comment to IterableInboxMessageCell.tsx Add comment to IterableInboxMessageDisplay.tsx Add comments and descriptions to IterableLogger.ts Add a description to IterableUtil.ts Add comment to useAppStateListener.ts Add comment to useDeviceOrientation.tsx
Refactor IterableInbox.tsx and improve code readability
| } | ||
| ) | ||
| useEffect(() => { | ||
| const listener = AppState.addEventListener( |
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.
This is a change needed due to the react native upgrade
…71-fix-linting-issues
…nfig. These will be removed as changes are made.
…IterablePushPlatform enum export
evantk91
left a comment
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.
Some clarifications. Mostly pointed out that we have an export statement at the end of alot of files that seem redundant but this needs to be verified.
| "react-native-builder-bob": "^0.30.2", | ||
| "react-native-safe-area-context": "^4.11.1", | ||
| "react-native-vector-icons": "^10.2.0", | ||
| "react-native-webview": "^13.12.3", |
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.
Interesting so did the linting add these libraries?
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.
The linting showed that they were unresolved, so I added them.
| 'use strict' | ||
| /** | ||
| * TODO: Split into seperate files | ||
| */ |
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.
Good idea.
| NativeModules, | ||
| NativeEventEmitter, | ||
| Linking, | ||
| Platform, |
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.
This ending comma seems weird. Is this the convention?
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.
You can specify it in the prettier, but most Frontend libs have the ending comma. The reason is that it makes sorting easier.
| inApp = 2, | ||
| } | ||
|
|
||
| enum AuthResponseCallback { |
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.
Should this be exported?
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.
Also needs a description. Should add a to-do.
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.
Good call. Will do!
| class IterableActionContext { | ||
| action: IterableAction | ||
| source: IterableActionSource | ||
| export class IterableActionContext { |
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.
I feel like all of these should have descriptions. Can be a separate PR.
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.
Yeah def! I have a ticket for it. Reorganizing things and removing dupes first.
src/IterableUtil.ts
Outdated
| } | ||
| } | ||
|
|
||
| export default IterableUtil; |
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.
Redundant.
src/IterablePushPlatform.ts
Outdated
| @@ -1,10 +1,7 @@ | |||
|
|
|||
| enum IterablePushPlatform { | |||
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.
Maybe have export here to align with other files?
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.
Good catch!
src/IterableLogger.ts
Outdated
| } | ||
|
|
||
| export { IterableLogger } | ||
| export default IterableLogger; |
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.
Redundant.
src/IterableInboxMessageList.tsx
Outdated
| }; | ||
|
|
||
| export default IterableInboxMessageList | ||
| export default IterableInboxMessageList; |
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.
Redundant.
src/IterableInboxMessageDisplay.tsx
Outdated
| ); | ||
| }; | ||
|
|
||
| export default IterableInboxMessageDisplay; |
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.
same.
🔹 JIRA Ticket(s) if any
✏️ Description