diff --git a/.oxlintrc.json b/.oxlintrc.json index 1473bf237..9dfdd8e29 100644 --- a/.oxlintrc.json +++ b/.oxlintrc.json @@ -1,7 +1,6 @@ { "$schema": "./node_modules/oxlint/configuration_schema.json", "plugins": ["typescript", "import", "unicorn", "promise"], - "jsPlugins": ["@e18e/eslint-plugin"], "categories": { "correctness": "error", "suspicious": "warn", @@ -29,24 +28,7 @@ { "allow": ["**/*.css", "@testing-library/react", "vitest-browser-react"] } - ], - "e18e/prefer-array-at": "error", - "e18e/prefer-array-fill": "error", - "e18e/prefer-includes": "error", - "e18e/prefer-array-to-reversed": "error", - "e18e/prefer-array-to-sorted": "error", - "e18e/prefer-array-to-spliced": "error", - "e18e/prefer-nullish-coalescing": "error", - "e18e/prefer-object-has-own": "error", - "e18e/prefer-spread-syntax": "error", - "e18e/prefer-url-canparse": "error", - "e18e/ban-dependencies": "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", - "e18e/prefer-static-regex": "error" + ] }, "overrides": [ { @@ -54,8 +36,7 @@ "rules": { "typescript/no-unsafe-type-assertion": "off", "typescript/no-unnecessary-type-assertion": "off", - "unicorn/consistent-function-scoping": "off", - "e18e/prefer-static-regex": "off" + "unicorn/consistent-function-scoping": "off" } }, { diff --git a/package.json b/package.json index 18c8161c7..4b2cbcfee 100644 --- a/package.json +++ b/package.json @@ -19,10 +19,10 @@ "format": "oxfmt --ignore-path .gitignore && prettier --write .", "format:check": "oxfmt --ignore-path .gitignore --check && prettier --check .", "format:astro": "prettier --write .", - "lint": "oxlint --type-aware", + "lint": "oxlint --type-aware --tsconfig tsconfig.oxlint.json", "lint:quick": "oxlint -f json", - "lint:json": "oxlint --type-aware -f json", - "lint:fix": "oxlint --type-aware --fix", + "lint:json": "oxlint --type-aware --tsconfig tsconfig.oxlint.json -f json", + "lint:fix": "oxlint --type-aware --tsconfig tsconfig.oxlint.json --fix", "knip": "knip --no-exit-code --exclude unlisted,unresolved,exports,types,duplicates", "new": "create-emdash", "screenshots": "node scripts/screenshot-all-templates.mjs", @@ -37,7 +37,6 @@ "@axe-core/playwright": "^4.11.1", "@changesets/changelog-github": "^0.5.2", "@changesets/cli": "^2.29.8", - "@e18e/eslint-plugin": "^0.2.0", "@lunariajs/core": "https://pkg.pr.new/lunariajs/lunaria/@lunariajs/core@83617cc", "@playwright/test": "^1.58.0", "@types/node": "catalog:", diff --git a/packages/plugin-cli/src/commands/info.ts b/packages/plugin-cli/src/commands/info.ts index 2b694b598..3e7612591 100644 --- a/packages/plugin-cli/src/commands/info.ts +++ b/packages/plugin-cli/src/commands/info.ts @@ -76,9 +76,9 @@ export const infoCommand = defineCommand({ ); } - const name = profile?.name ?? result.slug; - const description = profile?.description; - const license = profile?.license; + const name = typeof profile?.name === "string" ? profile.name : result.slug; + const description = typeof profile?.description === "string" ? profile.description : undefined; + const license = typeof profile?.license === "string" ? profile.license : undefined; console.log(); console.log(pc.bold(name)); diff --git a/packages/plugin-cli/src/commands/search.ts b/packages/plugin-cli/src/commands/search.ts index e03207b54..f95dd47fc 100644 --- a/packages/plugin-cli/src/commands/search.ts +++ b/packages/plugin-cli/src/commands/search.ts @@ -71,8 +71,12 @@ export const searchCommand = defineCommand({ for (const pkg of result.packages) { // `pkg.profile` is lexicon-validated by DiscoveryClient (or null). const profile = pkg.profile; - console.log(`${pc.bold(profile?.name ?? pkg.slug)} ${pc.dim(`(${pkg.slug})`)}`); - if (profile?.description) console.log(` ${profile.description}`); + const slug = typeof pkg.slug === "string" ? pkg.slug : ""; + const name = typeof profile?.name === "string" ? profile.name : slug; + const description = + typeof profile?.description === "string" ? profile.description : undefined; + console.log(`${pc.bold(name)} ${pc.dim(`(${slug})`)}`); + if (description) console.log(` ${description}`); console.log(` ${pc.dim(pkg.uri)}`); console.log(); } diff --git a/packages/registry-client/package.json b/packages/registry-client/package.json index a826284ec..52f2f501c 100644 --- a/packages/registry-client/package.json +++ b/packages/registry-client/package.json @@ -29,7 +29,7 @@ "build": "tsdown", "dev": "tsdown --watch", "prepublishOnly": "node --run build", - "typecheck": "tsgo --noEmit", + "typecheck": "tsc --noEmit", "test": "vitest run", "check": "publint && attw --pack --ignore-rules=cjs-resolves-to-esm --ignore-rules=no-resolution" }, diff --git a/packages/registry-client/tsconfig.json b/packages/registry-client/tsconfig.json index 3d32fdcf3..e80644b4c 100644 --- a/packages/registry-client/tsconfig.json +++ b/packages/registry-client/tsconfig.json @@ -3,7 +3,7 @@ "compilerOptions": { "outDir": "./dist", "rootDir": "./src", - "lib": ["es2023", "esnext.typedarrays"], + "lib": ["es2023"], "types": ["node"] }, "include": ["src/**/*"], diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e4ad1bc94..a3fd9e6c2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -261,9 +261,6 @@ importers: '@changesets/cli': specifier: ^2.29.8 version: 2.29.8(@types/node@24.10.13) - '@e18e/eslint-plugin': - specifier: ^0.2.0 - version: 0.2.0(oxlint@1.49.0(oxlint-tsgolint@0.15.0)) '@lunariajs/core': specifier: https://pkg.pr.new/lunariajs/lunaria/@lunariajs/core@83617cc version: https://pkg.pr.new/lunariajs/lunaria/@lunariajs/core@83617cc @@ -3266,17 +3263,6 @@ packages: peerDependencies: react: '>=16.8.0' - '@e18e/eslint-plugin@0.2.0': - resolution: {integrity: sha512-mXgODVwhuDjTJ+UT+XSvmMmCidtGKfrV5nMIv1UtpWex2pYLsIM3RSpT8HWIMAebS9qANbXPKlSX4BE7ZvuCgA==} - peerDependencies: - eslint: ^9.0.0 || ^10.0.0 - oxlint: ^1.41.0 - peerDependenciesMeta: - eslint: - optional: true - oxlint: - optional: true - '@emmetio/abbreviation@2.3.3': resolution: {integrity: sha512-mgv58UrU3rh4YgbE/TzgLQwJ3pFsHHhCLqY20aJq+9comytTXUDNGG/SMtSeMJdkpxgXSXunBGLD8Boka3JyVA==} @@ -12273,12 +12259,6 @@ snapshots: react: 19.2.4 tslib: 2.8.1 - '@e18e/eslint-plugin@0.2.0(oxlint@1.49.0(oxlint-tsgolint@0.15.0))': - dependencies: - eslint-plugin-depend: 1.4.0 - optionalDependencies: - oxlint: 1.49.0(oxlint-tsgolint@0.15.0) - '@emmetio/abbreviation@2.3.3': dependencies: '@emmetio/scanner': 1.0.4 diff --git a/tsconfig.oxlint.json b/tsconfig.oxlint.json new file mode 100644 index 000000000..2b2932bad --- /dev/null +++ b/tsconfig.oxlint.json @@ -0,0 +1,17 @@ +{ + "extends": "./tsconfig.json", + "exclude": [ + "**/node_modules/**", + "**/dist/**", + "**/.astro/**", + "**/.wrangler/**", + "**/*.d.ts", + "**/*.d.mts", + "**/*.d.cts", + "**/src/generated/**", + "skills/**/scaffold/**", + ".agents/skills/**/scaffold/**", + ".claude/skills/**/scaffold/**", + "scripts/query-dumps/**" + ] +}