Skip to content

Commit 9b1bb85

Browse files
committed
Suppressing (or fixing) ESLint warnings for explicit any usages for UnsafeMixed types and others
1 parent 413c6c8 commit 9b1bb85

23 files changed

+37
-33
lines changed

example/src/examples/SymbolCircleLayer/CustomIcon.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import MapboxGL, {
88
Images,
99
} from '@rnmapbox/maps';
1010
import { featureCollection, feature, point } from '@turf/helpers';
11+
import { OnPressEvent } from '@rnmapbox/maps/lib/typescript/src/types/OnPressEvent';
1112

1213
import Bubble from '../common/Bubble';
1314
import type { ExampleWithMetadata } from '../common/ExampleMetadata';
@@ -36,7 +37,7 @@ const CustomIcon = memo(() => {
3637
);
3738
};
3839

39-
const onSourceLayerPress = (e: any) => {
40+
const onSourceLayerPress = (e: OnPressEvent) => {
4041
console.log(
4142
'You pressed a layer here are your features:',
4243
e.features,

example/src/examples/SymbolCircleLayer/CustomIconNativeAsset.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import MapboxGL, {
88
Images,
99
} from '@rnmapbox/maps';
1010
import { featureCollection, feature, point } from '@turf/helpers';
11+
import { OnPressEvent } from '@rnmapbox/maps/lib/typescript/src/types/OnPressEvent';
1112

1213
import Bubble from '../common/Bubble';
1314
import type { ExampleWithMetadata } from '../common/ExampleMetadata';
@@ -35,7 +36,7 @@ const CustomIconNativeAsset = memo(() => {
3536
);
3637
};
3738

38-
const onSourceLayerPress = (e: any) => {
39+
const onSourceLayerPress = (e: OnPressEvent) => {
3940
console.log(
4041
'You pressed a layer here are your features:',
4142
e.features,

src/specs/RNMBXAtmosphereNativeComponent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { codegenNativeComponent } from 'react-native';
44
import type { UnsafeMixed } from './codegenUtils';
55

66
export interface NativeProps extends ViewProps {
7-
reactStyle: UnsafeMixed<any>;
7+
reactStyle: UnsafeMixed;
88
}
99

1010
export default codegenNativeComponent<NativeProps>(

src/specs/RNMBXBackgroundLayerNativeComponent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export interface NativeProps extends ViewProps {
1616
aboveLayerID?: OptionalProp<string>;
1717
belowLayerID?: OptionalProp<string>;
1818
layerIndex?: OptionalProp<Int32>;
19-
reactStyle: UnsafeMixed<any>;
19+
reactStyle: UnsafeMixed;
2020

2121
maxZoomLevel?: OptionalProp<Double>;
2222
minZoomLevel?: OptionalProp<Double>;

src/specs/RNMBXCameraNativeComponent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export interface NativeProps extends ViewProps {
3131
followZoomLevel?: OptionalProp<Double>;
3232
followPitch?: OptionalProp<Double>;
3333
followHeading?: OptionalProp<Double>;
34-
followPadding?: UnsafeMixed<any>;
34+
followPadding?: UnsafeMixed;
3535

3636
zoomLevel?: OptionalProp<Double>;
3737
maxZoomLevel?: OptionalProp<Double>;

src/specs/RNMBXCircleLayerNativeComponent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ type CommonProps = {
2929

3030
export interface NativeProps extends ViewProps, CommonProps {
3131
id?: OptionalProp<string>;
32-
reactStyle: UnsafeMixed<any>;
32+
reactStyle: UnsafeMixed;
3333
}
3434

3535
export default codegenNativeComponent<NativeProps>(

src/specs/RNMBXFillExtrusionLayerNativeComponent.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ export interface NativeProps extends ViewProps {
1111
id?: UnsafeMixed<string>;
1212
sourceID?: OptionalProp<string>;
1313
existing?: OptionalProp<boolean>;
14-
filter: UnsafeMixed<any[]>;
14+
filter: UnsafeMixed<Array<any>>; // eslint-disable-line @typescript-eslint/no-explicit-any
1515

1616
aboveLayerID?: OptionalProp<string>;
1717
belowLayerID?: OptionalProp<string>;
1818
layerIndex?: OptionalProp<Int32>;
19-
reactStyle: UnsafeMixed<any>;
19+
reactStyle: UnsafeMixed;
2020

2121
maxZoomLevel?: OptionalProp<Double>;
2222
minZoomLevel?: OptionalProp<Double>;

src/specs/RNMBXFillLayerNativeComponent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ type CommonProps = {
2929

3030
export interface NativeProps extends ViewProps, CommonProps {
3131
id?: OptionalProp<string>;
32-
reactStyle: UnsafeMixed<any>;
32+
reactStyle: UnsafeMixed;
3333
}
3434

3535
export default codegenNativeComponent<NativeProps>(

src/specs/RNMBXHeatmapLayerNativeComponent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ type CommonProps = {
2929

3030
export interface NativeProps extends ViewProps, CommonProps {
3131
id?: OptionalProp<string>;
32-
reactStyle: UnsafeMixed<any>;
32+
reactStyle: UnsafeMixed;
3333
}
3434

3535
export default codegenNativeComponent<NativeProps>(

src/specs/RNMBXImageNativeComponent.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ import type { Double } from 'react-native/Libraries/Types/CodegenTypes';
55
import type { UnsafeMixed } from './codegenUtils';
66

77
export interface NativeProps extends ViewProps {
8+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
89
stretchX: UnsafeMixed<Array<any>>; // Array<Number> inside UnsafeMixed
10+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
911
stretchY: UnsafeMixed<Array<any>>; // Array<Number> inside UnsafeMixed
1012
content: UnsafeMixed<Array<Double>>;
1113
sdf: UnsafeMixed<boolean>;

0 commit comments

Comments
 (0)