Skip to content

Commit 878782b

Browse files
committed
[workflow/test] Added lint workflow
1 parent 8bd0331 commit 878782b

5 files changed

Lines changed: 30 additions & 6 deletions

File tree

.github/workflows/lint.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Lint
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
types: [opened, synchronize, reopened]
8+
9+
jobs:
10+
eslint:
11+
name: "Es lint check"
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v3
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Run ESLint
20+
run: yarn run lint
21+
continue-on-error: false

src/packages/react-native-material-elements/src/components/SegmentedControl/SegmentedControlItem.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export const SegmentedControlItem = ({
6868
);
6969
}
7070
return null;
71-
}, [data, headingStyles]);
71+
}, [data, headingStyles, segmentItemContainerStyles]);
7272

7373
return (
7474
<BaseButton

src/packages/react-native-material-elements/src/components/Skeleton/Skeleton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export const Skeleton: React.FC<SkeletonProps> = ({ backgroundColor, animationDu
3636
}),
3737
]),
3838
).start();
39-
}, []);
39+
}, [animationDuration, shimmerAnim]);
4040

4141
const opacity = shimmerAnim.interpolate({
4242
inputRange: [0, 1],

src/packages/react-native-material-elements/src/components/TextField/TextField.style.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { ColorValue, StyleProp, TextStyle, ViewStyle } from 'react-native';
22
import { Theme } from '../../libraries/themes/theme';
33
import { getVariant, screenWidth } from '../../utils';
44
import {
5-
INPUT_DEFAULT_BORDER_RADIUS,
65
INPUT_DEFAULT_BORDER_WIDTH,
76
INPUT_DEFAULT_HEIGHT,
87
INPUT_LARGE_HEIGHT,

src/packages/react-native-material-elements/src/components/TextField/TextField.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,13 @@ export const TextField = React.forwardRef<View, TextFieldProps>(
101101
const shouldApplySquareShape = square ?? textFieldThemeConfig?.square ?? false;
102102

103103
const getTextFiledHeight = () => {
104-
if (height) return height;
105-
else if (isOutlined && textFieldOutlinedHeight) return textFieldOutlinedHeight;
106-
else if (!isOutlined && textFieldFieldHeight) return textFieldFieldHeight;
104+
if (height) {
105+
return height;
106+
} else if (isOutlined && textFieldOutlinedHeight) {
107+
return textFieldOutlinedHeight;
108+
} else if (!isOutlined && textFieldFieldHeight) {
109+
return textFieldFieldHeight;
110+
}
107111
return textFieldThemeConfig?.height;
108112
};
109113

0 commit comments

Comments
 (0)