tanstack-config
БесплатноБез исполняемых скриптовНе проверенOpinionated toolkit for building, versioning, and publishing high-quality JavaScript/TypeScript packages.
от tanstack-skills★ 38 звёзд на GitHubОб этом скилле
Overview
TanStack Config provides an opinionated, minimal-configuration toolkit for JavaScript/TypeScript package development. It includes Vite-powered build configuration, ESLint presets, publish automation with semantic versioning, and integrations with TypeScript, Prettier, Changesets, and GitHub Actions. Designed for monorepo workflows with pnpm and Nx.
Package: @tanstack/config
Status: Stable
Installation
npm install @tanstack/config --save-dev
# or
pnpm add @tanstack/config -D
Vite Build Configuration
Basic Setup
// vite.config.ts
import { defineConfig, mergeConfig } from 'vitest/config'
import { tanstackViteConfig } from '@tanstack/config/vite'
const config = defineConfig({
// Your custom Vite config
})
export default mergeConfig(
config,
tanstackViteConfig({
entry: './src/index.ts',
srcDir: './src',
exclude: ['./src/__tests__'],
})
)
Multiple Entry Points
import { tanstackViteConfig } from '@tanstack/config/vite'
export default tanstackViteConfig({
entry: [
'./src/index.ts',
'./src/adapters.ts',
'./src/utils.ts',
],
srcDir: './src',
})
Build Options
tanstackViteConfig({
entry: './src/index.ts',
srcDir: './src',
exclude: ['./src/__tests__', './src/**/*.test.ts'],
// Generates ESM and CJS outputs
// Generates .d.ts declaration files
// Handles tree-shaking configuration
})
ESLint Configuration
Basic Setup
// eslint.config.js
import { tanstackEslintConfig } from '@tanstack/config/eslint'
export default tanstackEslintConfig
Extending the Config
// eslint.config.js
import { tanstackEslintConfig } from '@tanstack/config/eslint'
export default [
...tanstackEslintConfig,
{
rules: {
// Custom overrides
'@typescript-eslint/no-explicit-any': 'warn',
},
},
]
Publishing
Publish Configuration
// publish.config.ts or used via CLI
import { tanstackPublishConfig } from '@tanstack/config/publish'
export default tanstackPublishConfig({
// Publint-compliant defaults
// Semantic versioning automation
// Changelog generation
})
Package.json Setup
{
"name": "@myorg/my-package",
"version": "0.0.0",
"type": "module",
"main": "dist/cjs/index.cjs",
"module": "dist/esm/index.js",
"types": "dist/esm/index.d.ts",
"exports": {
".": {
"import": {
"types": "./dist/esm/index.d.ts",
"default": "./dist/esm/index.js"
},
"require": {
"types": "./dist/cjs/index.d.cts",
"default": "./dist/cjs/index.cjs"
}
}
},
"files": ["dist", "src"],
"scripts": {
"build": "vite build",
"lint": "eslint .",
"test": "vitest"
}
}
TypeScript Configuration
tsconfig.json
{
"compilerOptions": {
"strict": true,
"target": "ES2020",
"module": "ESNext",
"moduleResolution": "bundler",
"declaration": true,
"declarationMap": true,
"sourceMap": true,
"outDir": "./dist",
"rootDir": "./src",
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true
},
"include": ["src"],
"exclude": ["node_modules", "dist"]
}
Changesets Integration
Setup
npx changeset init
Creating a Changeset
npx changeset
# Interactive prompt: select packages, bump type, summary
Changeset Config
// .changeset/config.json
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch"
}
GitHub Actions Workflow
CI/CD Pipeline
# .github/workflows/ci.yml
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- run: pnpm install
- run: pnpm build
- run: pnpm lint
- run: pnpm test
Publish Workflow
# .github/workflows/publish.yml
name: Publish
on:
push:
branches: [main]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: 'https://registry.npmjs.org'
- run: pnpm install
- run: pnpm build
- name: Create Release Pull Request or Publish
uses: changesets/action@v1
with:
publish: pnpm publish -r
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Monorepo Setup (pnpm + Nx)
Workspace Config
Установить tanstack-config в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл tanstack-config?
Opinionated toolkit for building, versioning, and publishing high-quality JavaScript/TypeScript packages.
Как установить скилл tanstack-config?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл tanstack-config запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic