Skip to content

[MOB-10141] make lint rules stricter #604

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

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
2ce56ae
Add ESLint configuration file and remove inline config from package.json
lposen Nov 7, 2024
1d73a8d
Enhance ESLint configuration for TypeScript support: add TypeScript p…
lposen Nov 7, 2024
b6797da
Enhance ESLint configuration: add jest plugin and update lint command…
lposen Nov 7, 2024
0bd3f0c
Fixed autofixabe lint issues
lposen Nov 7, 2024
46c5710
Fixed linting issues for IterableInboxMessageCell
lposen Nov 7, 2024
bc32769
eslint fixes
lposen Nov 7, 2024
6f87314
Add IterableEdgeInsetDetails type and update related classes for bett…
lposen Nov 7, 2024
61d143d
Refactor IterableConfig and IterableInAppMessage for improved type sa…
lposen Nov 7, 2024
888ee75
Enhance type safety by refining types in IterableCommerceItem, Iterab…
lposen Nov 7, 2024
a8ac6a1
Refactor fromDict methods in IterableAction and IterableActionContext…
lposen Nov 7, 2024
7b0104a
Refactor Iterable class methods to enhance type safety; replace 'any'…
lposen Nov 7, 2024
ad2cf2d
Allow `requires` for package.json and in tests
lposen Nov 7, 2024
9cbfc82
Refactor ESLint configuration for improved TypeScript support; update…
lposen Nov 8, 2024
4b20c6e
Merge branch '2.0.0-alpha/MOB-9995-reorganize-source-code' into 2.0.0…
lposen Nov 14, 2024
6ebc953
Merge branch '2.0.0-alpha/MOB-9995-reorganize-source-code' into 2.0.0…
lposen Nov 15, 2024
d76e662
Refactor ESLint configuration and improve type definitions. Excluded…
lposen Nov 16, 2024
5d96ec5
Refactor ESLint configuration and move Prettier settings to a separat…
lposen Nov 16, 2024
cc96da8
Update ESLint configuration and ignore settings; remove node_modules …
lposen Nov 16, 2024
d029374
Enhance ESLint configuration and improve component styles for better …
lposen Nov 16, 2024
c556a9f
Refactor IterableInboxMessageDisplay to use color constants for impro…
lposen Nov 16, 2024
835786f
Refactor IterableInboxMessageCell to use color constants for improved…
lposen Nov 16, 2024
52a6422
Refactor IterableInboxEmptyState to use color constants for improved …
lposen Nov 16, 2024
e2ebcf1
Refactor IterableInbox to use color constants and improve style consi…
lposen Nov 16, 2024
241c5f6
Refactor Commerce and Login components to use shadow constants for im…
lposen Nov 16, 2024
15add53
Update ESLint configuration to use the full plugin path for better cl…
lposen Nov 16, 2024
575cfbf
Merge branch '2.0.0-alpha/MOB-9995-reorganize-source-code' into 2.0.0…
lposen Nov 25, 2024
989dead
Merge branch '2.0.0-alpha/MOB-9995-reorganize-source-code' into 2.0.0…
lposen Nov 26, 2024
e5ade24
Merge branch '2.0.0-alpha/MOB-9995-reorganize-source-code' into 2.0.0…
lposen Nov 27, 2024
89ac82b
Merge branch '2.0.0-alpha/master' into 2.0.0-alpha/MOB-10141-make-lin…
evantk91 Dec 7, 2024
cbc3418
Merge branch '2.0.0-alpha/master' into 2.0.0-alpha/MOB-10141-make-lin…
lposen Dec 9, 2024
f2f5122
refactor: added constants instead of values as per PR review
lposen Dec 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions src/inbox/components/IterableInboxEmptyState.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { StyleSheet, Text, View } from 'react-native';

import { type IterableInboxCustomizations } from '../types';
import { ITERABLE_INBOX_COLORS } from '../constants';

// TODO: Comment
export interface IterableInboxEmptyStateProps {
Expand All @@ -27,37 +28,36 @@ export const IterableInboxEmptyState = ({
const emptyStateTitle = customizations.noMessagesTitle;
const emptyStateBody = customizations.noMessagesBody;

const { title, body } = styles;
let { container } = styles;

container = {
...container,
height: height - navTitleHeight - tabBarHeight - tabBarPadding,
};

if (!isPortrait) {
container = { ...container, height: height - navTitleHeight };
}

return (
<View style={container}>
<Text style={title}>
<View
style={[
styles.container,
{
height: isPortrait
? height - navTitleHeight - tabBarHeight - tabBarPadding
: height - navTitleHeight,
},
]}
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice refactor

>
<Text style={styles.title}>
{emptyStateTitle ? emptyStateTitle : defaultTitle}
</Text>
<Text style={body}>{emptyStateBody ? emptyStateBody : defaultBody}</Text>
<Text style={styles.body}>
{emptyStateBody ? emptyStateBody : defaultBody}
</Text>
</View>
);
};

const styles = StyleSheet.create({
body: {
color: 'grey',
color: ITERABLE_INBOX_COLORS.TEXT,
fontSize: 15,
},

container: {
alignItems: 'center',
backgroundColor: 'whitesmoke',
backgroundColor: ITERABLE_INBOX_COLORS.CONTAINER_BACKGROUND,
flexDirection: 'column',
height: 0,
justifyContent: 'center',
Expand Down
1 change: 1 addition & 0 deletions src/inbox/constants/colors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ export const ITERABLE_INBOX_COLORS = {
CONTAINER_BACKGROUND_LIGHT: 'white',
BUTTON_PRIMARY_TEXT: 'deepskyblue',
DESTRUCTIVE: 'red',
TEXT: 'grey',
TEXT_INVERSE: 'white',
TEXT_MUTED: 'lightgray',
BORDER: 'lightgray',
Expand Down