Skip to content

Commit a0b9a5c

Browse files
chore: format
Signed-off-by: David Dal Busco <[email protected]>
1 parent bf80121 commit a0b9a5c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+300
-272
lines changed

.prettierrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"trailingComma": "none",
3+
"plugins": ["prettier-plugin-organize-imports"]
4+
}

babel.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module.exports = {
2-
presets: [require.resolve("@docusaurus/core/lib/babel/preset")],
2+
presets: [require.resolve("@docusaurus/core/lib/babel/preset")]
33
};

blog/2023-02-14-introducing-juno/index.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ const key = "my_key";
6868

6969
const doc = await getDoc({
7070
collection,
71-
key,
71+
key
7272
});
7373

7474
await setDoc({
@@ -77,9 +77,9 @@ await setDoc({
7777
key,
7878
...doc,
7979
data: {
80-
email: myNewEmail,
81-
},
82-
},
80+
email: myNewEmail
81+
}
82+
}
8383
});
8484
```
8585
@@ -96,7 +96,7 @@ const input = document.querySelector("input");
9696

9797
const { downloadUrl } = await uploadFile({
9898
data: input.files[0],
99-
collection: "images",
99+
collection: "images"
100100
});
101101
```
102102

blog/2023-03-21-whats-new-in-juno-v0-0-8/index.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@ const myList = await listDocs({
8080
filter: {
8181
order: {
8282
desc: true,
83-
field: "updated_at",
84-
},
85-
},
83+
field: "updated_at"
84+
}
85+
}
8686
});
8787
```
8888

@@ -104,8 +104,8 @@ import { initJuno } from "@junobuild/core";
104104
await initJuno({
105105
satelliteId: "aaaaa-bbbbb-ccccc-ddddd-cai",
106106
workers: {
107-
auth: true, // ----------------------------------|
108-
}, //|
107+
auth: true // ----------------------------------|
108+
} //|
109109
}); //|
110110
//|
111111
authSubscribe((user: User | null) => {

blog/2023-03-28-build-a-web3-app-with-react-js.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ function App() {
5858
useEffect(() => {
5959
(async () =>
6060
await initJuno({
61-
satelliteId: "pycrs-xiaaa-aaaal-ab6la-cai",
61+
satelliteId: "pycrs-xiaaa-aaaal-ab6la-cai"
6262
}))();
6363
}, []);
6464

@@ -141,8 +141,8 @@ await setDoc<Example>({
141141
collection: "my_collection_key",
142142
doc: {
143143
key: "my_document_key",
144-
data: myExample,
145-
},
144+
data: myExample
145+
}
146146
});
147147
```
148148

@@ -162,9 +162,9 @@ export const Example = () => {
162162
doc: {
163163
key: nanoid(),
164164
data: {
165-
text: inputText,
166-
},
167-
},
165+
text: inputText
166+
}
167+
}
168168
});
169169
};
170170

@@ -204,7 +204,7 @@ export const ListExample = () => {
204204
const list = async () => {
205205
const { items } = await listDocs({
206206
collection: "notes",
207-
filter: {},
207+
filter: {}
208208
});
209209

210210
setItems(items);
@@ -258,7 +258,7 @@ export const UploadExample = () => {
258258
const { downloadUrl } = await uploadFile({
259259
collection: "images",
260260
data: file,
261-
filename,
261+
filename
262262
});
263263

264264
setImage(downloadUrl);
@@ -305,7 +305,7 @@ export const ListAssetsExample = () => {
305305
const list = async () => {
306306
const { assets } = await listAssets({
307307
collection: "images",
308-
filter: {},
308+
filter: {}
309309
});
310310

311311
setAssets(assets);

blog/2023-04-21-develop-an-angular-app-on-blockchain.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,12 @@ import { initJuno } from "@junobuild/core";
5757
@Component({
5858
selector: "app-root",
5959
templateUrl: "./app.component.html",
60-
styleUrls: ["./app.component.scss"],
60+
styleUrls: ["./app.component.scss"]
6161
})
6262
export class AppComponent implements OnInit {
6363
async ngOnInit() {
6464
await initJuno({
65-
satelliteId: "pycrs-xiaaa-aaaal-ab6la-cai",
65+
satelliteId: "pycrs-xiaaa-aaaal-ab6la-cai"
6666
});
6767
}
6868
}
@@ -84,7 +84,7 @@ import { signIn, signOut } from "@junobuild/core";
8484
selector: "app-demo",
8585
template: `<button (click)="signIn()">Sign-in</button>
8686
<button (click)="signOut()">Sign-out</button>`,
87-
standalone: true,
87+
standalone: true
8888
})
8989
export class DemoComponent {
9090
readonly signOut = signOut;
@@ -102,7 +102,7 @@ import { authSubscribe, User } from "@junobuild/core";
102102
import { map, Observable } from "rxjs";
103103

104104
@Injectable({
105-
providedIn: "root",
105+
providedIn: "root"
106106
})
107107
export class AuthService {
108108
readonly user$: Observable<User | null> = new Observable((observer) =>
@@ -135,8 +135,8 @@ await setDoc<Example>({
135135
collection: "my_collection_key",
136136
doc: {
137137
key: "my_document_key",
138-
data: myExample,
139-
},
138+
data: myExample
139+
}
140140
});
141141
```
142142

@@ -157,11 +157,11 @@ import { Entry } from "../../types/entry";
157157
<button [disabled]="entryForm.disabled">Submit</button>
158158
</form>`,
159159
standalone: true,
160-
imports: [ReactiveFormsModule],
160+
imports: [ReactiveFormsModule]
161161
})
162162
export class InputComponent {
163163
entryForm = this.formBuilder.group({
164-
entry: "",
164+
entry: ""
165165
});
166166

167167
constructor(private formBuilder: FormBuilder) {}
@@ -178,9 +178,9 @@ export class InputComponent {
178178
doc: {
179179
key,
180180
data: {
181-
text: this.entryForm.value.entry,
182-
},
183-
},
181+
text: this.entryForm.value.entry
182+
}
183+
}
184184
});
185185
}
186186
}
@@ -220,20 +220,20 @@ import {
220220
shareReplay,
221221
startWith,
222222
Subject,
223-
switchMap,
223+
switchMap
224224
} from "rxjs";
225225
import type { Entry } from "../types/entry";
226226
import { AuthService } from "./auth.service";
227227

228228
@Injectable({
229-
providedIn: "root",
229+
providedIn: "root"
230230
})
231231
export class DocsService {
232232
private reloadSubject = new Subject<void>();
233233

234234
docs$: Observable<Doc<Entry>[]> = combineLatest([
235235
this.authService.user$,
236-
this.reloadSubject.pipe(startWith(undefined)),
236+
this.reloadSubject.pipe(startWith(undefined))
237237
]).pipe(
238238
switchMap(([user, _]) => {
239239
if (user === null) {
@@ -243,7 +243,7 @@ export class DocsService {
243243
return from(
244244
listDocs<Entry>({
245245
collection: "notes",
246-
filter: {},
246+
filter: {}
247247
})
248248
).pipe(map(({ items }) => items));
249249
}),
@@ -275,7 +275,7 @@ import type { Entry } from "../../types/entry";
275275
{{ doc.key }}: {{ doc.data.text }}
276276
</p>`,
277277
imports: [BrowserModule],
278-
standalone: true,
278+
standalone: true
279279
})
280280
export class ListComponent {
281281
readonly docs$: Observable<Doc<Entry>[]> = this.docsService.docs$;
@@ -315,7 +315,7 @@ import { BrowserModule } from "@angular/platform-browser";
315315
<button (click)="add()">Upload</button>
316316
`,
317317
standalone: true,
318-
imports: [BrowserModule],
318+
imports: [BrowserModule]
319319
})
320320
export class UploadComponent {
321321
private file: File | undefined;
@@ -347,7 +347,7 @@ export class UploadComponent {
347347
return uploadFile({
348348
collection: "images",
349349
data: this.file,
350-
filename,
350+
filename
351351
});
352352
}
353353
}
@@ -376,19 +376,19 @@ import {
376376
shareReplay,
377377
startWith,
378378
Subject,
379-
switchMap,
379+
switchMap
380380
} from "rxjs";
381381
import { AuthService } from "./auth.service";
382382

383383
@Injectable({
384-
providedIn: "root",
384+
providedIn: "root"
385385
})
386386
export class AssetsService {
387387
private reloadSubject = new Subject<void>();
388388

389389
assets$: Observable<Assets[]> = combineLatest([
390390
this.authService.user$,
391-
this.reloadSubject.pipe(startWith(undefined)),
391+
this.reloadSubject.pipe(startWith(undefined))
392392
]).pipe(
393393
switchMap(([user, _]) => {
394394
if (user === null) {
@@ -398,7 +398,7 @@ export class AssetsService {
398398
return from(
399399
listAssets({
400400
collection: "images",
401-
filter: {},
401+
filter: {}
402402
})
403403
).pipe(map(({ assets }) => assets));
404404
}),
@@ -431,7 +431,7 @@ import { AssetsService } from "../../services/assets.service";
431431
loading="lazy"
432432
/>`,
433433
imports: [BrowserModule],
434-
standalone: true,
434+
standalone: true
435435
})
436436
export class AssetsComponent {
437437
readonly assets$: Observable<Asset[]> = this.assetsService.assets$;

blog/2023-05-24-build-a-web3-app-with-vuejs.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ After completing both of these steps, you can initialize Juno with your satellit
7070
onMounted(
7171
async () =>
7272
await initJuno({
73-
satelliteId: "pycrs-xiaaa-aaaal-ab6la-cai",
73+
satelliteId: "pycrs-xiaaa-aaaal-ab6la-cai"
7474
})
7575
);
7676
</script>
@@ -155,8 +155,8 @@ await setDoc<Example>({
155155
collection: "my_collection_key",
156156
doc: {
157157
key: "my_document_key",
158-
data: myExample,
159-
},
158+
data: myExample
159+
}
160160
});
161161
```
162162

@@ -178,9 +178,9 @@ Since the documents in the collection are identified by a unique key, we create
178178
doc: {
179179
key,
180180
data: {
181-
text: inputText.value,
182-
},
183-
},
181+
text: inputText.value
182+
}
183+
}
184184
});
185185
};
186186
</script>
@@ -215,7 +215,7 @@ For the purpose of this tutorial, we will keep the example minimalistic. Our obj
215215
216216
const list = async () => {
217217
const { items: data } = await listDocs({
218-
collection: "notes",
218+
collection: "notes"
219219
});
220220
221221
items.value = data;
@@ -269,7 +269,7 @@ To accomplish this, we can create a key using a combination of the user's unique
269269
const { downloadUrl } = await uploadFile({
270270
collection: "images",
271271
data: file.value,
272-
filename,
272+
filename
273273
});
274274
275275
console.log("Uploaded", downloadUrl);
@@ -302,7 +302,7 @@ Similar to the previous example with documents, we will keep this example minima
302302
303303
const list = async () => {
304304
const { assets: images } = await listAssets({
305-
collection: "images",
305+
collection: "images"
306306
});
307307
308308
assets.value = images;

blog/2023-06-23-exploring-a-juno-web3-dapp-architecture/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ export const setMetadata = ({ key, name }: Metadata) =>
247247
[
248248
[KEY_LAST_CHANGE, Date.now()],
249249
[KEY_SCENE, key],
250-
[KEY_NAME, name],
250+
[KEY_NAME, name]
251251
],
252252
stateStore
253253
);
@@ -288,7 +288,7 @@ As mentioned in the architecture chapter, the concept of the project is to conti
288288

289289
```typescript
290290
onmessage = async ({
291-
data: { msg, data },
291+
data: { msg, data }
292292
}: MessageEvent<PostMessage<PostMessageDataRequest>>) => {
293293
switch (msg) {
294294
case "start":

0 commit comments

Comments
 (0)