Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
c10f44a
perf(core/eslint-config): update version and sort config entries
stephansama May 8, 2026
c73d5b3
chore(core): update tsconfig to use base and add composite flag
stephansama May 8, 2026
b5d3dec
chore(tsconfig): add tsdown.config.ts to include in multiple projects
stephansama May 9, 2026
fe35a4a
chore(eslint): add virtual:.* to ignore list
stephansama May 9, 2026
f25e306
feat(docs): add eslint rule for import sorting
stephansama May 9, 2026
35c90ea
refactor(iconify): remove .ts extension from import paths
stephansama May 9, 2026
b83cae0
ci(core): update build and dev scripts to use tsx
stephansama May 9, 2026
166c1a6
feat(core): add tsx dependency
stephansama May 9, 2026
4917e8b
feat(core): update package dependencies to use catalog:manypkg and sp…
stephansama May 9, 2026
9624632
perf(vitest): cast plugin to any to bypass type error
stephansama May 9, 2026
85875b4
ci(build): add build script for generating examples
stephansama May 9, 2026
bc36958
feat(build): add setup scripts and linting to www package
stephansama May 9, 2026
0b3632c
feat(core): add presetup:eslint-config-inspector task
stephansama May 9, 2026
d9dd43c
test(ai-commit-msg): fix mock for dotenvx config
stephansama May 9, 2026
679e24a
refactor(core): migrate build process to tsdown config
stephansama May 9, 2026
8c2b6ee
chore(docs): exclude tsdown.config.ts from typedoc
stephansama May 9, 2026
da5b73b
feat(docs): update package.json to include examples in prelint
stephansama May 9, 2026
79a4e38
docs(config): update typedoc config to use package options
stephansama May 9, 2026
6fc918a
feat(config): add typedoc-sidebar script and setup task
stephansama May 9, 2026
a20f96f
chore: update repository config for examples
stephansama May 9, 2026
a1b3b0b
chore(core): add tsbuildinfo to gitignore
stephansama May 9, 2026
70fa850
chore: update dependencies in changeset
stephansama May 9, 2026
8ba1cd9
docs(core): add package logo and alignment
stephansama May 9, 2026
85dc1a2
feat(docs): add line numbers and hide breadcrumbs in vitepress config
stephansama May 9, 2026
3ef2721
chore(config): update prettier config path in nanostaged
stephansama May 9, 2026
c146a44
ci(README): update readme with auto-readme
stephansama May 9, 2026
206a502
ci(config): add lint staged job
stephansama May 9, 2026
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
32 changes: 32 additions & 0 deletions .changeset/famous-dingos-act.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
"@stephansama/eslint-config": minor
"@example/svelte-social-share-links/svelte-kit": patch
"@example/svelte-social-share-links/astro": patch
"@stephansama/catppuccin-jsonresume-theme": patch
"@stephansama/prettier-plugin-handlebars": patch
"@stephansama/svelte-social-share-links": patch
"@example/astro-iconify-svgmap": patch
"@example/typed-events/vanilla": patch
"@stephansama/types-github-action-env": patch
"@example/typed-events/react": patch
"@stephansama/find-makefile-targets": patch
"@stephansama/astro-iconify-svgmap": patch
"@example/remark-asciinema": patch
"@stephansama/catppuccin-typedoc": patch
"@stephansama/remark-asciinema": patch
"@stephansama/typed-nocodb-api": patch
"@stephansama/typed-templates": patch
"@stephansama/alfred-kaomoji": patch
"@stephansama/catppuccin-xsl": patch
"@stephansama/ai-commit-msg": patch
"@stephansama/multipublish": patch
"@stephansama/typed-events": patch
"@stephansama/auto-readme": patch
"@stephansama/single-file": patch
"@stephansama/github-env": patch
"@stephansama/types-lhci": patch
"@stephansama/typed-env": patch
"create-stephansama-example": patch
---

updated eslint type aware implementation
5 changes: 3 additions & 2 deletions .config/.nanostagedrc.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ const jsLike = "{js,cjs,mjs,jsx,ts,mts,cts,tsx,astro,svelte,vue}";
* @see https://www.npmjs.com/package/lint-staged#configuration
*/
const config = {
[`!(*.${jsLike})`]: "prettier --write --ignore-unknown",
[`!(*.${jsLike})`]:
"prettier --config ../.prettierrc --write --ignore-unknown",
[`*.${jsLike}`]: [
"eslint --fix",
"prettier --write --ignore-unknown",
"prettier --config ../.prettierrc --write --ignore-unknown",
"vitest related --run",
],
};
Expand Down
1 change: 1 addition & 0 deletions .config/autoreadmerc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"$schema": "../node_modules/@stephansama/auto-readme/config/schema.json",
"usageFile": "./example/index.js",
"collapseHeadings": ["Configuration File", "Schema"],
"enablePrettier": false,
"enableToc": true,
"enableUsage": true,
"removeScope": "@stephansama/",
Expand Down
2 changes: 1 addition & 1 deletion .config/lefthook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ commit-msg:
jobs:
- run: pnpm dlx commitlint --config .config/.commitlintrc.ts --edit {1}
pre-commit:
parallel: true
parallel: false
jobs:
- run: auto-readme -vg
name: Update README
Expand Down
1 change: 1 addition & 0 deletions .config/www/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export default defineConfig({
config(md) {
md.use(copyOrDownloadAsMarkdownButtons);
},
lineNumbers: true,
theme: { dark: "catppuccin-mocha", light: "catppuccin-latte" },
},
outDir: "../../dist",
Expand Down
35 changes: 35 additions & 0 deletions .config/www/.vitepress/theme/extend.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,38 @@ html.dark {
border-radius: 99999px;
padding: 20px;
}

.VPNavBarTitle.has-sidebar > a.title[href="/"] {
border-bottom: 1px solid transparent;
border-image: linear-gradient(
90deg,
transparent,
var(--vp-c-divider),
transparent
)
1;
}

.markdown-copy-buttons {
justify-content: flex-end;
}

h2:not(.title):not(.text),
.prev-next {
border-top: 1px solid transparent;
border-image: linear-gradient(
90deg,
transparent,
var(--vp-c-divider),
transparent
)
1;
}

p:has(> a > img):not(:has(> :not(a))) {
display: flex;
gap: 0.25em;
align-items: center;
justify-content: center;
flex-wrap: wrap;
}
2 changes: 1 addition & 1 deletion .config/www/.vitepress/theme/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { Theme } from "vitepress";
import CopyOrDownloadAsMarkdownButtons from "vitepress-plugin-llms/vitepress-components/CopyOrDownloadAsMarkdownButtons.vue";
import DefaultTheme from "vitepress/theme";

// eslint-disable-next-line
// eslint-disable-next-line perfectionist/sort-imports
import "@catppuccin/vitepress/theme/mocha/red.css";

import "./extend.css";
Expand Down
13 changes: 12 additions & 1 deletion .config/www/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,20 @@
"build": "vitepress build",
"predev": "pnpm run setup",
"dev": "vitepress dev",
"prelint": "pnpm run setup:examples && pnpm run setup:typedoc",
"lint": "eslint ./",
"lint:fix": "eslint ./ --fix",
"preview": "vitepress preview",
"setup": "sh ./setup.sh"
"setup": "pnpm run --sequential \"/^setup:.*/\"",
"presetup:eslint-config-inspector": "pnpm --filter=@stephansama/eslint-config run build",
"setup:eslint-config-inspector": "eslint-config-inspector build --base /eslint --outDir public/eslint",
"setup:examples": "pnpm --filter=scripts generate-examples",
"setup:healthcheck": "node -e \"console.log(JSON.stringify({message: Date.now()}))\" >public/healthcheck.json",
"setup:meta": "pnpm --filter=scripts meta >public/meta.json",
Comment on lines +18 to +19
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Ensure public/ exists before redirecting output

Line 17 and Line 18 can fail on clean environments when public/ is missing, because shell redirection (>public/...) does not create parent directories. This can break setup/predev.

Proposed fix
-    "setup:healthcheck": "node -e \"console.log(JSON.stringify({message: Date.now()}))\" >public/healthcheck.json",
-    "setup:meta": "pnpm --filter=scripts meta >public/meta.json",
+    "setup:healthcheck": "node -e \"const fs=require('node:fs'); fs.mkdirSync('public',{recursive:true}); console.log(JSON.stringify({message: Date.now()}))\" >public/healthcheck.json",
+    "setup:meta": "node -e \"require('node:fs').mkdirSync('public',{recursive:true})\" && pnpm --filter=scripts meta >public/meta.json",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"setup:healthcheck": "node -e \"console.log(JSON.stringify({message: Date.now()}))\" >public/healthcheck.json",
"setup:meta": "pnpm --filter=scripts meta >public/meta.json",
"setup:healthcheck": "node -e \"const fs=require('node:fs'); fs.mkdirSync('public',{recursive:true}); console.log(JSON.stringify({message: Date.now()}))\" >public/healthcheck.json",
"setup:meta": "node -e \"require('node:fs').mkdirSync('public',{recursive:true})\" && pnpm --filter=scripts meta >public/meta.json",
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.config/www/package.json around lines 17 - 18, The two npm scripts
setup:healthcheck and setup:meta can fail if the public/ directory is missing;
update those script entries so they ensure the directory exists before
redirecting output (e.g., run a mkdir -p public step or use a Node write call)
so writing to public/healthcheck.json and public/meta.json never errors; change
the commands for "setup:healthcheck" and "setup:meta" accordingly to create
public/ first then produce the JSON files.

"setup:node-modules-inspector": "node-modules-inspector build --base /node_modules --outDir public/node_modules",
"setup:storybook": "pnpm --filter=scripts storybook",
"setup:typedoc": "typedoc",
"setup:typedoc-sidebar": "pnpm --filter=scripts typedoc-sidebar"
},
"dependencies": {
"@catppuccin/vitepress": "catalog:vitepress",
Expand Down
15 changes: 0 additions & 15 deletions .config/www/setup.sh

This file was deleted.

8 changes: 8 additions & 0 deletions .config/www/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "../../tsconfig.base.json",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Use array format for extends to maintain consistency.

While TypeScript accepts both string and array formats for extends, all other tsconfig.json files in this PR use the array format: "extends": ["../../tsconfig.base.json"]. This inconsistency may cause confusion.

📝 Proposed fix
-  "extends": "../../tsconfig.base.json",
+  "extends": ["../../tsconfig.base.json"],
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"extends": "../../tsconfig.base.json",
"extends": ["../../tsconfig.base.json"],
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.config/www/tsconfig.json at line 2, Update the "extends" entry in
.config/www/tsconfig.json from a string to an array to match the other configs:
change the "extends" property so it uses the array form (i.e., "extends":
["../../tsconfig.base.json"]) to keep consistency with the project's tsconfig
files.

"include": [".vitepress/**/*"],
"compilerOptions": {
"composite": true,
"types": ["node"]
}
}
25 changes: 24 additions & 1 deletion .config/www/typedoc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,32 @@
"plugin": ["typedoc-plugin-markdown", "typedoc-vitepress-theme"],
"indexFormat": "htmlTable",
"useCodeBlocks": true,
"hideBreadcrumbs": true,
"excludeExternals": true,
"skipErrorChecking": true,
"jsDocCompatibility": true,
"entryPointStrategy": "packages",
"entryPoints": ["../../core/*"]
"entryPoints": ["../../core/*"],
"exclude": [
"../../core/alfred-kaomoji/",
"../../core/catppuccin-opml/",
"../../core/catppuccin-rss/",
"../../core/github-env/"
],
"packageOptions": {
"entryPoints": ["src/*"],
"tsconfig": "./tsconfig.json",
"exclude": [
"**/*.spec.ts",
"**/*.test.ts",
"**/tests/**",
"**/{node_modules,test,book,doc,dist}/**/*",
"**/{pages,components}/**",
"node_modules",
"tsdown.config.ts"
],
"skipErrorChecking": true,
"excludeExternals": true,
"jsDocCompatibility": true
}
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
**/.vitepress/cache
**/coverage/
*.bak
*.tsbuildinfo
*storybook.log
.DS_Store
.astro
Expand Down
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ Collection of open-source [npm](https://www.npmx.dev/) packages
- [Introduction](#introduction)
- [📦 Packages](#-packages)
- [☂️ Codecov coverage graph](#️-codecov-coverage-graph)
- [⭐ Stargazers](#-stargazers)
- [Related repositories](#related-repositories)

</details>
Expand Down Expand Up @@ -76,10 +75,6 @@ All packages are packaged underneath the `@stephansama` scope (for example: `@st

![graph](https://codecov.io/github/stephansama/packages/graphs/tree.svg)

### ⭐ Stargazers

[![Stargazers repo roster for @stephansama/packages](https://reporoster.com/stars/stephansama/packages)](https://github.com/stephansama/packages/stargazers)

</div>

## Related repositories
Expand Down
6 changes: 5 additions & 1 deletion core/ai-commit-msg/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# @stephansama/ai-commit-msg
<div align="center">

# [`@stephansama`](https://github.com/stephansama) / ai-commit-msg

</div>

[![Source code](https://img.shields.io/badge/Source-666666?style=flat&logo=github&label=Github&labelColor=211F1F)](https://github.com/stephansama/packages/tree/main/core/ai-commit-msg)
[![Documentation](https://img.shields.io/badge/Documentation-211F1F?style=flat&logo=Wikibooks&labelColor=211F1F)](https://packages.stephansama.info/api/@stephansama/ai-commit-msg)
Expand Down
31 changes: 0 additions & 31 deletions core/ai-commit-msg/build.mjs

This file was deleted.

38 changes: 17 additions & 21 deletions core/ai-commit-msg/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"homepage": "https://packages.stephansama.info/api/@stephansama/ai-commit-msg",
"repository": {
"type": "git",
"url": "https://github.com/stephansama/packages",
"url": "git+https://github.com/stephansama/packages.git",
"directory": "core/ai-commit-msg"
},
"license": "MIT",
Expand All @@ -21,48 +21,44 @@
"type": "module",
"exports": {
".": {
"import": {
"types": "./config/schema.d.ts",
"default": "./config/schema.js"
},
"require": {
"types": "./config/schema.d.cts",
"default": "./config/schema.cjs"
}
"import": "./config/schema.mjs",
"require": "./config/schema.cjs"
},
"./package.json": "./package.json",
"./schema.json": "./config/schema.json"
},
"main": "./config/schema.js",
"module": "./config/schema.js",
"types": "./config/schema.d.ts",
"main": "./config/schema.cjs",
"module": "./config/schema.mjs",
"types": "./config/schema.d.cts",
"bin": "./cli.mjs",
"files": [
"./dist",
"./config"
],
"scripts": {
"build": "node build.mjs",
"build": "tsdown",
"dev": "tsdown --watch",
"lint": "eslint ./src/ --pass-on-no-patterns --no-error-on-unmatched-pattern",
"lint:fix": "eslint ./src/ --pass-on-no-patterns --no-error-on-unmatched-pattern --fix"
},
"dependencies": {
"@ai-sdk/google": "^3.0.29",
"@ai-sdk/openai": "^3.0.29",
"@commitlint/config-conventional": "^19.8.1",
"@dotenvx/dotenvx": "^1.52.0",
"ai": "^6.0.86",
"@ai-sdk/google": "catalog:ai",
"@ai-sdk/openai": "catalog:ai",
"@commitlint/config-conventional": "catalog:commitlint",
"@dotenvx/dotenvx": "catalog:",
"ai": "catalog:ai",
"cosmiconfig": "catalog:cli",
"es-toolkit": "catalog:",
"neverthrow": "^8.2.0",
"neverthrow": "catalog:",
"obug": "catalog:cli",
"ollama-ai-provider-v2": "^1.5.5",
"ollama-ai-provider-v2": "catalog:ai",
"yargs": "catalog:cli",
"zod": "catalog:schema"
},
"devDependencies": {
"@types/yargs": "catalog:",
"tsdown": "catalog:"
"tsdown": "catalog:",
"tsx": "catalog:"
},
"packageManager": "pnpm@10.29.3",
"engines": {
Expand Down
1 change: 0 additions & 1 deletion core/ai-commit-msg/src/config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// eslint-disable-next-line e18e/ban-dependencies
import { cosmiconfig, getDefaultSearchPlaces, type Options } from "cosmiconfig";

import { type Config, configSchema } from "./schema";
Expand Down
2 changes: 1 addition & 1 deletion core/ai-commit-msg/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import dotenvx from "@dotenvx/dotenvx";
import * as dotenvx from "@dotenvx/dotenvx";
import { generateText } from "ai";
import * as cp from "node:child_process";
import * as fsp from "node:fs/promises";
Expand Down
4 changes: 4 additions & 0 deletions core/ai-commit-msg/test/ai.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import { afterEach, describe, expect, it, vi } from "vitest";

import { getProvider } from "../src/ai";

/* eslint-disable @typescript-eslint/no-unsafe-assignment */

vi.mock("@ai-sdk/google", () => ({
google: vi.fn((model) => ({ model, type: "google" })),
}));
Expand All @@ -17,6 +19,8 @@ vi.mock("ollama-ai-provider-v2", () => ({
ollama: vi.fn((model) => ({ model, type: "ollama" })),
}));

/* eslint-enable @typescript-eslint/no-unsafe-assignment */

describe("ai", () => {
const originalEnvironment = process.env;

Expand Down
2 changes: 2 additions & 0 deletions core/ai-commit-msg/test/config.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* eslint-disable unicorn/no-abusive-eslint-disable */
/* eslint-disable */
Comment on lines +1 to +2
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | 🏗️ Heavy lift

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Check which ESLint rules are violated in config.test.ts

# Remove the eslint-disable comments temporarily and run ESLint
rg -n "eslint-disable" core/ai-commit-msg/test/config.test.ts

Repository: stephansama/packages

Length of output: 144


🏁 Script executed:

cat -n core/ai-commit-msg/test/config.test.ts | head -50

Repository: stephansama/packages

Length of output: 1826


🏁 Script executed:

wc -l core/ai-commit-msg/test/config.test.ts

Repository: stephansama/packages

Length of output: 106


🏁 Script executed:

git -C core/ai-commit-msg log --oneline -n 20 -- test/config.test.ts

Repository: stephansama/packages

Length of output: 119


Replace blanket ESLint disable with a targeted rule instead.

The file disables unicorn/no-abusive-eslint-disable and then immediately uses /* eslint-disable */ to suppress all linting rules, which is exactly the anti-pattern the unicorn rule is designed to prevent. The problematic code uses as any type assertions on lines 26 and 39 when mocking cosmiconfig. Replace the blanket disable with:

/* eslint-disable `@typescript-eslint/no-explicit-any` */

Alternatively, add a rule-specific disable only at the lines that need it.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@core/ai-commit-msg/test/config.test.ts` around lines 1 - 2, Replace the
blanket ESLint disable with a targeted rule: remove "/* eslint-disable */" and
instead use "/* eslint-disable `@typescript-eslint/no-explicit-any` */" at the top
of core/ai-commit-msg/test/config.test.ts, or alternatively remove the file-wide
disable and add inline rule-specific disables immediately where the cosmiconfig
mocks use "as any" (the mocks at the locations corresponding to the current
lines 26 and 39) so only the explicit-any rule is suppressed.

import { cosmiconfig } from "cosmiconfig";
import { afterEach, describe, expect, it, vi } from "vitest";

Expand Down
Loading
Loading