Skip to content

Commit 5284eea

Browse files
Fixed biome formatting
1 parent 2bd0c78 commit 5284eea

File tree

3 files changed

+28
-22
lines changed

3 files changed

+28
-22
lines changed

biome.json

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
{
22
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
33
"files": {
4-
"ignore": [
5-
"examples/angular/.angular/cache/*",
6-
"./examples/*/public/*",
7-
"./examples/blazor/wasm/wwwroot/css/*",
8-
"./examples/wasm-benchmark/*",
9-
"./examples/asp-net/*",
10-
"./examples/svelte-kit",
11-
"./examples/salesforce/*"
4+
"includes": [
5+
"**/*",
6+
"!examples/angular/.angular/cache/*",
7+
"!examples/*/public/*",
8+
"!examples/blazor/wasm/wwwroot/css/*",
9+
"!examples/wasm-benchmark/*",
10+
"!examples/asp-net/*",
11+
"!examples/svelte-kit/*",
12+
"!examples/salesforce/*"
1213
],
1314
"ignoreUnknown": true
1415
},

examples/webpack/config/webpack.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,11 @@ const config = {
7878
},
7979

8080
// When using CDN, exclude Nutrient from webpack bundle
81-
externals: useCdn ? {
82-
"@nutrient-sdk/viewer": "NutrientViewer"
83-
} : {},
81+
externals: useCdn
82+
? {
83+
"@nutrient-sdk/viewer": "NutrientViewer",
84+
}
85+
: {},
8486

8587
plugins: [
8688
// Automatically insert <script src="[name].js"><script> to the page.

examples/webpack/src/index.js

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,31 +19,34 @@ import dragDrop from "drag-drop";
1919
import { processFiles } from "./lib/utils";
2020

2121
// Use CDN version if available (global), otherwise use npm package
22-
const NutrientViewer = typeof window !== "undefined" && window.NutrientViewer
23-
? window.NutrientViewer
24-
: NutrientViewerNpm;
22+
const NutrientViewer =
23+
typeof window !== "undefined" && window.NutrientViewer
24+
? window.NutrientViewer
25+
: NutrientViewerNpm;
2526

2627
let hasUnsavedAnnotations = false;
2728
let isAlreadyLoaded = false;
2829

2930
// Load the default sample PDF on page load
30-
window.addEventListener('DOMContentLoaded', () => {
31+
window.addEventListener("DOMContentLoaded", () => {
3132
loadDefaultPDF();
3233
});
3334

3435
/**
3536
* Loads the default sample PDF from the assets folder
3637
*/
3738
function loadDefaultPDF() {
38-
fetch('./assets/nutrient-web-demo.pdf')
39-
.then(response => response.arrayBuffer())
40-
.then(arrayBuffer => {
39+
fetch("./assets/nutrient-web-demo.pdf")
40+
.then((response) => response.arrayBuffer())
41+
.then((arrayBuffer) => {
4142
load([arrayBuffer]);
4243
})
43-
.catch(error => {
44-
console.error('Failed to load default PDF:', error);
44+
.catch((error) => {
45+
console.error("Failed to load default PDF:", error);
4546
// If default PDF fails to load, show a fallback message
46-
console.log('You can still upload your own PDF using the controls above.');
47+
console.log(
48+
"You can still upload your own PDF using the controls above.",
49+
);
4750
});
4851
}
4952

@@ -135,7 +138,7 @@ let destroyListener = dragDrop("#body", {
135138
},
136139
});
137140

138-
function destroyDragAndDrop() {
141+
function _destroyDragAndDrop() {
139142
if (destroyListener) {
140143
destroyListener();
141144
destroyListener = null;

0 commit comments

Comments
 (0)