Agent skill
eslint-config
Generates ESLint 9+ configuration using flat config format. Creates eslint.config.cjs with Vue and TypeScript linting rules for code quality enforcement.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/eslint-config
SKILL.md
ESLint 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:
eslint.config.cjs(preferred format)
🔍 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:
eslint-plugin-vue- Verify latest version and Vue 3 support@typescript-eslint/eslint-plugin- Verify compatibility with TypeScript versioneslint-plugin-prettier- Check if still recommended or if Prettier should run separately
- Flat Config Format: Verify flat config is still the recommended format (not legacy
.eslintrc.*) - Parser Configuration: Verify
vue-eslint-parserand@typescript-eslint/parserconfiguration syntax - Test Framework Detection:
- Check
package.jsonfor test framework dependencies - If
vitestfound: Useglobals.vitestorglobals.node - If
jestfound: Useglobals.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
package.json"type" field for file format selection
Output
Create the file: eslint.config.cjs
Supported Formats (in order of preference):
eslint.config.cjs(preferred - CommonJS format, works with any package.json type)eslint.config.mjs(ES Module format, explicit ESM)eslint.config.js(follows package.json "type" field)
Format Selection Logic:
- Default: Use
eslint.config.cjs(most compatible) - If package.json has
"type": "module"and user prefers ESM: Consider.mjs .jsformat requires package.json type to match module system
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
.eslintrc.*migration notes needed - Create
eslint.config.cjswith current standards - 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
- ✓
eslint.config.cjs(or.mjs/.js) exists at project root - ✓ 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
.eslintrc.*files exist in project - ✓ 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
.eslintrc.*files and use flat config only - 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:
.cjspreferred for maximum compatibility across all project types - Parser Chain: Vue files use
vue-eslint-parser→@typescript-eslint/parserfor TypeScript - Always verify current standards - ESLint ecosystem evolves rapidly
- Breaking Changes: ESLint major versions may change config format or rule behavior
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?