Skip to content

Commit

Permalink
Run Prettier on codebase
Browse files Browse the repository at this point in the history
  • Loading branch information
simon04 committed Dec 15, 2024
1 parent dee11f3 commit fbcdad6
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 15 deletions.
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"arrowParens": "avoid",
"printWidth": 100,
"singleQuote": true,
"trailingComma": "none"
}
2 changes: 0 additions & 2 deletions .prettierrc.yaml

This file was deleted.

6 changes: 1 addition & 5 deletions src/control.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,7 @@ export class GeocoderControl extends EventedControl {
const className = 'leaflet-control-geocoder';
const container = L.DomUtil.create('div', className + ' leaflet-bar') as HTMLDivElement;
const icon = L.DomUtil.create('button', className + '-icon', container) as HTMLButtonElement;
const form = L.DomUtil.create(
'div',
className + '-form',
container
) as HTMLDivElement;
const form = L.DomUtil.create('div', className + '-form', container) as HTMLDivElement;

this._map = map;
this._container = container;
Expand Down
4 changes: 2 additions & 2 deletions src/geocoders/mapquest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export class MapQuest implements IGeocoder {
getJSON(
this.options.serviceUrl + '/address',
params,
L.Util.bind(function(data) {
L.Util.bind(function (data) {
const results: GeocodingResult[] = [];
if (data.results && data.results[0].locations) {
for (let i = data.results[0].locations.length - 1; i >= 0; i--) {
Expand Down Expand Up @@ -68,7 +68,7 @@ export class MapQuest implements IGeocoder {
getJSON(
this.options.serviceUrl + '/reverse',
params,
L.Util.bind(function(data) {
L.Util.bind(function (data) {
const results: GeocodingResult[] = [];
if (data.results && data.results[0].locations) {
for (let i = data.results[0].locations.length - 1; i >= 0; i--) {
Expand Down
2 changes: 1 addition & 1 deletion src/geocoders/nominatim.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export interface NominatimOptions extends GeocoderOptions {
export class Nominatim implements IGeocoder {
options: NominatimOptions = {
serviceUrl: 'https://nominatim.openstreetmap.org/',
htmlTemplate: function(r: NominatimResult) {
htmlTemplate: function (r: NominatimResult) {
const address = r.address;
let className: string;
const parts = [];
Expand Down
4 changes: 2 additions & 2 deletions src/geocoders/pelias.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ export class Pelias implements IGeocoder {
_parseResults(data, bboxname) {
const results: GeocodingResult[] = [];
L.geoJSON(data, {
pointToLayer: function(feature, latlng) {
pointToLayer: function (feature, latlng) {
return L.circleMarker(latlng);
},
onEachFeature: function(feature, layer: any) {
onEachFeature: function (feature, layer: any) {
const result = {} as GeocodingResult;
let bbox;
let center;
Expand Down
4 changes: 2 additions & 2 deletions src/geocoders/photon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export class Photon implements IGeocoder {
getJSON(
this.options.serviceUrl,
params,
L.Util.bind(function(data) {
L.Util.bind(function (data) {
cb.call(context, this._decodeFeatures(data));
}, this)
);
Expand All @@ -52,7 +52,7 @@ export class Photon implements IGeocoder {
getJSON(
this.options.reverseUrl,
params,
L.Util.bind(function(data) {
L.Util.bind(function (data) {
cb.call(context, this._decodeFeatures(data));
}, this)
);
Expand Down
2 changes: 1 addition & 1 deletion src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export function getJSON(
callback: (message: any) => void
): void {
const xmlHttp = new XMLHttpRequest();
xmlHttp.onreadystatechange = function() {
xmlHttp.onreadystatechange = function () {
if (xmlHttp.readyState !== 4) {
return;
}
Expand Down

0 comments on commit fbcdad6

Please sign in to comment.