Skip to content

Commit 8ad6292

Browse files
WesleyACgnprice
authored andcommitted
eslint: Remove flowtype/generic-spacing lint.
This conflicts with our prettier config, and doesn't seem to be very useful - we frequently needed to disable it. It was added in a1edcaa without any explanation, but it seems to largely have been a copy of the recommended config at the time. See https://chat.zulip.org/#narrow/stream/243-mobile-team/topic/fmt.2Ftest.20prettier.20mismatch/near/1326785
1 parent bed157a commit 8ad6292

11 files changed

+0
-17
lines changed

.eslintrc.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,6 @@ rules:
316316
flowtype/boolean-style: [error, boolean]
317317
flowtype/define-flow-type: warn
318318
flowtype/delimiter-dangle: off
319-
flowtype/generic-spacing: [error, never]
320319
flowtype/no-dupe-keys: error
321320
flowtype/no-primitive-constructor-types: error
322321
flowtype/no-types-missing-file-annotation: error

src/__flow-tests__/nav-test.js

-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ import { createStackNavigator, type StackNavigationProp } from '@react-navigatio
99

1010
import { type RouteProp, type RouteParamsOf } from '../react-navigation';
1111

12-
/* eslint-disable flowtype/generic-spacing */
13-
1412
// Test that `RouteProp` gives route.params the right type.
1513
function testRouteParamTypes() {
1614
type ProfileProps = {|

src/api/realmDataTypes.js

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import type { InitialDataRealm } from './initialDataTypes';
1111
* in the /register response (InitialDataRealm has lots of properties that
1212
* start with "realm_"). But we expect the values to be typed the same.
1313
*/
14-
/* eslint-disable flowtype/generic-spacing */
1514
/* prettier-ignore */
1615
export type RealmDataForUpdate = $ReadOnly<{
1716
//

src/common/ZulipButton.js

-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ const styles = createStyleSheet({
6565
});
6666

6767
type Props = $ReadOnly<{|
68-
/* eslint-disable flowtype/generic-spacing */
6968
style?: SubsetProperties<
7069
ViewStyle,
7170
{|

src/generics.js

-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
* Tools for manipulating generic types in the Flow type system.
44
*/
55

6-
/* eslint-disable flowtype/generic-spacing */
7-
86
/**
97
* The type `S`, plus a check that `S` is a supertype of `T`.
108
*

src/react-native-action-sheet.js

-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ import { connectActionSheet as connectActionSheetInner } from '@expo/react-nativ
55

66
import type { BoundedDiff } from './generics';
77

8-
/* eslint-disable flowtype/generic-spacing */
9-
108
export type ShowActionSheetWithOptions = (
119
{ options: string[], cancelButtonIndex: number, ... },
1210
(number) => void,

src/react-native-safe-area-context.js

-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ import {
77

88
import type { BoundedDiff } from './generics';
99

10-
/* eslint-disable flowtype/generic-spacing */
11-
1210
/**
1311
* Exactly like `withSafeAreaInsets` upstream, but properly typed.
1412
*

src/react-navigation.js

-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ import {
1414

1515
import type { GlobalParamList } from './nav/globalTypes';
1616

17-
/* eslint-disable flowtype/generic-spacing */
18-
1917
/**
2018
* A type to use for the `route` prop on a screen component.
2119
*

src/react-redux.js

-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ import type { BoundedDiff } from './generics';
2727
// eslint-disable-next-line no-restricted-imports
2828
export { Provider } from 'react-redux';
2929

30-
/* eslint-disable flowtype/generic-spacing */
31-
3230
// We leave this as invariant in `C` (i.e., we don't write `-C` or `+C`)
3331
// because Flow says `ElementConfig` is invariant. (If you try writing
3432
// `OwnProps<-C, …` or `OwnProps<+C, …`, Flow gives an error saying the `C`

src/start/IosCompliantAppleAuthButton/index.js

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import { getGlobalSettings } from '../../selectors';
1313
type Props = $ReadOnly<{|
1414
// See `ZulipButton`'s `style` prop, where a comment discusses this
1515
// idea.
16-
/* eslint-disable flowtype/generic-spacing */
1716
style?: SubsetProperties<
1817
ViewStyle,
1918
{|

src/types.js

-1
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,6 @@ type OutboxBase = $ReadOnly<{|
205205
// It's used for sending the message to the server.
206206
markdownContent: string,
207207

208-
/* eslint-disable flowtype/generic-spacing */
209208
...SubsetProperties<
210209
// Could use `MessageBase` here. Then Flow would check that the listed
211210
// properties are in `MessageBase`, rather than just in both branches of

0 commit comments

Comments
 (0)