{"id":40740,"library":"coffee-fmt","title":"coffee-fmt","description":"CoffeeScript formatter/beautifier inspired by gofmt, version 0.12.0 (last released 2018, no recent updates). It formats CoffeeScript code with options for indent style and size. Differentiates via golang-like philosophy but limited adoption and potential bugs in edge cases. Supports CLI and JS API. Note: CoffeeScript itself is deprecated.","status":"abandoned","version":"0.12.0","language":"javascript","source_language":"en","source_url":"https://github.com/sterpe/coffee-fmt","tags":["javascript","coffee","coffeescript","fmt","gofmt","format","formatter","beautify","beautifier"],"install":[{"cmd":"npm install coffee-fmt","lang":"bash","label":"npm"},{"cmd":"yarn add coffee-fmt","lang":"bash","label":"yarn"},{"cmd":"pnpm add coffee-fmt","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Package supports CJS require; there is no default export for ESM.","wrong":"const fmt = require('coffee-fmt')","symbol":"default","correct":"import fmt from 'coffee-fmt'"},{"note":"No named export for ESM; use default import or CJS destructuring.","wrong":"import { format } from 'coffee-fmt'","symbol":"format","correct":"const { format } = require('coffee-fmt')"},{"note":"Wrong path; format is a method on the default export.","wrong":"const format = require('coffee-fmt/format')","symbol":"format","correct":"const fmt = require('coffee-fmt'); fmt.format(code, opts)"}],"quickstart":{"code":"const fmt = require('coffee-fmt');\nconst fs = require('fs');\nconst coffee = fs.readFileSync('example.coffee', 'utf8');\ntry {\n  const formatted = fmt.format(coffee, { tab: '  ', newLine: '\\n' });\n  console.log(formatted);\n} catch (e) {\n  console.error('Formatting failed:', e.message);\n}","lang":"javascript","description":"Reads CoffeeScript file, formats with 2-space indent, outputs to stdout."},"warnings":[{"fix":"Use try-catch block as shown in the API example.","message":"Parsing may throw unhandled errors on malformed CoffeeScript; always wrap in try-catch.","severity":"gotcha","affected_versions":"*"},{"fix":"Use a modern language instead.","message":"CoffeeScript language is deprecated; consider migrating to JavaScript/TypeScript.","severity":"deprecated","affected_versions":"*"},{"fix":"Set indent_size only with space indent_style.","message":"Indent_size option is ignored when using tab indent_style.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Set --debug=false or redirect stderr separately.","message":"Debug output goes to stdout, not stderr; may interfere with output redirection.","severity":"gotcha","affected_versions":"*"}],"env_vars":null,"search_vec":"'0.12.0':10 '2018':13 'adopt':36 'api':47 'beautifi':60,61 'bug':39 'case':42 'cli':44 'code':20 'coffe':2,54 'coffee-fmt':1 'coffeescript':4,19,49,55 'deprec':52 'differenti':28 'edg':41 'fmt':3,56 'format':18,58 'formatt':59 'formatter/beautifier':5 'gofmt':8,57 'golang':31 'golang-lik':30 'indent':24 'inspir':6 'javascript':53 'js':46 'last':11 'like':32 'limit':35 'note':48 'option':22 'philosophi':33 'potenti':38 'recent':15 'releas':12 'size':27 'style':25 'support':43 'updat':16 'version':9 'via':29","created_at":"2026-06-04T18:49:02.452442+00:00","updated_at":"2026-06-04T18:49:02.452442+00:00","problems":[{"fix":"Use const fmt = require('coffee-fmt'); then fmt.format(...)","cause":"Incorrect import: using default import from ESM expecting named export.","error":"TypeError: fmt.format is not a function"},{"fix":"Run 'npm install coffee-fmt' in your project.","cause":"Package not installed globally or locally.","error":"Cannot find module 'coffee-fmt'"},{"fix":"Validate your CoffeeScript code before formatting.","cause":"Input contains invalid CoffeeScript syntax (e.g., stray characters).","error":"SyntaxError: Unexpected token ILLEGAL"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/sterpe/coffee-fmt","github":"https://github.com/sterpe/coffee-fmt","docs":null,"changelog":null,"pypi":null,"npm":"coffee-fmt","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devtools"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-04","next_check":"2026-09-02","install_tag":null}}