Skip to content

Commit

Permalink
Address linter issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Jay Barra committed Oct 10, 2024
1 parent 4ebbd83 commit c2c3252
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 27 deletions.
6 changes: 3 additions & 3 deletions src/@types/StacCollection.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export type CoreSchemaMetaSchema2 =
| ("array" | "boolean" | "integer" | "null" | "number" | "object" | "string")
| [
"array" | "boolean" | "integer" | "null" | "number" | "object" | "string",
...("array" | "boolean" | "integer" | "null" | "number" | "object" | "string")[]
...("array" | "boolean" | "integer" | "null" | "number" | "object" | "string")[],
];
format?: string;
contentMediaType?: string;
Expand Down Expand Up @@ -172,7 +172,7 @@ export type SetOfValues = [
},
...{
[k: string]: unknown;
}[]
}[],
];

/**
Expand Down Expand Up @@ -321,7 +321,7 @@ export type CoreSchemaMetaSchema1 = {
| ("array" | "boolean" | "integer" | "null" | "number" | "object" | "string")
| [
"array" | "boolean" | "integer" | "null" | "number" | "object" | "string",
...("array" | "boolean" | "integer" | "null" | "number" | "object" | "string")[]
...("array" | "boolean" | "integer" | "null" | "number" | "object" | "string")[],
];
format?: string;
contentMediaType?: string;
Expand Down
24 changes: 12 additions & 12 deletions src/@types/StacItem.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ export type GeoJSONLineString = {
coordinates: [
[number, number, ...number[]],
[number, number, ...number[]],
...[number, number, ...number[]][]
...[number, number, ...number[]][],
];
/**
* @minItems 4
Expand All @@ -179,7 +179,7 @@ export type GeoJSONPolygon = {
[number, number, ...number[]],
[number, number, ...number[]],
[number, number, ...number[]],
...[number, number, ...number[]][]
...[number, number, ...number[]][],
][];
/**
* @minItems 4
Expand All @@ -201,7 +201,7 @@ export type GeoJSONMultiLineString = {
coordinates: [
[number, number, ...number[]],
[number, number, ...number[]],
...[number, number, ...number[]][]
...[number, number, ...number[]][],
][];
/**
* @minItems 4
Expand All @@ -216,7 +216,7 @@ export type GeoJSONMultiPolygon = {
[number, number, ...number[]],
[number, number, ...number[]],
[number, number, ...number[]],
...[number, number, ...number[]][]
...[number, number, ...number[]][],
][][];
/**
* @minItems 4
Expand Down Expand Up @@ -260,7 +260,7 @@ export type GeoJSONLineString1 = {
coordinates: [
[number, number, ...number[]],
[number, number, ...number[]],
...[number, number, ...number[]][]
...[number, number, ...number[]][],
];
/**
* @minItems 4
Expand All @@ -275,7 +275,7 @@ export type GeoJSONPolygon1 = {
[number, number, ...number[]],
[number, number, ...number[]],
[number, number, ...number[]],
...[number, number, ...number[]][]
...[number, number, ...number[]][],
][];
/**
* @minItems 4
Expand All @@ -297,7 +297,7 @@ export type GeoJSONMultiLineString1 = {
coordinates: [
[number, number, ...number[]],
[number, number, ...number[]],
...[number, number, ...number[]][]
...[number, number, ...number[]][],
][];
/**
* @minItems 4
Expand All @@ -312,7 +312,7 @@ export type GeoJSONMultiPolygon1 = {
[number, number, ...number[]],
[number, number, ...number[]],
[number, number, ...number[]],
...[number, number, ...number[]][]
...[number, number, ...number[]][],
][][];
/**
* @minItems 4
Expand Down Expand Up @@ -340,7 +340,7 @@ export type GeoJSONLineString2 = {
coordinates: [
[number, number, ...number[]],
[number, number, ...number[]],
...[number, number, ...number[]][]
...[number, number, ...number[]][],
];
/**
* @minItems 4
Expand All @@ -355,7 +355,7 @@ export type GeoJSONPolygon2 = {
[number, number, ...number[]],
[number, number, ...number[]],
[number, number, ...number[]],
...[number, number, ...number[]][]
...[number, number, ...number[]][],
][];
/**
* @minItems 4
Expand All @@ -377,7 +377,7 @@ export type GeoJSONMultiLineString2 = {
coordinates: [
[number, number, ...number[]],
[number, number, ...number[]],
...[number, number, ...number[]][]
...[number, number, ...number[]][],
][];
/**
* @minItems 4
Expand All @@ -392,7 +392,7 @@ export type GeoJSONMultiPolygon2 = {
[number, number, ...number[]],
[number, number, ...number[]],
[number, number, ...number[]],
...[number, number, ...number[]][]
...[number, number, ...number[]][],
][][];
/**
* @minItems 4
Expand Down
12 changes: 3 additions & 9 deletions src/domains/__tests__/items.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ describe("granuleToStac", () => {
type: "Feature",
id: baseGranule.title,
stac_version: "1.0.0",
stac_extensions: [
"https://stac-extensions.github.io/cmr/v0.0.0/schema.json"
],
stac_extensions: ["https://stac-extensions.github.io/cmr/v0.0.0/schema.json"],
geometry: {
type: "Polygon",
coordinates: [
Expand Down Expand Up @@ -115,9 +113,7 @@ describe("granuleToStac", () => {
type: "Feature",
id: baseGranule.title,
stac_version: "1.0.0",
stac_extensions: [
"https://stac-extensions.github.io/cmr/v0.0.0/schema.json"
],
stac_extensions: ["https://stac-extensions.github.io/cmr/v0.0.0/schema.json"],
geometry: {
type: "Polygon",
coordinates: [
Expand Down Expand Up @@ -207,9 +203,7 @@ describe("granuleToStac", () => {
type: "Feature",
id: baseGranule.title,
stac_version: "1.0.0",
stac_extensions: [
"https://stac-extensions.github.io/cmr/v0.0.0/schema.json"
],
stac_extensions: ["https://stac-extensions.github.io/cmr/v0.0.0/schema.json"],
geometry: {
type: "LineString",
coordinates: [
Expand Down
4 changes: 2 additions & 2 deletions src/domains/items.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const cmrGranuleExtension = (granule: Granule) => {
properties: {
"cmr:provider": granule.collection?.conceptId.split("-")[1],
"cmr:collection_id": granule.collection?.conceptId,
"cmr:concept_id": granule.conceptId
"cmr:concept_id": granule.conceptId,
},
};
};
Expand Down Expand Up @@ -180,7 +180,7 @@ export const granuleToStac = (granule: Granule): STACItem => {

const { extensions, properties: extensionProperties } = deriveExtensions(granule, [
cloudCoverExtension,
cmrGranuleExtension
cmrGranuleExtension,
]);

const properties: { [key: string]: string } = mergeMaybe(
Expand Down
2 changes: 1 addition & 1 deletion src/models/GraphQLModels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ export type GraphQLHandlerResponse =
count: number;
cursor: string | null;
items: object[];
}
},
];

export type GraphQLHandler = (response: unknown) => GraphQLHandlerResponse;
Expand Down

0 comments on commit c2c3252

Please sign in to comment.