Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
116 changes: 116 additions & 0 deletions extensions/biome/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
# Dependencies
node_modules/
.pnp
.pnp.js

# Build outputs
dist/
build/
*.tsbuildinfo

# Environment variables
.env
.env.local
.env.development.local
.env.test.local
.env.production.local

# Logs
logs/
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Runtime data
pids/
*.pid
*.seed
*.pid.lock

# Coverage directory used by tools like istanbul
coverage/
*.lcov

# nyc test coverage
.nyc_output/

# Dependency directories
node_modules/
jspm_packages/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# parcel-bundler cache (https://parceljs.org/)
.cache/
.parcel-cache/

# Next.js build output
.next/

# Claude Code
.claude/
.mcp.json

# Nuxt.js build / generate output
.nuxt/
dist/

# Gatsby files
.cache/
public/

# Storybook build outputs
.out/
.storybook-out/

# Temporary folders
tmp/
temp/

# IDE
.vscode/
.idea/
*.swp
*.swo
*~

# OS
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db

# Bun
bun.lockb
.bun/

# Cache
.cache/
.turbo/

# Raycast specific
.raycast/
35 changes: 35 additions & 0 deletions extensions/biome/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Biome Changelog

## [Initial Release] - {PR_MERGE_DATE}

### Features

#### Search Biome Rules
- Browse all 381+ Biome linter rules with comprehensive metadata
- Filter by 8 categories: A11y, Complexity, Correctness, Nursery, Performance, Security, Style, Suspicious
- View rule details: recommended status, fixable flag, and version introduced
- Sort rules by version (newest first, from v2.3.6 to v2.0.4)
- Quick actions: copy rule name, copy rule ID, copy configuration snippet
- View detailed rule information with biome.json configuration examples
- Direct links to official Biome documentation for each rule
- Smart display: shows category when viewing all rules, description when filtered by category
- Cache management with 24-hour TTL and manual refresh (Cmd+R)

#### Search Releases
- Browse all Biome releases sorted by version
- View full changelogs for each release
- Direct GitHub links to release pages
- Release metadata including publish dates

#### Search Documentation
- Quick access to Biome's official documentation
- Search through guides and references

### Technical Details
- Built with Raycast API v1.103.6 and TypeScript 5.8.2
- Uses Bun runtime for performance
- Fetches data from Biome's official JSON schemas and GitHub API
- Includes fallback data for offline usage
- Automated scripts to regenerate rule version mappings and metadata
- Rule version tracking across all Biome releases since v2.0.4
- Metadata includes recommended/fixable flags for all 381 rules
143 changes: 143 additions & 0 deletions extensions/biome/CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
# CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

## Repository Purpose

This is a **Raycast Extension** that provides quick access to Biome documentation. Raycast is a macOS/Windows productivity tool that allows developers to create custom commands and extensions.

## Quick Reference

### Development Commands

```bash
# Start development server (hot reload)
npm run dev

# Build extension for distribution
npm run build

# Run linting (ESLint)
npm run lint

# Fix linting issues automatically
npm run fix-lint

# Publish to Raycast Store
npm run publish
```

## Architecture Overview

### Project Structure

```
src/
├── search-documentation.tsx # Main command component (entry point)
assets/
├── extension-icon.png # Extension icon
package.json # Dependencies and scripts
tsconfig.json # TypeScript configuration
eslint.config.js # ESLint configuration
```

### How It Works

The extension exposes a single Raycast command: **"Search Documentation"**

1. **Entry Point**: `src/search-documentation.tsx`
- Exports default React component that serves as the command UI
- Uses Raycast API components (`List`, `ActionPanel`, `Detail`, etc.)
- Currently displays a basic list item with a greeting detail

2. **Component Pattern**:
- Raycast commands are React components
- Use Raycast API hooks and components for UI (no custom styling needed)
- Actions are defined via `ActionPanel` for command interactions
- Navigation between views uses `Action.Push`

### Raycast API Essentials

- **List**: Main list view component for displaying items
- **Detail**: View for displaying markdown or rich content
- **ActionPanel**: Container for actions available to user
- **Action**: Individual actions (Push, Open, Copy, etc.)
- **Icon**: Raycast built-in icon library

## Tech Stack

- **Runtime**: Node.js (TypeScript)
- **UI Framework**: React 19 with JSX
- **API**: Raycast API (`@raycast/api` and `@raycast/utils`)
- **Language**: TypeScript 5.8.2 (strict mode enabled)
- **Linter**: ESLint with Raycast config
- **Formatter**: Prettier
- **Build Tool**: Raycast CLI (`ray` command)

## Code Style

- **Quotes**: Double quotes (Raycast convention)
- **JSX**: React 19 with automatic JSX transform
- **Target**: ES2023 with commonjs modules
- **React**: Functional components with hooks

## Key Files

- **package.json**: npm scripts use `ray` CLI (Raycast command-line tool)
- **tsconfig.json**: Strict TypeScript, React 19 JSX transform
- **eslint.config.js**: Extends `@raycast/eslint-config`

## Common Development Tasks

### Adding a New Command

1. Create new file in `src/my-new-command.tsx`
2. Export a default React component
3. Add entry to `package.json` commands array:
```json
{
"name": "my-new-command",
"title": "My Command Title",
"description": "Command description",
"mode": "view"
}
```
4. Use Raycast API components for UI

### Testing Changes

```bash
npm run dev
```

This launches the Raycast development environment where you can test commands in real-time with hot reload.

### Building for Distribution

```bash
npm run build
```

Creates optimized build ready for Raycast Store submission. Always build before publishing.

## Environment

- **Platforms**: macOS and Windows (specified in package.json)
- **Raycast API Version**: ^1.103.6
- **Node Version**: 22+ (based on @types/node 22.13.10)

## Resources

- **Raycast API Docs**: https://developers.raycast.com
- **Extension Schema**: https://www.raycast.com/schemas/extension.json (referenced in package.json)
- **Official Examples**: Raycast GitHub organization has many example extensions

## Development Workflow

1. Make changes to TypeScript/React files in `src/`
2. Run `npm run dev` to test in Raycast environment
3. Use `npm run fix-lint` to fix any linting issues
4. When ready, run `npm run build`
5. Test thoroughly before running `npm run publish`
- dont use NPM but only bun please
- dont use interfaces, just types
82 changes: 82 additions & 0 deletions extensions/biome/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# Biome

Quickly search and browse Biome linter rules, releases, and documentation directly from Raycast.

## Features

### Search Biome Rules
- Browse all 381+ Biome linter rules with detailed information
- Filter by category (A11y, Complexity, Correctness, Nursery, Performance, Security, Style, Suspicious)
- View rule metadata: recommended status, fixable flag, and introduction version
- Sorted by version (newest rules first)
- Quick actions: copy rule name, copy rule ID, copy configuration snippet
- View detailed rule information with configuration examples
- Direct links to official Biome documentation

### Search Releases
- Browse all Biome releases with full changelogs
- View release details and GitHub links
- Quick access to version information

### Search Documentation
- Search through Biome's official documentation
- Quick access to guides and references

## How to Use

### Search Rules
1. Open Raycast and type "Search Biome Rules"
2. Browse all rules or use the search bar to filter
3. Use **Cmd+P** to filter by category
4. Press **Enter** on any rule to view detailed information
5. Use **Cmd+C** to copy the rule name
6. Use **Cmd+Shift+C** to copy the rule ID
7. Press **Cmd+R** to refresh the rules cache

### Browse Releases
1. Open Raycast and type "Search Releases"
2. Browse all Biome releases sorted by version
3. Press **Enter** to view full release notes
4. Click the GitHub link to view the release on GitHub

## Cache Management

The extension caches rule data for 24 hours to improve performance. To manually refresh:
- Open "Search Biome Rules"
- Press **Cmd+R** to clear cache
- Reopen the command to fetch fresh data

## Data Sources

- **Rules**: Fetched from Biome's official JSON schema (biomejs.dev/schemas)
- **Releases**: Fetched from GitHub API (github.com/biomejs/biome/releases)
- **Metadata**: Includes 381 rules with version tracking since v2.0.4

## Development

Built with:
- Raycast API v1.103.6
- TypeScript 5.8.2
- Bun runtime

### Scripts
```bash
bun run dev # Development mode with hot reload
bun run build # Build extension for distribution
bun run lint # Run linting checks
bun run fix-lint # Fix linting issues automatically
bun run build-versions # Regenerate rule version mappings
```

### Data Generation
The extension includes scripts to regenerate rule data:
- `scripts/build-rule-versions.ts` - Fetches all Biome releases and generates version mappings
- `scripts/generate-fallback.ts` - Creates fallback data with proper versioning

## About Biome

[Biome](https://biomejs.dev) is a fast formatter and linter for JavaScript, TypeScript, JSX, JSON, and CSS. It's designed to be a performant alternative to Prettier and ESLint.

## License

MIT
Binary file added extensions/biome/assets/extension-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions extensions/biome/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
const { defineConfig } = require("eslint/config");
const raycastConfig = require("@raycast/eslint-config");

module.exports = defineConfig([
...raycastConfig,
]);
Binary file added extensions/biome/metadata/biome-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added extensions/biome/metadata/biome-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added extensions/biome/metadata/biome-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading