mcpField
C
code-formatting

code-formatting

github.com/pollinationsDevelopment5.3k83 installsUpdated today
Repository

About code-formatting

A repository skill that runs Biome on JavaScript, TypeScript, and JSON files changed on the current branch. It offers a branch script and supports choosing a comparison branch.

Key features

  1. 01Finds files changed from a base branch
  2. 02Filters JS, TS, and JSON formats
  3. 03Runs `npx biome check --write`
  4. 04Uses repository Biome configuration
  5. 05Supports a custom base branch

Use cases

  1. 01Format files changed on the current branch
  2. 02Run formatting against a `develop` base
  3. 03Apply the repository's CI formatting settings

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/pollinations/pollinations --skill code-formatting

After installing, type/code-formattingin Claude Code to confirm it loaded.

Bundled filesscripts/format-branch.sh

Details

From the project README

Code Formatting

Format JS/TS/JSON files changed on the current branch using Biome.

Quick Usage

.claude/skills/code-formatting/scripts/format-branch.sh

This formats all .js, .ts, .jsx, .tsx, .json, .jsonc files changed compared to main.

Custom Base Branch

.claude/skills/code-formatting/scripts/format-branch.sh develop

What It Does

  1. Finds files changed on current branch vs base branch
  2. Filters to JS/TS/JSON files only
  3. Runs npx biome check --write on those files
  4. Uses same settings as the ci-pull-request-checks.yml CI workflow

Config

Biome config is at biome.jsonc in repo root.

Notes

  • Run from repo root
  • Requires Node.js/npx
  • Only formats changed files (not entire codebase)

Comments

Markdown supported