Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 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
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,12 @@ jobs:

- uses: pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c # 1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
name: 🟧 Install pnpm
# pnpm cache skipped deliberately as the project is not actually installed here
Comment thread
43081j marked this conversation as resolved.

- name: 📦 Install dependencies (root only, no scripts)
run: pnpm install --filter . --ignore-scripts

- name: 🔠 Lint project
run: node scripts/lint.ts
run: pnpm lint

types:
name: 💪 Type check
Expand Down
11 changes: 9 additions & 2 deletions .oxlintrc.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,25 @@
{
"$schema": "https://unpkg.com/oxlint/configuration_schema.json",
"plugins": ["unicorn", "typescript", "oxc", "vue", "vitest"],
"jsPlugins": ["@e18e/eslint-plugin"],
"categories": {
"correctness": "error",
"suspicious": "warn",
"perf": "warn"
},
"rules": {
"no-console": "warn",
"no-console": "off",
Copy link
Copy Markdown
Member

@serhalp serhalp Feb 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I never understood the purpose of warns, so I'm good with this 😁. Longer term should we be using a li'l logger module and turning this to "error"? (maybe keep off for scripts/)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we really need to review logging overall.

only truly error-level things should be logged at error level, for example. this isn't currently the case iirc

i'll start a discussion around this 👍

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would it be possible to disable this just on a per-directory case? so we disable it for server/ and cli/ but keep it for app/ ?

"no-await-in-loop": "off",
"unicorn/no-array-sort": "off",
"no-restricted-globals": "error",
"typescript/consistent-type-imports": "error"
"typescript/consistent-type-imports": "error",
"e18e/prefer-array-from-map": "error",
"e18e/prefer-timer-args": "error",
"e18e/prefer-date-now": "error",
"e18e/prefer-regex-test": "error",
"e18e/prefer-array-some": "error"
},
"overrides": [],
"ignorePatterns": [
".output/**",
".data/**",
Expand Down
3 changes: 3 additions & 0 deletions knip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ const config: KnipConfig = {

/** Some components import types from here, but installing it directly could lead to a version mismatch */
'vue-router',

/** Oxlint plugins don't get picked up yet */
'@e18e/eslint-plugin',
],
ignoreUnresolved: ['#components', '#oauth/config'],
},
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@
"vue-data-ui": "3.14.7"
},
"devDependencies": {
"@e18e/eslint-plugin": "0.1.4",
"@intlify/core-base": "11.2.8",
"@npm/types": "2.1.0",
"@playwright/test": "1.58.1",
Expand Down
22 changes: 22 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 0 additions & 33 deletions scripts/lint.ts

This file was deleted.

2 changes: 1 addition & 1 deletion server/utils/dependency-analysis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ export const analyzeDependencyTree = defineCachedFunction(
const resolved = await resolveDependencyTree(name, version, { trackDepth: true })

// Convert to array with query info
const packages: PackageQueryInfo[] = [...resolved.values()].map(pkg => ({
const packages: PackageQueryInfo[] = Array.from(resolved.values(), pkg => ({
name: pkg.name,
version: pkg.version,
depth: pkg.depth!,
Expand Down
16 changes: 8 additions & 8 deletions server/utils/readme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,14 @@ function resolveImageUrl(url: string, packageName: string, repoInfo?: Repository
return resolved
}

// Helper to prefix id attributes with 'user-content-'
function prefixId(tagName: string, attribs: sanitizeHtml.Attributes) {
if (attribs.id && !attribs.id.startsWith('user-content-')) {
attribs.id = `user-content-${attribs.id}`
}
return { tagName, attribs }
}

export async function renderReadmeHtml(
content: string,
packageName: string,
Expand Down Expand Up @@ -398,14 +406,6 @@ ${html}

const rawHtml = marked.parse(content) as string

// Helper to prefix id attributes with 'user-content-'
const prefixId = (tagName: string, attribs: sanitizeHtml.Attributes) => {
if (attribs.id && !attribs.id.startsWith('user-content-')) {
attribs.id = `user-content-${attribs.id}`
}
return { tagName, attribs }
}

const sanitized = sanitizeHtml(rawHtml, {
allowedTags: ALLOWED_TAGS,
allowedAttributes: ALLOWED_ATTR,
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/test-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ async function handleJsdelivrCdn(route: Route): Promise<boolean> {
const pathname = decodeURIComponent(url.pathname)

// README file requests - return 404 (package pages work fine without README)
if (pathname.match(/readme/i)) {
if (/readme/i.test(pathname)) {
await route.fulfill({ status: 404, body: 'Not found' })
return true
}
Expand Down
Loading