asir

Asir's opinionated tooling and conventions for JavaScript/TypeScript projects. Use when setting up new projects, configuring ESLint/Prettier alternatives, monorepos, library publishing, or when the user mentions Asir's preferences.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "asir" with this command: npx skills add xuasir/skills/xuasir-skills-asir

Asir's Preferences

CategoryPreference
Package Managerpnpm
LanguageTypeScript (strict mode, ESM only)
Linting & Formatting@antfu/eslint-config (no Prettier)
TestingVitest
Git Hookssimple-git-hooks + lint-staged
Bundler (Libraries)tsdown
DocumentationVitePress

Core Conventions

TypeScript Config

{
  "compilerOptions": {
    "target": "ESNext",
    "module": "ESNext",
    "moduleResolution": "bundler",
    "strict": true,
    "esModuleInterop": true,
    "skipLibCheck": true,
    "resolveJsonModule": true,
    "isolatedModules": true,
    "noEmit": true
  }
}

ESLint Setup

// eslint.config.mjs
import antfu from '@antfu/eslint-config'

export default antfu()

Fix linting errors with pnpm -r lint --fix. Do NOT add a separate lint:fix script.

For detailed configuration options: antfu-eslint-config

Git Hooks

{
  "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" }
}

Vitest Conventions

  • Test files: foo.tsfoo.test.ts (same directory)
  • Use describe/it API (not test)
  • Use toMatchSnapshot for complex outputs
  • Use toMatchFileSnapshot with explicit path for language-specific snapshots

pnpm Catalogs

Use named catalogs in pnpm-workspace.yaml for version management:

CatalogPurpose
prodProduction dependencies
inlinedBundler-inlined dependencies
devDev tools (linter, bundler, testing)
frontendFrontend libraries

Avoid the default catalog. Catalog names can be adjusted per project needs.


References

TopicDescriptionReference
ESLint ConfigFramework support, formatters, rule overrides, VS Code settingsantfu-eslint-config
Project Setup.gitignore, GitHub Actions, VS Code extensionssetting-up
Library Developmenttsdown bundling, pure ESM publishinglibrary-development
Monorepopnpm workspaces, centralized alias, Turborepomonorepo
Library Coding Patternslibrary-coding-patients

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

web-design-guidelines

No summary provided by upstream source.

Repository SourceNeeds Review
General

tsdown

No summary provided by upstream source.

Repository SourceNeeds Review
General

turborepo

No summary provided by upstream source.

Repository SourceNeeds Review
General

vue-router-best-practices

No summary provided by upstream source.

Repository SourceNeeds Review