agentleFS
casooncasoon/ai-agent-config/skills/biome/SKILL.md

biome

Skill1 starsChanged 47 days agoMITView on GitHub

Biome configuration for linting and formatting — single tool replacing ESLint and Prettier, with Astro/Svelte/Tailwind quirks and pre-commit wiring. Use for lint errors, formatting rules, and code-style questions.

5 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Files
SKILL.md

Biome

Biome is the single tool for linting and formatting. No ESLint, no Prettier.

Configuration (biome.json)

{
  "$schema": "https://biomejs.dev/schemas/2.4.8/schema.json",
  "files": {
    "includes": ["**/*.js", "**/*.ts", "**/*.mjs", "**/*.cjs",
                 "**/*.json", "**/*.astro", "**/*.svelte", "**/*.css"]
  },
  "formatter": {
    "indentStyle": "space",
    "indentWidth": 2,
    "lineWidth": 100
  },
  "linter": {
    "rules": {
      "recommended": true,
      "correctness": { "noUnusedVariables": "warn", "noUnusedImports": "warn" },
      "suspicious": { "noExplicitAny": "warn", "noVar": "error" },
      "style": { "useConst": "error" }
    }
  },
  "javascript": {
    "formatter": { "quoteStyle": "single", "trailingCommas": "es5", "semicolons": "always" }
  },
  "json": {
    "formatter": { "trailingCommas": "none" }
  },
  "css": {
    "parser": { "cssModules": false, "tailwindDirectives": true },
    "formatter": { "enabled": true },
    "linter": { "enabled": true }
  }
}

Commands

pnpm check          # lint + format check (no changes)
pnpm check:fix      # auto-fix lint + format issues
pnpm format         # format only (writes)

Pre-commit hook

Husky + lint-staged runs Biome on staged files only:

"lint-staged": {
  "*.{js,mjs,cjs,ts,tsx,json,astro,svelte,css}": [
    "biome check --write --no-errors-on-unmatched"
  ]
}

Known quirks

Tailwind CSS directives

tailwindDirectives: true in the CSS parser config is required. Without it, Biome reports errors on @source, @theme, @apply, @custom-variant, and other Tailwind-specific at-rules.

@source ordering

Biome's noInvalidPositionAtImportRule requires @source to appear after all @import statements:

/* Correct */
@import "tailwindcss";
@import "./styles/global.css";
@import "@fontsource/inter/latin-400.css";

@source "./src/components";

/* Wrong — Biome error */
@source "./src/components";
@import "@fontsource/inter/latin-400.css";

False-positive unused imports in .astro

Biome cannot see template usage of imports in .astro files. Imports used only in the template (not in the frontmatter script) may trigger noUnusedImports. Keep the rule at "warn", not "error", to avoid blocking valid code.

.svelte file support

Biome supports .svelte for formatting and linting. Runes and {#if} blocks are handled correctly.

Code style

RuleSettingMeaning
QuotesSingle (')import x from 'y'
SemicolonsAlwaysconst x = 1;
Trailing commasES5Arrays, objects, parameters
Indent2 spacesNo tabs
Line width100Max chars per line
constRequireduseConst: "error"
varForbiddennoVar: "error"
anyWarnednoExplicitAny: "warn"

Fixing common issues

pnpm check:fix                              # fix everything auto-fixable
npx biome check src/pages/index.astro       # check a single file
npx biome format --write src/app.css        # format a single file

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.