Skip to content

Commit

Permalink
fix: Prettier/ESLint
Browse files Browse the repository at this point in the history
Closes #3
  • Loading branch information
FazioNico committed Dec 6, 2024
1 parent 1c908d0 commit 55775a9
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 24 deletions.
1 change: 0 additions & 1 deletion .prettierrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ semi: true
singleQuote: true
trailingComma: none
bracketSpacing: true
jsxBracketSameLine: false
arrowParens: avoid
42 changes: 22 additions & 20 deletions lib/providers/storage/fleek.ts
Original file line number Diff line number Diff line change
@@ -1,29 +1,31 @@
import { FleekSdk, ApplicationAccessTokenService } from '@fleekxyz/sdk';

let fleekSdk!:FleekSdk;
let fleekSdk!: FleekSdk;

const initialize = Object.freeze((clientId: string) => {
const applicationService = new ApplicationAccessTokenService({
clientId,
});
fleekSdk = new FleekSdk({ accessTokenService: applicationService });
const applicationService = new ApplicationAccessTokenService({
clientId
});
fleekSdk = new FleekSdk({ accessTokenService: applicationService });
});

const uploadToIPFS = Object.freeze(async (filename: string, content: Buffer) => {
if (!fleekSdk) {
throw new Error('Fleek SDK not initialized');
}
const result = await fleekSdk.ipfs().add({
path: filename,
content: content,
})

return result
});
const uploadToIPFS = Object.freeze(
async (filename: string, content: Buffer) => {
if (!fleekSdk) {
throw new Error('Fleek SDK not initialized');
}
const result = await fleekSdk.ipfs().add({
path: filename,
content: content
});

return result;
}
);

const FleekStorageProvider = {
initialize,
uploadToIPFS,
}
initialize,
uploadToIPFS
};

export default FleekStorageProvider;
export default FleekStorageProvider;
6 changes: 3 additions & 3 deletions lib/vite-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

// https://medium.com/@sampsonjoliver/importing-html-files-from-typescript-bd1c50909992
declare module '*.html' {
const value: string;
export default value
}
const value: string;
export default value;
}

0 comments on commit 55775a9

Please sign in to comment.