chore: code formatting

This commit is contained in:
github-actions[bot]
2022-07-21 04:37:55 +00:00
parent 48f4ef79ed
commit aa83b84522
5 changed files with 36 additions and 34 deletions

View File

@@ -1,8 +1,8 @@
//Imports //Imports
import { Client as Gmap } from "@googlemaps/google-maps-services-js"
import color from "color"
import * as d3 from "d3" import * as d3 from "d3"
import D3Node from "d3-node" import D3Node from "d3-node"
import color from "color"
import {Client as Gmap} from "@googlemaps/google-maps-services-js"
/** /**
* Worldmap * Worldmap
@@ -33,7 +33,9 @@ export default async function (login, {locations, sample, imports, token}) {
stars.set(code, (stars.get(code) ?? 0) + 1) stars.set(code, (stars.get(code) ?? 0) + 1)
} }
} }
else throw {error:{message:"Google Maps API token is not set"}} else {
throw {error: {message: "Google Maps API token is not set"}}
}
//Generate SVG //Generate SVG
const d3n = new D3Node() const d3n = new D3Node()

View File

@@ -17,7 +17,7 @@ export default function({faker, query, login = faker.internet.userName()}) {
cursor: "MOCKED_CURSOR", cursor: "MOCKED_CURSOR",
node: { node: {
location: faker.address.city(), location: faker.address.city(),
} },
})), })),
}, },
}, },

View File

@@ -1,11 +1,11 @@
//Imports //Imports
import { faker } from "@faker-js/faker" import { faker } from "@faker-js/faker"
import { Client as Gmap } from "@googlemaps/google-maps-services-js"
import axios from "axios" import axios from "axios"
import fs from "fs/promises" import fs from "fs/promises"
import paths from "path" import paths from "path"
import rss from "rss-parser" import rss from "rss-parser"
import urls from "url" import urls from "url"
import {Client as Gmap} from "@googlemaps/google-maps-services-js"
//Mocked state //Mocked state
let mocked = false let mocked = false
@@ -167,32 +167,32 @@ export default async function({graphql, rest}) {
{ {
long_name: city, long_name: city,
short_name: city, short_name: city,
types: [ "political" ] types: ["political"],
}, },
{ {
long_name: country, long_name: country,
short_name: faker.address.countryCode(), short_name: faker.address.countryCode(),
types: [ "country", "political" ] types: ["country", "political"],
} },
], ],
formatted_address: `${city}, ${country}`, formatted_address: `${city}, ${country}`,
geometry: { geometry: {
bounds: { bounds: {
northeast: {lat, lng}, northeast: {lat, lng},
southwest: { lat, lng } southwest: {lat, lng},
}, },
location: {lat, lng}, location: {lat, lng},
location_type: "APPROXIMATE", location_type: "APPROXIMATE",
viewport: { viewport: {
northeast: {lat, lng}, northeast: {lat, lng},
southwest: { lat, lng } southwest: {lat, lng},
} },
},
place_id: "ChIJu9FC7RXupzsR26dsAapFLgg",
types: ["locality", "political"],
},
],
}, },
place_id: 'ChIJu9FC7RXupzsR26dsAapFLgg',
types: [ "locality", "political" ]
}
]
}
} }
} }
} }