Skip to content

Commit 929b2c3

Browse files
authored
refactor: fix or suppress existing oxlint warnings (#2634)
1 parent a72bfa9 commit 929b2c3

3 files changed

Lines changed: 3 additions & 2 deletions

File tree

app/components/Package/TrendsChart.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1077,6 +1077,7 @@ const normalisedDataset = computed(() => {
10771077
const lastDateMs = chartData.value.dates.at(-1) ?? 0
10781078
const isAbsoluteMetric = selectedMetric.value === 'contributors'
10791079
1080+
// oxlint-disable-next-line oxc-no-map-spread
10801081
return (chartData.value.dataset || []).map(d => {
10811082
const series = applyDataPipeline(
10821083
d.series.map(v => v ?? 0),

app/composables/useSelectedPackageManager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export const useSelectedPackageManager = createSharedComposable(
1313
// Sync to data-pm attribute on the client
1414
if (import.meta.client) {
1515
const queryPM = new URLSearchParams(window.location.search).get('pm')
16-
if (queryPM && packageManagers.some(pm => pm.id === queryPM)) {
16+
if (queryPM && packageManagers.some(({ id }) => id === queryPM)) {
1717
pm.value = queryPM as PackageManagerId
1818
}
1919
// Watch for changes and update the attribute

server/utils/readme.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,7 @@ export async function renderReadmeHtml(
558558
return `<h${semanticLevel} id="${id}" data-level="${depth}"${preservedAttrs}><a href="#${id}">${displayHtml}</a></h${semanticLevel}>\n`
559559
}
560560

561-
const anchorTokenRegex = /^<a(\s.+)?\/?>$/
561+
const anchorTokenRegex = /^<a(?:\s.+)?\/?>$/
562562
renderer.heading = function ({ tokens, depth }: Tokens.Heading) {
563563
const isAnchorHeading =
564564
anchorTokenRegex.test(tokens[0]?.raw ?? '') && tokens[tokens.length - 1]?.raw === '</a>'

0 commit comments

Comments
 (0)