From ff4eaf5d61b8cb95c2d40bbe2a4977eda724b0b1 Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Thu, 4 May 2017 15:48:57 -0700 Subject: [PATCH] Fix lint errors introduced in tslint@5.2 (#16330) --- .../react-native-snap-carousel-tests.tsx | 4 +-- .../react-native-swiper-tests.tsx | 10 +++---- types/react-native/test/index.tsx | 26 +++++++++---------- types/react-virtualized/dist/es/Grid.d.ts | 10 ++----- 4 files changed, 22 insertions(+), 28 deletions(-) diff --git a/types/react-native-snap-carousel/react-native-snap-carousel-tests.tsx b/types/react-native-snap-carousel/react-native-snap-carousel-tests.tsx index 88fb764b03..17e92aa6ae 100644 --- a/types/react-native-snap-carousel/react-native-snap-carousel-tests.tsx +++ b/types/react-native-snap-carousel/react-native-snap-carousel-tests.tsx @@ -42,8 +42,8 @@ class SnapCarouselTest extends React.Component<{}, {}> { const styles = StyleSheet.create({ container: { flex: 1 - } as ViewStyle, + }, item: { width: 75 - } as ViewStyle + } }); diff --git a/types/react-native-swiper/react-native-swiper-tests.tsx b/types/react-native-swiper/react-native-swiper-tests.tsx index 7463ac0b70..5bd12c3868 100644 --- a/types/react-native-swiper/react-native-swiper-tests.tsx +++ b/types/react-native-swiper/react-native-swiper-tests.tsx @@ -35,28 +35,28 @@ class SwiperTest extends React.Component<{}, {}> { const styles = StyleSheet.create({ wrapper: { - } as ViewStyle, + }, slide1: { flex: 1, justifyContent: 'center', alignItems: 'center', backgroundColor: '#9DD6EB' - } as ViewStyle, + }, slide2: { flex: 1, justifyContent: 'center', alignItems: 'center', backgroundColor: '#97CAE5' - } as ViewStyle, + }, slide3: { flex: 1, justifyContent: 'center', alignItems: 'center', backgroundColor: '#92BBD9' - } as ViewStyle, + }, text: { color: '#fff', fontSize: 30, fontWeight: 'bold' - } as ViewStyle + } }); diff --git a/types/react-native/test/index.tsx b/types/react-native/test/index.tsx index 6c22c0597a..62e925575b 100644 --- a/types/react-native/test/index.tsx +++ b/types/react-native/test/index.tsx @@ -78,24 +78,24 @@ const styles = StyleSheet.create( //alternative declaration of styles (inline typings) const stylesAlt = StyleSheet.create( { - container: { - flex: 1, - justifyContent: 'center', - alignItems: 'center', + container: { + flex: 1, + justifyContent: 'center', + alignItems: 'center', backgroundColor: '#F5FCFF', - } as ViewStyle, - welcome: { - fontSize: 20, + }, + welcome: { + fontSize: 20, textAlign: 'center', - margin: 10, - } as TextStyle, + margin: 10, + }, instructions: { - textAlign: 'center', - color: '#333333', + textAlign: 'center', + color: '#333333', marginBottom: 5, - } as TextStyle + } } -) +); class CustomView extends React.Component<{}, {}> { diff --git a/types/react-virtualized/dist/es/Grid.d.ts b/types/react-virtualized/dist/es/Grid.d.ts index b0d65a7cb5..c0856f1de7 100644 --- a/types/react-virtualized/dist/es/Grid.d.ts +++ b/types/react-virtualized/dist/es/Grid.d.ts @@ -63,17 +63,11 @@ export type OverscanIndices = { export type CellSizeAndPositionManager = { areOffsetsAdjusted(): boolean; - configure({ - cellCount, - estimatedCellSize - }: ConfigureParams): void; + configure({ cellCount, estimatedCellSize }: ConfigureParams): void; getCellCount(): number; getEstimatedCellSize(): number; getLastMeasuredIndex(): number; - getOffsetAdjustment({ - containerSize, - offset // safe - }: ContainerSizeAndOffset): number; + getOffsetAdjustment({ containerSize, offset/*safe*/ }: ContainerSizeAndOffset): number; /** * This method returns the size and position for the cell at the specified index. * It just-in-time calculates (or used cached values) for cells leading up to the index.