{"id":25716,"library":"hairballs","title":"Hairballs","description":"Shared utilities for lint reporters, including ESLint and SCSS-Lint. Version 0.3.3 is current, with infrequent releases. Provides formatting and reporting helpers. Minimal dependencies, but some security fixes were applied in v0.3.0 for Handlebars vulnerabilities. Not widely used; primarily for internal tooling at ratherblue.","status":"maintenance","version":"0.3.3","language":"javascript","source_language":"en","source_url":"https://github.com/ratherblue/hairballs","tags":["javascript","eslint","scss-lint","team city"],"install":[{"cmd":"npm install hairballs","lang":"bash","label":"npm"},{"cmd":"yarn add hairballs","lang":"bash","label":"yarn"},{"cmd":"pnpm add hairballs","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Used for templating in reporters; had prototype pollution vulnerability before v0.3.0","package":"handlebars","optional":true}],"imports":[{"note":"Package does not export a default, but some users might try default import; actual export is named.","wrong":"const hairballs = require('hairballs')","symbol":"default","correct":"import hairballs from 'hairballs'"},{"note":"ESM only; CJS require will not work.","wrong":"const { formatResults } = require('hairballs')","symbol":"formatResults","correct":"import { formatResults } from 'hairballs'"},{"note":"Named export; TypeScript definitions not officially provided.","symbol":"createReporter","correct":"import { createReporter } from 'hairballs'"}],"quickstart":{"code":"import { formatResults } from 'hairballs';\nconst results = formatResults({\n  errors: [{ message: 'Unexpected var', line: 1, column: 5 }],\n  warnings: []\n});\nconsole.log(results);","lang":"typescript","description":"Demonstrates importing formatResults and formatting a lint result object."},"warnings":[{"fix":"Update to v0.3.0 or later.","message":"handlebars dependency had a prototype pollution vulnerability before v0.3.0","severity":"deprecated","affected_versions":"<0.3.0"},{"fix":"Declare module or use .d.ts file.","message":"No TypeScript definitions; use with @ts-ignore or create own types.","severity":"gotcha","affected_versions":"all"},{"fix":"Test reporters with new versions.","message":"v0.3.0 updated dependencies, potentially breaking if relying on old Handlebars behavior.","severity":"breaking","affected_versions":">=0.3.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run npm install hairballs.","cause":"Package not installed or not in node_modules.","error":"Cannot find module 'hairballs'"},{"fix":"Use import { formatResults } from 'hairballs'.","cause":"Using default import instead of named import.","error":"TypeError: hairballs.formatResults is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}