Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

introduce .prettierrc #3034

Merged
merged 2 commits into from
Oct 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
'trailingComma': 'none'
jaschaurbach marked this conversation as resolved.
Show resolved Hide resolved
84 changes: 42 additions & 42 deletions bookwyrm/static/js/autocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,64 +88,64 @@ const tries = {
mimetype: {
a: {
a: {
c: "AAC",
c: "AAC"
},
z: {
w: "AZW",
},
w: "AZW"
}
},
d: {
a: {
i: {
s: {
y: "Daisy",
},
},
},
y: "Daisy"
}
}
}
},
e: {
p: {
u: {
b: "EPUB",
},
},
b: "EPUB"
}
}
},
f: {
l: {
a: {
c: "FLAC",
},
},
c: "FLAC"
}
}
},
h: {
t: {
m: {
l: "HTML",
},
},
l: "HTML"
}
}
},
m: {
4: {
a: "M4A",
b: "M4B",
b: "M4B"
},
o: {
b: {
i: "MOBI",
},
i: "MOBI"
}
},
p: {
3: "MP3",
},
3: "MP3"
}
},
o: {
g: {
g: "OGG",
},
g: "OGG"
}
},
p: {
d: {
f: "PDF",
f: "PDF"
},
l: {
a: {
Expand All @@ -154,13 +154,13 @@ const tries = {
t: {
e: {
x: {
t: "Plaintext",
},
},
},
},
},
},
t: "Plaintext"
}
}
}
}
}
}
},
r: {
i: {
Expand All @@ -170,15 +170,15 @@ const tries = {
b: {
o: {
o: {
k: "Print book",
},
},
},
},
},
},
},
},
},
},
k: "Print book"
}
}
}
}
}
}
}
}
}
}
};
26 changes: 13 additions & 13 deletions bookwyrm/static/js/bookwyrm.js
Original file line number Diff line number Diff line change
Expand Up @@ -352,8 +352,8 @@ let BookWyrm = new (class {
method: "POST",
body: new FormData(form),
headers: {
Accept: "application/json",
},
Accept: "application/json"
}
});
}

Expand Down Expand Up @@ -620,7 +620,7 @@ let BookWyrm = new (class {
'input:not([type="hidden"]):not([disabled])',
"select:not([disabled])",
"details:not([disabled])",
'[tabindex]:not([tabindex="-1"]):not([disabled])',
'[tabindex]:not([tabindex="-1"]):not([disabled])'
].join(",")
);
const firstFocusableEl = focusableEls[0];
Expand Down Expand Up @@ -675,21 +675,21 @@ let BookWyrm = new (class {
target: scannerNode,
constraints: {
facingMode: "environment",
deviceId: cameraId,
},
deviceId: cameraId
}
},
decoder: {
readers: [
"ean_reader",
{
format: "ean_reader",
config: {
supplements: ["ean_2_reader", "ean_5_reader"],
},
},
supplements: ["ean_2_reader", "ean_5_reader"]
}
}
],
multiple: false,
},
multiple: false
}
},
(err) => {
if (err) {
Expand Down Expand Up @@ -756,22 +756,22 @@ let BookWyrm = new (class {
.forEach((box) => {
Quagga.ImageDebug.drawPath(box, { x: 0, y: 1 }, drawingCtx, {
color: "green",
lineWidth: 2,
lineWidth: 2
});
});
}

if (result.box) {
Quagga.ImageDebug.drawPath(result.box, { x: 0, y: 1 }, drawingCtx, {
color: "#00F",
lineWidth: 2,
lineWidth: 2
});
}

if (result.codeResult && result.codeResult.code) {
Quagga.ImageDebug.drawPath(result.line, { x: "x", y: "y" }, drawingCtx, {
color: "red",
lineWidth: 3,
lineWidth: 3
});
}
}
Expand Down
4 changes: 2 additions & 2 deletions bookwyrm/static/js/guided_tour.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ function disableGuidedTour(csrf_token) {
"use strict";
fetch("/guided-tour/False", {
headers: {
"X-CSRFToken": csrf_token,
"X-CSRFToken": csrf_token
},
method: "POST",
redirect: "follow",
mode: "same-origin",
mode: "same-origin"
});
}
4 changes: 2 additions & 2 deletions bookwyrm/static/js/tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class TabGroup {
left: 37,
up: 38,
right: 39,
down: 40,
down: 40
};
}

Expand All @@ -42,7 +42,7 @@ class TabGroup {
37: -1,
38: -1,
39: 1,
40: 1,
40: 1
};
}

Expand Down