This guide covers the installation and basic setup for all three Zayne Labs config packages.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/zayne-labs/config/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Before installing, ensure you have:- Node.js 18.x or higher (20.x+ for ESLint config)
- A package manager: pnpm (recommended), npm, or yarn
Quick Start
- ESLint Config
- Prettier Config
- TypeScript Config
The fastest way to get started with ESLint config is using the interactive CLI:The CLI will guide you through:
- Framework selection (React, Vue, Astro, Solid)
- Additional integrations (TailwindCSS, TanStack, etc.)
- Automatic dependency installation
Package Installation
ESLint Config
Install the package
Required peer dependency: ESLint 9.x.x is required. Node.js 20.x or higher is also required.
Create configuration file
Create This zero-config setup works out of the box with TypeScript, JSX, JSON, YAML, TOML, Markdown, and more.
eslint.config.js in your project root:Framework-Specific Dependencies
Install additional peer dependencies based on your framework:React
React
Vue
Vue
Astro
Astro
Solid
Solid
Optional Integrations
TailwindCSS
TailwindCSS
For enhanced Tailwind class sorting and validation:
TanStack Query & Router
TanStack Query & Router
React Native (Expo)
React Native (Expo)
Prettier Config
Optional Plugins
TailwindCSS & ClassNames
TailwindCSS & ClassNames
For Tailwind class sorting and multi-line formatting:Enable in your config:Advanced configuration:
Astro
Astro
For Astro component formatting:Enable in your config:
Auto-Installation: When you enable a feature that requires additional plugins, the config will prompt you to install them automatically when you run
prettier --write .TypeScript Config
Choose your configuration
Select the appropriate config based on your project type:Using a bundler (Vite, Webpack, etc.):Using tsc to compile:
Available Configurations
- Bundler Configs
- TSC Configs
- Base Config
For projects using external bundlers (Vite, Webpack, Rollup, etc.):
Interactive CLI Guide
The ESLint config includes an interactive CLI that simplifies setup:Choose integrations
Select additional tools:
- TailwindCSS (better-tailwindcss plugin)
- TanStack Query
- TanStack Router
CLI Options
Skip prompts and use default values:Verification
After installation, verify your setup:Next Steps
ESLint Setup
Complete guide for ESLint configuration and IDE setup
ESLint Customization
Customize rules and advanced configuration options
Framework Support
Configure ESLint for React, Vue, Astro, Solid, and more
Prettier Setup
Configure Prettier with smart import sorting
Troubleshooting
ESLint: Peer dependencies not installed
ESLint: Peer dependencies not installed
If you see warnings about missing peer dependencies, install them manually:All peer dependencies are listed as optional, so you only need to install the ones for frameworks and integrations you’re using.
Prettier: Plugin not found
Prettier: Plugin not found
Ensure you’ve installed the required plugins for features you’ve enabled. For example, if The config will prompt you to install missing plugins when you run Prettier.
tailwindcss: true, you need:TypeScript: Cannot find module
TypeScript: Cannot find module
Make sure you’re using the correct import path. All TypeScript configs are exported from specific paths:Check the Available Configurations section for the complete list.
Node.js version mismatch
Node.js version mismatch
Each package has specific Node.js requirements:
- ESLint config: Node.js 20.x or higher
- Prettier config: Node.js 18.x or higher
- TypeScript config: Any recent Node.js version
