Loading...
Loading...
Hairy's {Opinionated} preferences and best practices for web development
npx skill4agent add hairyf/skills hairy| Category | Preference |
|---|---|
| Package Manager | pnpm |
| Language | TypeScript (strict mode) |
| Module System | ESM ( |
| Linting & Formatting | @antfu/eslint-config (no Prettier) |
| Testing | Vitest |
| Git Hooks | simple-git-hooks + lint-staged |
| Documentation | VitePress (in |
# pnpm-workspace.yaml
packages:
- 'packages/*'pnpm-workspace.yaml| Catalog | Purpose |
|---|---|
| Production dependencies |
| Dependencies inlined by bundler |
| Development tools (linter, bundler, testing, dev-server) |
| Frontend libraries bundled into frontend |
@antfu/ni| Command | Description |
|---|---|
| Install dependencies |
| Add dependency |
| Add dev dependency |
| Run script |
| Upgrade dependencies |
| Uninstall dependency |
| Clean install (like |
| Execute package (like |
pnpm i -g @antfu/ni{
"compilerOptions": {
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "bundler",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true
}
}"type": "module"package.json@antfu/eslint-configeslint.config.js// @ts-check// @ts-check
import antfu from '@antfu/eslint-config'
export default antfu()package.json{
"scripts": {
"lint": "eslint ."
}
}nr lint --fixlint:fixsimple-git-hookslint-staged{
"simple-git-hooks": {
"pre-commit": "pnpm i --frozen-lockfile --ignore-scripts --offline && npx lint-staged"
},
"lint-staged": {
"*": "eslint --fix"
},
"scripts": {
"prepare": "npx simple-git-hooks"
}
}{
"scripts": {
"test": "vitest"
}
}foo.tsfoo.test.tstests/describeittestexpectasserttoMatchSnapshottoMatchFileSnapshotbumpp{
"scripts": {
"release": "bumpp -r"
}
}docs/docs/
├── .vitepress/
│ └── config.ts
├── index.md
└── guide/
└── getting-started.mdpackage.json{
"scripts": {
"docs:dev": "vitepress dev docs",
"docs:build": "vitepress build docs"
}
}| Topic | Description | Reference |
|---|---|---|
| @antfu/eslint-config | ESLint flat config for formatting and linting | antfu-eslint-config |
| GitHub Actions | Preferred workflows using sxzz/workflows | github-actions |
| .gitignore | Preferred .gitignore for JS/TS projects | gitignore |
| VS Code Extensions | Recommended extensions for development | vscode-extensions |
| Topic | Description | Reference |
|---|---|---|
| App Development | Preferences for Vue/Vite/Nuxt/UnoCSS web applications | app-development |
| Library Development | Preferences for bundling and publishing TypeScript libraries | library-development |
| Monorepo | pnpm workspaces, centralized alias, Turborepo | monorepo |