Skip to content

Commit 3e99ede

Browse files
committed
lint
1 parent beb2452 commit 3e99ede

File tree

5 files changed

+7
-15
lines changed

5 files changed

+7
-15
lines changed

src/diff.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -606,10 +606,10 @@ describe('diff', () => {
606606
expect(diffStyles({
607607
} as StyleSpecification,
608608
{
609-
projection: {mode: ["globe", "mercator", 0.5]}
609+
projection: {mode: ['globe', 'mercator', 0.5]}
610610

611611
} as StyleSpecification)).toEqual([
612-
{command: 'setProjection', args: {mode: ["globe", "mercator", 0.5]}},
612+
{command: 'setProjection', args: {mode: ['globe', 'mercator', 0.5]}},
613613
]);
614614
});
615615
});

src/expression/values.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,7 @@ import ResolvedImage from './types/resolved_image';
88
import {NullType, NumberType, StringType, BooleanType, ColorType, ObjectType, ValueType, CollatorType, FormattedType, ResolvedImageType, array, PaddingType, VariableAnchorOffsetCollectionType, ProjectionType} from './types';
99

1010
import type {Type} from './types';
11-
import { ProjectionTransition, isProjectionTransition } from '../types.g';
12-
13-
14-
15-
11+
import {ProjectionTransition, isProjectionTransition} from '../types.g';
1612

1713
export function validateRGBA(r: unknown, g: unknown, b: unknown, a?: unknown): string | null {
1814
if (!(
@@ -37,8 +33,6 @@ export type Value = null | string | boolean | number | Color | ProjectionTransit
3733
readonly [x: string]: Value;
3834
};
3935

40-
41-
4236
export function isValue(mixed: unknown): boolean {
4337
if (mixed === null ||
4438
typeof mixed === 'string' ||

src/reference/v8.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@
147147
}
148148
},
149149
"transition-intermediate": {
150-
"projection": ["globe","mercator", 0.7]
150+
"projection": {"mode": ["globe", "mercator", 0.7]}
151151
},
152152
"instant-transition": {
153153
"projection": {

src/util/interpolate.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import interpolate, {isSupportedInterpolationColorSpace} from './interpolate';
33
import Color from './color';
44
import Padding from './padding';
55
import VariableAnchorOffsetCollection from './variable_anchor_offset_collection';
6-
import { isProjectionTransition } from '../types.g';
6+
import {isProjectionTransition} from '../types.g';
77

88
describe('interpolate', () => {
99

@@ -121,7 +121,7 @@ describe('interpolate', () => {
121121
test('interpolate projection', () => {
122122
const i11nFn = (t: number) => interpolate.projection('globe', 'mercator', t);
123123
expect( isProjectionTransition( i11nFn(0.5) )).toBeTruthy();
124-
expect(i11nFn(0.5)).toEqual(["globe", "mercator",0.5]);
124+
expect(i11nFn(0.5)).toEqual(['globe', 'mercator',0.5]);
125125
});
126126

127127
describe('interpolate variableAnchorOffsetCollection', () => {

src/validate/validate_projection-mode.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import ValidationError from '../error/validation_error';
22
import getType from '../util/get_type';
33
import v8 from '../reference/v8.json' with {type: 'json'};
4-
import {isPrimitiveProjection, isProjectionTransition, isProjectionType, PrimitiveProjection, ProjectionSpecification, ProjectionTransition, ProjectionType, StyleSpecification} from '../types.g';
4+
import {isPrimitiveProjection, isProjectionTransition, isProjectionType, ProjectionType, StyleSpecification} from '../types.g';
55

66
interface ValidateProjectionOptions {
77
sourceName?: string;
@@ -11,8 +11,6 @@ interface ValidateProjectionOptions {
1111
validateSpec: Function;
1212
}
1313

14-
15-
1614
export default function validateProjectionMode(options: ValidateProjectionOptions) {
1715
const projectionType: ProjectionType = options.value;
1816

0 commit comments

Comments
 (0)