Claude-skill-registry eslint-config
Generates ESLint 9+ configuration using flat config format. Creates eslint.config.cjs with Vue and TypeScript linting rules for code quality enforcement.
git clone https://github.com/majiayu000/claude-skill-registry
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/eslint-config" ~/.claude/skills/majiayu000-claude-skill-registry-eslint-config && rm -rf "$T"
skills/data/eslint-config/SKILL.mdESLint Config Skill
Purpose
Generate ESLint configuration file for code linting with Vue and TypeScript support using ESLint 9+ flat config format.
🚨 MANDATORY FILE COUNT
This skill MUST create exactly 1 file:
(preferred format)eslint.config.cjs
🔍 BEFORE GENERATING - CRITICAL RESEARCH REQUIRED
⚠️ HIGH PRIORITY: Verify current ESLint standards to prevent outdated code generation
Required Research Steps:
- ESLint Version: Verify current ESLint version supports flat config (9.0+)
- Plugin Compatibility: Check all plugins are compatible with current ESLint version:
- Verify latest version and Vue 3 supporteslint-plugin-vue
- Verify compatibility with TypeScript version@typescript-eslint/eslint-plugin
- Check if still recommended or if Prettier should run separatelyeslint-plugin-prettier
- Flat Config Format: Verify flat config is still the recommended format (not legacy
).eslintrc.* - Parser Configuration: Verify
andvue-eslint-parser
configuration syntax@typescript-eslint/parser - Test Framework Detection:
- Check
for test framework dependenciespackage.json - If
found: Usevitest
orglobals.vitestglobals.node - If
found: Usejestglobals.jest - If both or neither: Prompt user which test framework to use
- Check
- Deprecated Rules: Check if any rules have been deprecated or renamed
- Module Format: Verify project's module system from
"type" field for file format selectionpackage.json
Output
Create the file:
eslint.config.cjs
Supported Formats (in order of preference):
(preferred - CommonJS format, works with any package.json type)eslint.config.cjs
(ES Module format, explicit ESM)eslint.config.mjs
(follows package.json "type" field)eslint.config.js
Format Selection Logic:
- Default: Use
(most compatible)eslint.config.cjs - If package.json has
and user prefers ESM: Consider"type": "module".mjs
format requires package.json type to match module system.js
Example File
See:
examples.md in this directory for complete examples and detailed explanations.
⚠️ IMPORTANT: The examples.md file contains December 2025 configurations. Always verify current standards before using.
Execution Checklist
- Research current ESLint version and flat config status (ESLint 9+)
- Verify all plugin versions and compatibility
- Check for deprecated rules or configuration options
- Detect test framework from package.json dependencies
- If test framework unclear, prompt user
- Verify parser configuration syntax for Vue and TypeScript
- Check if legacy
migration notes needed.eslintrc.* - Create
with current standardseslint.config.cjs - Verify file format matches project module system
🛑 BLOCKING VALIDATION CHECKPOINT
STOP! Before proceeding to the next skill, verify:
Automated Verification
Run this command to verify the file exists:
if [ -f "eslint.config.cjs" ] || [ -f "eslint.config.mjs" ] || [ -f "eslint.config.js" ]; then echo "✓ ESLint configuration found" if [ -f "eslint.config.cjs" ]; then echo "✓ Using eslint.config.cjs (preferred format)" elif [ -f "eslint.config.mjs" ]; then echo "⚠ Using eslint.config.mjs (ESM format)" else echo "⚠ Using eslint.config.js (verify package.json type field)" fi # Check for legacy format (should not exist) if [ -f ".eslintrc.js" ] || [ -f ".eslintrc.json" ] || [ -f ".eslintrc.yml" ]; then echo "✗ Legacy .eslintrc.* file found - remove and use flat config only" exit 1 fi else echo "✗ ESLint configuration missing" exit 1 fi
Manual Verification
- ✓
(oreslint.config.cjs
/.mjs
) exists at project root.js - ✓ File uses ESLint 9+ flat config format (array export, not legacy object)
- ✓ File includes Vue, TypeScript, and Prettier plugins
- ✓ Test file configuration uses correct globals for detected test framework
- ✓ No legacy
files exist in project.eslintrc.* - ✓ All plugin versions are compatible with ESLint version
- ✓ Configuration follows current ESLint best practices
If Validation Fails
DO NOT PROCEED to the next skill. Create or fix the missing/incorrect file immediately.
Notes
- ESLint 9+ Flat Config: Uses modern flat config format (not legacy
).eslintrc.* - Migration from Legacy: If upgrading, remove
files and use flat config only.eslintrc.* - Plugin Compatibility: Always verify plugin versions match ESLint version
- Test Framework Globals: Auto-detected from package.json (Vitest or Jest)
- Console/Debugger: Allowed in development, warnings in production
- Special Rules: Separate configurations for test files and TypeScript declaration files
- Prettier Integration: ESLint runs Prettier as a rule (verify this is current best practice)
- Module Format:
preferred for maximum compatibility across all project types.cjs - Parser Chain: Vue files use
→vue-eslint-parser
for TypeScript@typescript-eslint/parser - Always verify current standards - ESLint ecosystem evolves rapidly
- Breaking Changes: ESLint major versions may change config format or rule behavior