Skip to content

Commit cd9961e

Browse files
chore: fix biome issues
1 parent 8dfffcd commit cd9961e

File tree

4 files changed

+23
-31
lines changed

4 files changed

+23
-31
lines changed

biome.jsonc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://biomejs.dev/schemas/2.2.4/schema.json",
2+
"$schema": "https://biomejs.dev/schemas/2.3.0/schema.json",
33
"vcs": {
44
"enabled": false,
55
"clientKind": "git",

packages/docs/.storybook/preview-head.html

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
}
55

66
.sbdocs-h3:first-of-type {
7+
/* biome-ignore lint/complexity/noImportantStyles : we need to override the default styles */
78
margin: 20px 0 8px !important;
89
padding: 0;
910
}
@@ -24,6 +25,7 @@
2425
}
2526
}
2627

28+
/* biome-ignore lint/correctness/noUnknownMediaFeatureName : we need to override the default styles */
2729
@media all and (-ms-high-contrast:none) {
2830
.link-list {
2931
display: -ms-grid;
@@ -38,7 +40,6 @@
3840

3941
.link-list > button {
4042
cursor: pointer;
41-
display: block;
4243
text-align: left;
4344
padding: 20px 30px 20px 15px;
4445
border: 1px solid #00000010;
@@ -136,11 +137,7 @@
136137
.drop-in-js--organization-settings button,
137138
.drop-in-js--organization-settings input[type="submit"] {
138139
border: 0;
139-
border-radius: 3em;
140140
cursor: pointer;
141-
display: inline-block;
142-
overflow: hidden;
143-
padding: 8px 16px;
144141
position: relative;
145142
text-align: center;
146143
-webkit-text-decoration: none;
@@ -153,13 +150,8 @@
153150
transform: translate3d(0,0,0);
154151
vertical-align: top;
155152
white-space: nowrap;
156-
-webkit-user-select: none;
157-
-moz-user-select: none;
158-
-ms-user-select: none;
159-
user-select: none;
160153
opacity: 1;
161154
margin: 0;
162-
background: transparent;
163155
font-size: 12px;
164156
font-weight: 700;
165157
line-height: 1;
@@ -202,42 +194,42 @@
202194

203195
/* Weird Storybook issue on firefox */
204196
[scale="1"] {
205-
transform: none !important;
206-
transform-origin: initial !important;
207-
height: auto !important;
197+
transform: none;
198+
transform-origin: initial;
199+
height: auto;
208200
}
209201
</style>
210202

211203
<style>
212204
ol {
213-
list-style: decimal !important;
205+
list-style: decimal;
214206
}
215207
h2 {
216-
margin: 40px 0 8px !important;
208+
margin: 40px 0 8px;
217209
}
218210
h3 {
219-
margin: 20px 0 8px !important;
211+
margin: 20px 0 8px;
220212
}
221213
a:link, a:link:hover, a:link:active, a:visited {
222-
color: #029CFD !important;
214+
color: #029CFD;
223215
text-decoration: underline;
224216
}
225217
</style>
226218

227219
<style>
228220
.language-diff .token.deleted {
229-
color: #E57373 !important;
221+
color: #E57373;
230222
}
231223
.language-diff .token.inserted {
232-
color: #AED581 !important;
224+
color: #AED581;
233225
}
234226
</style>
235227

236228
<!-- used for the demo story -->
237229
<script src="https://cdn.tailwindcss.com"></script>
238230

239231
<script>
240-
(function() {
232+
(() => {
241233
// This hack is to remove the access token from the URL after the user has been redirected back to the docs (only for storybook use-case).
242234
setTimeout(() => {
243235
const url = new URL(window.parent.location.href)

packages/drop-in/src/cart.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@
132132
const addToCart = document.getElementById('vs--add-to-cart')
133133
const availability = document.getElementById('vs--availability')
134134

135-
select.addEventListener('change', function (event) {
135+
select.addEventListener('change', (event) => {
136136
const sku = event.currentTarget.value
137137
title.innerText = sku
138138
price.code = sku

packages/drop-in/src/index.html

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@
205205
option.innerText,
206206
{
207207
code: option.value,
208-
quantity: parseInt(option.dataset.quantity),
208+
quantity: parseInt(option.dataset.quantity, 10),
209209
name: option.dataset.name,
210210
imageUrl: option.dataset.imageUrl,
211211
frequency: option.dataset.frequency,
@@ -230,8 +230,8 @@
230230
productCard.querySelector('cl-price').code = code;
231231
productCard.querySelector('cl-add-to-cart').kind = kind ?? null;
232232
productCard.querySelector('cl-add-to-cart').code = code;
233-
productCard.querySelector('cl-add-to-cart').quantity = isNaN(quantity) || quantity == null ? 1 : quantity;
234-
productCard.querySelector('[data-id="pc--quantity"]').value = isNaN(quantity) || quantity == null ? 1 : quantity;
233+
productCard.querySelector('cl-add-to-cart').quantity = Number.isNaN(quantity) || quantity == null ? 1 : quantity
234+
productCard.querySelector('[data-id="pc--quantity"]').value = Number.isNaN(quantity) || quantity == null ? 1 : quantity;
235235
productCard.querySelector('cl-add-to-cart').name = name;
236236
productCard.querySelector('cl-add-to-cart').imageUrl = imageUrl;
237237
productCard.querySelector('cl-add-to-cart').frequency = frequency;
@@ -241,8 +241,8 @@
241241
productCard.querySelector('[data-id="pc--selector"]').innerHTML = `<code>${description.toUpperCase()}</code>`
242242
}
243243

244-
productCard.querySelector('[data-id="pc--quantity"]').addEventListener('keyup', function (event) {
245-
const qnt = parseInt(event.currentTarget.value)
244+
productCard.querySelector('[data-id="pc--quantity"]').addEventListener('keyup', (event) => {
245+
const qnt = parseInt(event.currentTarget.value, 10)
246246
productCard.querySelector('cl-add-to-cart').quantity = qnt > 101 ? 101 : qnt < -101 ? -101 : qnt
247247
if (qnt > 101) {
248248
event.currentTarget.value = 101
@@ -253,8 +253,8 @@
253253
})
254254
}
255255

256-
productCard.querySelector('[data-id="pc--quantity"]').addEventListener('input', function (event) {
257-
const qnt = parseInt(event.currentTarget.value)
256+
productCard.querySelector('[data-id="pc--quantity"]').addEventListener('input', (event) => {
257+
const qnt = parseInt(event.currentTarget.value, 10)
258258
productCard.querySelector('cl-add-to-cart').quantity = qnt > 101 ? 101 : qnt < -101 ? -101 : qnt
259259
if (qnt > 101) {
260260
event.currentTarget.value = 101
@@ -264,9 +264,9 @@
264264
}
265265
})
266266

267-
select.addEventListener('change', function (event) {
267+
select.addEventListener('change', (event) => {
268268
const code = event.currentTarget.value;
269-
const quantity = parseInt(event.currentTarget.selectedOptions[0].dataset.quantity)
269+
const quantity = parseInt(event.currentTarget.selectedOptions[0].dataset.quantity, 10)
270270
const name = event.currentTarget.selectedOptions[0].dataset.name
271271
const imageUrl = event.currentTarget.selectedOptions[0].dataset.imageUrl
272272
const frequency = event.currentTarget.selectedOptions[0].dataset.frequency

0 commit comments

Comments
 (0)