Skip to content

Commit

Permalink
refactor: resolve lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
blacha committed Aug 22, 2024
1 parent 72344d1 commit 419a5f9
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 8 deletions.
10 changes: 6 additions & 4 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
module.exports = {
const cfg = {
...require('@linzjs/style/.eslintrc.cjs'),
rules: {
'@typescript-eslint/require-await': 0,
},
};

const testOverrides = cfg.overrides.find((ovr) => ovr.files.find((f) => f.includes('.test.ts')));
testOverrides.rules['@typescript-eslint/no-floating-promises'] = 'off';

module.exports = cfg;
5 changes: 4 additions & 1 deletion packages/fs-aws/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@
"@chunkd/fs": "11.2.0",
"@chunkd/source-aws": "11.0.3"
},
"devDependencies": {},
"devDependencies": {
"@types/node": "^18.16.19",
"@smithy/types": "*"
},
"publishConfig": {
"access": "public"
},
Expand Down
6 changes: 4 additions & 2 deletions packages/fs-aws/src/credentials.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { S3Client } from '@aws-sdk/client-s3';
import { fromTemporaryCredentials } from '@aws-sdk/credential-providers';
import { FileSystem, FileSystemProvider } from '@chunkd/fs';
import type { RequestSigner } from '@smithy/types';

import { FsAwsS3 } from './fs.s3.js';
import { AwsCredentialConfig, AwsCredentialProvider } from './types.js';
Expand Down Expand Up @@ -50,10 +51,11 @@ export class FsConfigFetcher {
}

let PublicClient: S3Client | undefined;
/** Creating a public s3 client is somewhat hard, where the signing method needs to be overriden */
/** Creating a public s3 client is somewhat hard, where the signing method needs to be overridden */
export function getPublicS3(): S3Client {
if (PublicClient) return PublicClient;
PublicClient = new S3Client({ signer: { sign: (req) => Promise.resolve(req) } });
const signer: RequestSigner = { sign: (req) => Promise.resolve(req) };
PublicClient = new S3Client({ signer });
return PublicClient;
}

Expand Down
3 changes: 2 additions & 1 deletion packages/fs/src/systems/http.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { SourceHttp } from '@chunkd/source-http';
import type { Readable } from 'node:stream';
import { PassThrough, Stream } from 'node:stream';
import type { ReadableStream } from 'node:stream/web';

import { SourceHttp } from '@chunkd/source-http';

import { FsError } from '../error.js';
import { FileInfo, FileSystem } from '../file.system.js';

Expand Down
7 changes: 7 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1557,6 +1557,13 @@
resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.27.8.tgz#6667fac16c436b5434a387a34dedb013198f6e6e"
integrity sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==

"@smithy/types@*":
version "3.3.0"
resolved "https://registry.yarnpkg.com/@smithy/types/-/types-3.3.0.tgz#fae037c733d09bc758946a01a3de0ef6e210b16b"
integrity sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==
dependencies:
tslib "^2.6.2"

"@tootallnate/once@2":
version "2.0.0"
resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-2.0.0.tgz#f544a148d3ab35801c1f633a7441fd87c2e484bf"
Expand Down

0 comments on commit 419a5f9

Please sign in to comment.