lint-rule-development

Create, implement, test, and configure Biome lint rules.

25.5k|1.2k|Updated Jul 27, 2023
One-click install
npx skills add https://github.com/biomejs/biome --skill lint-rule-development
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: lint-rule-development
Source: https://github.com/biomejs/biome/tree/main/.claude/skills/lint-rule-development
Command: npx skills add https://github.com/biomejs/biome --skill lint-rule-development

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill streamlines the process of creating, implementing, and testing new lint rules within the Biome codebase, significantly reducing the boilerplate and complexity involved in contributing to the project.

Core Features & Use Cases

  • Scaffolding: Quickly generate the necessary file structure and boilerplate code for new lint rules across different languages.
  • Implementation Guidance: Provides code examples and patterns for writing rule logic, including handling AST nodes and semantic analysis.
  • Testing Workflows: Details methods for both quick, iterative testing and comprehensive snapshot testing.
  • Configuration: Guides on adding configurable options to rules for greater flexibility.
  • Use Case: A developer wants to add a new lint rule to Biome that flags the use of a deprecated JavaScript API. They can use this Skill to generate the rule's files, implement the detection logic, write tests, and ensure it's configurable.

Quick Start

Generate a new JavaScript lint rule named 'noDeprecatedApi' using the provided scaffolding commands.

Frequently Asked Questions about lint-rule-development

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

FAQPage Schema
How do I create a new lint rule in Biome?

To create a Biome lint rule, use this Skill to scaffold the necessary file structure and boilerplate, implement the AST and semantic analysis logic, and configure snapshot tests.

What is the process for testing Biome lint rules during development?

Testing Biome lint rules involves using quick iterative tests for fast feedback and snapshot tests for comprehensive validation, ensuring your rule logic correctly flags target code patterns.

Does Biome lint rule development support languages other than JavaScript?

Yes, Biome lint rule development supports creating rules for JavaScript, CSS, JSON, and GraphQL, allowing you to scaffold and implement logic across multiple language structures.

How do I add configurable options to a custom Biome rule?

You can add configurable options to a custom Biome rule by following the configuration guidance provided, allowing users to customize rule behavior for greater flexibility.

What do I need to know to implement code actions for Biome lint rules?

Implementing code actions requires understanding AST nodes and semantic analysis to automatically fix flagged issues, utilizing provided code examples and patterns within the Biome project structure.

Are there limitations when scaffolding rules for the Biome codebase?

Rule development is limited to the Biome project structure and currently supports JavaScript, CSS, JSON, and GraphQL, meaning you must work within the Rust-based Biome codebase to contribute.