diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 6bb07aa2..18d3ca39 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -50,5 +50,6 @@ module.exports = { curly: ['error', 'all'], 'brace-style': ['error', '1tbs', { allowSingleLine: false }], 'no-else-return': 0, + 'no-return-await': 0, }, }; diff --git a/src/geotiff.js b/src/geotiff.js index 72d04695..be8c8f6e 100644 --- a/src/geotiff.js +++ b/src/geotiff.js @@ -755,7 +755,7 @@ export async function fromUrls(mainUrl, overviewUrls = [], options = {}, signal) const mainSource = await makeRemoteSource(mainUrl, options); const mainFile = await GeoTIFF.fromSource(mainSource, signal); const overviewFiles = await Promise.all( - overviewUrls.map((url) => makeRemoteSource(url, options).then(src=>GeoTIFF.fromSource(src)) + overviewUrls.map((url) => makeRemoteSource(url, options).then((src) => GeoTIFF.fromSource(src)), ), ); diff --git a/src/source/remote.js b/src/source/remote.js index 8416da1d..cd18a1e7 100644 --- a/src/source/remote.js +++ b/src/source/remote.js @@ -153,7 +153,13 @@ function maybeWrapInBlockedSource(source, { blockSize, cacheSize }) { return new BlockedSource(source, { blockSize, cacheSize }); } -export async function makeFetchSource(url, { headers = {}, credentials, maxRanges = 0, allowFullFile = false, ...blockOptions } = {}) { +export async function makeFetchSource(url, { + headers = {}, + credentials, + maxRanges = 0, + allowFullFile = false, + ...blockOptions +} = {}) { const { FetchClient } = await import('./client/fetch.js'); const client = new FetchClient(url, credentials); const source = new RemoteSource(client, headers, maxRanges, allowFullFile);