eslint-plugins_skill

This skill helps you author custom ESLint plugins and rules using test-driven development, ensuring robust, maintainable linting with auto-fixes.
  • Shell

3

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill third774/dotfiles --skill eslint-plugins

  • SKILL.md7.5 KB

Overview

This skill helps you author custom ESLint plugins and rules using test-driven development. It supports both ESLint flat config (v9+) and legacy formats, includes TypeScript-aware rules, and guides creation of problem, suggestion, and layout rules with idempotent auto-fixes.

How this skill works

Follow a TDD workflow: ask edge-case questions, write failing tests with @typescript-eslint/rule-tester, then implement the rule to satisfy tests. The skill provides templates for rule files, tests, type-aware logic, and plugin packaging for flat and legacy configs, plus guidance on fixer APIs and common AST selectors.

When to use it

  • Enforcing project-specific coding standards or patterns
  • Adding auto-fixers or suggestions to automate small refactors
  • Creating TypeScript-aware rules that need type information
  • Migrating or replacing deprecated rules in a codebase
  • Authoring plugin bundles for shared or organization-wide rules

Best practices

  • Always write tests before implementation and confirm failing tests first
  • Ask the edge-case questions up front (file types, exemptions, fix vs suggest)
  • Ensure fixes are idempotent—applying them twice should be a no-op
  • Include coverage for main case, no-op, idempotency, edge cases, and options
  • Detect project config and test runner to pick the correct RuleTester setup

Example use cases

  • Create a rule that replaces a deprecated API call with a new one and auto-fixes call sites
  • Enforce import ordering and provide suggestions for reordering without breaking type-only imports
  • Write a TypeScript rule that flags misuse of enums using parser services and type checks
  • Bundle multiple rules into a plugin with a recommended flat-config profile for ESLint 9+
  • Add a layout rule that normalizes trailing commas with an idempotent fixer

FAQ

Detect the project's devDependencies: use bun:test for Bun, vitest for Vitest, or jest for Jest and wire RuleTester.describe/it accordingly.

How do I test rules that need TypeScript type information?

Use @typescript-eslint/parser in RuleTester languageOptions, enable projectService with appropriate patterns, and obtain services via ESLintUtils.getParserServices(context).

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational
eslint-plugins skill by third774/dotfiles | VeilStrat