longmo

Longmo'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 Longmo'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 "longmo" with this command: npx skills add long36708/longmo-skills/long36708-longmo-skills-longmo

Longmo's Preferences

CategoryPreference
Package Managerpnpm (with @antfu/ni for unified commands)
LanguageTypeScript (strict mode, ESM only)
Linting & Formatting@antfu/eslint-config (no Prettier) + eslint-plugin-oxlint + commitlint
TestingVitest
Git Hookslefthook
Bundler (Libraries)tsdown
DocumentationVitePress

Core Conventions

@antfu/ni Commands

CommandDescription
niInstall dependencies
ni <pkg> / ni -D <pkg>Add dependency / dev dependency
nr <script>Run script
nuUpgrade dependencies
nun <pkg>Uninstall dependency
nciClean install (pnpm i --frozen-lockfile)
nlx <pkg>Execute package (npx)

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'
import oxlint from 'eslint-plugin-oxlint'

export default [
    ...(await antfu({
        vue: {
            overrides: {
                'vue/html-self-closing': 'off',
            },
        },
    })),
    ...oxlint.configs['flat/all'],
]

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

For detailed configuration options: antfu-eslint-config

Commit Message Guidelines

// commitlint.config.mjs
export default {
    extends: ['@commitlint/config-conventional'],
    rules: {
        'type-enum': [
            2,
            'always',
            [
                'feat',     // 新功能
                'fix',      // 修复
                'docs',     // 文档
                'style',    // 代码格式(不影响代码运行的变动)
                'refactor', // 重构
                'perf',     // 性能优化
                'test',     // 测试
                'chore',    // 构建过程或辅助工具的变动
                'ci',       // CI配置
                'revert',   // 回滚
                'build',    // 构建系统
            ],
        ],
        'subject-case': [0], // 不限制 subject 大小写
    },
}

Lefthook Configuration

# Lefthook 配置文件
# 参考:https://github.com/evilmartians/lefthook
pre-commit:
  parallel: true
  commands:
    # 格式化和检查 Vue 文件
    lint-vue:
      glob: '*.vue'
      run: pnpm exec eslint --cache --fix {staged_files}
      fail_text: "ESLint 检查失败,请修复错误后再提交"

    # 格式化和检查 TypeScript/JavaScript 文件
    lint-ts:
      glob: '*.{ts,tsx,js,jsx}'
      run: pnpm exec eslint --cache --fix {staged_files}
      fail_text: "ESLint 检查失败,请修复错误后再提交"

commit-msg:
  commands:
    commitlint:
      run: pnpm exec commitlint --edit {1}
      fail_text: "提交信息不符合规范,请参考 Conventional Commits 规范"
      skip: 'git log -1 --pretty=%s | grep -q "\[skip ci\]"'

Git Hooks

{
	"scripts": {
		"prepare": "lefthook install"
	}
}

务必用 lefthook 更新 pnpm-workspace.yaml onlyBuiltDependencies, 并在根 package.json 中添加 lefthook pnpm.onlyBuiltDependencies, 否则lefthook包的安装后脚本不会被执行,钩子也不会被安装。

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
App DevelopmentVue/Nuxt/UnoCSS conventions and patternsapp-development
Library Developmenttsdown bundling, pure ESM publishinglibrary-development
Monorepopnpm workspaces, centralized alias, Turborepomonorepo

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.

Coding

openclaw-version-monitor

监控 OpenClaw GitHub 版本更新,获取最新版本发布说明,翻译成中文, 并推送到 Telegram 和 Feishu。用于:(1) 定时检查版本更新 (2) 推送版本更新通知 (3) 生成中文版发布说明

Archived SourceRecently Updated
Coding

ask-claude

Delegate a task to Claude Code CLI and immediately report the result back in chat. Supports persistent sessions with full context memory. Safe execution: no data exfiltration, no external calls, file operations confined to workspace. Use when the user asks to run Claude, delegate a coding task, continue a previous Claude session, or any task benefiting from Claude Code's tools (file editing, code analysis, bash, etc.).

Archived SourceRecently Updated
Coding

ai-dating

This skill enables dating and matchmaking workflows. Use it when a user asks to make friends, find a partner, run matchmaking, or provide dating preferences/profile updates. The skill should execute `dating-cli` commands to complete profile setup, task creation/update, match checking, contact reveal, and review.

Archived SourceRecently Updated
Coding

clawhub-rate-limited-publisher

Queue and publish local skills to ClawHub with a strict 5-per-hour cap using the local clawhub CLI and host scheduler.

Archived SourceRecently Updated