Skip to content

Commit 4d35c52

Browse files
committed
docs-#239: lint
1 parent 23f960d commit 4d35c52

File tree

1 file changed

+37
-30
lines changed

1 file changed

+37
-30
lines changed

Diff for: playground/app.vue

+37-30
Original file line numberDiff line numberDiff line change
@@ -2,53 +2,55 @@
22
import type {
33
CloudinaryUploadWidgetError,
44
CloudinaryUploadWidgetResults,
5-
} from "@cloudinary-util/types";
6-
import type { MediaType } from "../src/runtime/components/CldProductGallery.vue";
5+
} from '@cloudinary-util/types'
6+
import type { MediaType } from '../src/runtime/components/CldProductGallery.vue'
77
8-
const { url } = useCldImageUrl({ options: { src: "/cld-sample-5.jpg" } });
9-
console.log(url);
8+
const { url } = useCldImageUrl({ options: { src: '/cld-sample-5.jpg' } })
9+
console.log(url)
1010
1111
const { url: videoUrl } = useCldVideoUrl({
12-
options: { src: "videos/mountain-stars" },
13-
});
14-
console.log(videoUrl);
12+
options: { src: 'videos/mountain-stars' },
13+
})
14+
console.log(videoUrl)
1515
16-
const mediaAssets: { tag: string; mediaType?: MediaType }[] = [
17-
{ tag: "electric_car_product_gallery_demo" }, // by default mediaType: "image"
18-
{ tag: "electric_car_product_gallery_demo", mediaType: "video" },
19-
{ tag: "electric_car_360_product_gallery_demo", mediaType: "spin" },
20-
];
16+
const mediaAssets: { tag: string, mediaType?: MediaType }[] = [
17+
{ tag: 'electric_car_product_gallery_demo' }, // by default mediaType: "image"
18+
{ tag: 'electric_car_product_gallery_demo', mediaType: 'video' },
19+
{ tag: 'electric_car_360_product_gallery_demo', mediaType: 'spin' },
20+
]
2121
22-
const buttonId = "open-btn";
22+
const buttonId = 'open-btn'
2323
24-
const cldVideoRef = ref();
24+
const cldVideoRef = ref()
2525
2626
const chapters = {
27-
0: "Chapter 1",
28-
6: "Chapter 2",
29-
9: "Chapter 3",
30-
};
27+
0: 'Chapter 1',
28+
6: 'Chapter 2',
29+
9: 'Chapter 3',
30+
}
3131
3232
const colors = {
33-
accent: "#ff0000",
34-
base: "#00ff00",
35-
text: "#0000ff",
36-
};
33+
accent: '#ff0000',
34+
base: '#00ff00',
35+
text: '#0000ff',
36+
}
3737
3838
const onResult = (results: CloudinaryUploadWidgetResults) => {
39-
console.log("results", results);
40-
};
39+
console.log('results', results)
40+
}
4141
const onError = (
4242
error: CloudinaryUploadWidgetError,
43-
results: CloudinaryUploadWidgetResults
43+
results: CloudinaryUploadWidgetResults,
4444
) => {
45-
console.log("error", error);
46-
console.log("results", results);
47-
};
45+
console.log('error', error)
46+
console.log('results', results)
47+
}
4848
</script>
4949

5050
<template>
51-
<button :id="buttonId">Select Image or Video</button>
51+
<button :id="buttonId">
52+
Select Image or Video
53+
</button>
5254
<CldMediaLibrary
5355
api-key="12345"
5456
:button-id="buttonId"
@@ -90,7 +92,12 @@ const onError = (
9092
:on-error="onError"
9193
:on-result="onResult"
9294
>
93-
<button type="button" @click="open">Upload an Image</button>
95+
<button
96+
type="button"
97+
@click="open"
98+
>
99+
Upload an Image
100+
</button>
94101
</CldUploadWidget>
95102
<CldUploadButton
96103
upload-preset="nuxt-cloudinary-unsigned"

0 commit comments

Comments
 (0)