eslint-plugin

Create and validate custom ESLint plugins and rules with test-driven development.

5|Updated Mar 16, 2019
One-click install
npx skills add https://github.com/third774/dotfiles --skill eslint-plugin
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: eslint-plugin
Source: https://github.com/third774/dotfiles/tree/main/opencode/skill/eslint-plugins
Command: npx skills add https://github.com/third774/dotfiles --skill eslint-plugin

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you author custom ESLint plugins and rules with test-driven development, enabling teams to enforce project-specific standards across flat (eslint.config.js) and legacy (.eslintrc.*) configs.

Core Features & Use Cases

  • Config format detection: automatically identify flat vs legacy ESLint configurations.
  • Test-driven rules: develop rules with @typescript-eslint/rule-tester for reliable validation.
  • Rule coverage: craft problem, suggestion, and layout rules, with optional auto-fixers.
  • TypeScript-aware linting: integrate type information for accurate rule evaluation.
  • Migration guidance: help migrate from deprecated rules to modern custom rules.

Quick Start

Scaffold a new ESLint plugin with a sample rule that flags console.log usage and includes tests using @typescript-eslint/rule-tester. Ensure compatibility with both eslint.config.js and .eslintrc.* formats.

Frequently Asked Questions about eslint-plugin

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create custom ESLint rules for project-specific coding standards?▼

Custom ESLint rules enforce project-specific standards by defining detection logic and fixes. Use test-driven development with @typescript-eslint/rule-tester to validate rules against problem, suggestion, and layout scenarios, then apply them via eslint.config.js or .eslintrc.* formats across your codebase.

Can I write ESLint rules that work with both flat config and legacy configuration formats?▼

Yes. ESLint plugins support both eslint.config.js (flat config) and .eslintrc.* (legacy) formats. Detect your project's config format automatically and scaffold rules compatible with both, ensuring your custom rules integrate seamlessly regardless of which format your team uses.

How do I test ESLint rules with TypeScript type information?▼

Test ESLint rules using @typescript-eslint/rule-tester to validate TypeScript-aware linting. This framework enables you to write test cases that verify rules correctly evaluate type information, auto-fixers, and suggestions in real TypeScript code.

What's the best way to migrate deprecated ESLint rules to custom implementations?▼

Build custom ESLint rules to replace deprecated ones by analyzing the original rule's detection and fix logic. Use test-driven development to ensure your custom rule covers the same scenarios, then gradually roll it out across flat and legacy ESLint configurations.

Do I need special setup to enable auto-fixers and suggestions in custom ESLint rules?▼

No special setup required. ESLint plugins support auto-fixers and suggestions natively. Define fix functions in your rule implementation, test them with @typescript-eslint/rule-tester, and they integrate directly into ESLint's output and editor workflows.

Can custom ESLint rules enforce domain-specific patterns in large codebases?▼

Yes. Custom rules detect domain-specific patterns—naming conventions, API usage, architectural boundaries—and enforce them at scale. Test-driven development ensures rules are precise, and flat or legacy config distribution applies them consistently across all projects.