Skip to content

Commit f09686d

Browse files
committed
fix lint warnings
1 parent a3d74ea commit f09686d

File tree

2 files changed

+23
-30
lines changed

2 files changed

+23
-30
lines changed

demo/src/screens/MainScreen.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export default class MainScreen extends Component {
5050
id: 'uilib.settingsButton',
5151
testID: 'uilib.settingsButton',
5252
enabled: true,
53-
icon: settingsIcon,
53+
icon: settingsIcon
5454
});
5555
Navigation.mergeOptions(props.componentId, navigationStyle);
5656
}
@@ -238,7 +238,7 @@ export default class MainScreen extends Component {
238238

239239
return (
240240
<View centerV row paddingL-20 marginB-10>
241-
<Image source={chevronIcon} style={{tintColor: Colors.dark10}} supportRTL />
241+
<Image source={chevronIcon} style={{tintColor: Colors.dark10}} supportRTL/>
242242
<Text
243243
style={[item.deprecate && styles.entryTextDeprecated]}
244244
dark10

src/components/colorPicker/ColorPalette.js

Lines changed: 21 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -127,25 +127,21 @@ export default class ColorPalette extends PureBaseComponent {
127127
return this.getUniqueColors(this.props.colors);
128128
}
129129

130-
getUniqueColors = memoize(
131-
(colors) => {
132-
const c = _.map(colors, color => {
133-
if (Colors.isTransparent(color)) {
134-
return color;
135-
}
136-
return _.toUpper(color);
137-
});
138-
return _.uniq(c);
139-
}
140-
);
130+
getUniqueColors = memoize((colors) => {
131+
const c = _.map(colors, color => {
132+
if (Colors.isTransparent(color)) {
133+
return color;
134+
}
135+
return _.toUpper(color);
136+
});
137+
return _.uniq(c);
138+
});
141139

142140
getNumberOfRows() {
143141
const {numberOfRows} = this.props;
144142

145143
if (!_.inRange(numberOfRows, 2, 6)) {
146-
console.warn(
147-
`${numberOfRows} is not within valid range of color rows (2 to 5); defaulting to ${DEFAULT_NUMBER_OF_ROWS}.`
148-
);
144+
console.warn(`${numberOfRows} is not within valid range of color rows (2 to 5); defaulting to ${DEFAULT_NUMBER_OF_ROWS}.`);
149145
return DEFAULT_NUMBER_OF_ROWS;
150146
}
151147
return numberOfRows;
@@ -203,21 +199,18 @@ export default class ColorPalette extends PureBaseComponent {
203199
if (childRef) {
204200
const handle = findNodeHandle(childRef);
205201
if (handle) {
206-
UIManager.measureLayoutRelativeToParent(
207-
handle,
208-
e => {
209-
console.warn(e);
210-
},
211-
(x, y, w, h) => {
212-
if (x + w > Constants.screenWidth) {
213-
this.scrollView.current.scrollTo({
214-
x: x + w + HORIZONTAL_PADDING - Constants.screenWidth,
215-
y: 0,
216-
animated: false
217-
});
218-
}
202+
UIManager.measureLayoutRelativeToParent(handle, e => {
203+
console.warn(e);
204+
},
205+
(x, y, w, h) => {
206+
if (x + w > Constants.screenWidth) {
207+
this.scrollView.current.scrollTo({
208+
x: x + w + HORIZONTAL_PADDING - Constants.screenWidth,
209+
y: 0,
210+
animated: false
211+
});
219212
}
220-
);
213+
});
221214
}
222215
}
223216
} else if (this.usePagination) {

0 commit comments

Comments
 (0)