{"id":20345,"library":"prettier-plugin-coffeescript","title":"Prettier CoffeeScript Plugin","description":"A Prettier plugin that adds support for formatting CoffeeScript (v2.5.0+) files. Current version 0.1.5, last updated in 2020. Requires a forked version of Prettier (prettier-v2.1.0-dev.100-gitpkg) which may not be stable. Release cadence is sporadic. Unlike other CoffeeScript formatters, this integrates directly with Prettier's ecosystem, enabling consistent formatting across languages. However, due to the forked Prettier dependency and lack of recent maintenance, it may not work with current Prettier releases.","status":"maintenance","version":"0.1.5","language":"javascript","source_language":"en","source_url":"https://github.com/helixbass/prettier-plugin-coffeescript","tags":["javascript","coffeescript","prettier","prettier-plugin"],"install":[{"cmd":"npm install prettier-plugin-coffeescript","lang":"bash","label":"npm"},{"cmd":"yarn add prettier-plugin-coffeescript","lang":"bash","label":"yarn"},{"cmd":"pnpm add prettier-plugin-coffeescript","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Runtime peer dependency for parsing CoffeeScript; version ^2.5.0 required.","package":"coffeescript","optional":false},{"reason":"Forked version required; install from github:helixbass/prettier#prettier-v2.1.0-dev.100-gitpkg.","package":"prettier","optional":false}],"imports":[{"note":"Prettier plugins are auto-discovered based on package name. No manual import required.","wrong":"const plugin = require('prettier-plugin-coffeescript');","symbol":"default","correct":"// No import needed; plugin auto-loads when installed"},{"note":"Use the package name, not path, for Prettier to resolve it.","wrong":"{ \"plugins\": [\"./node_modules/prettier-plugin-coffeescript\"] }","symbol":"plugin","correct":"// Plugins field in .prettierrc: { \"plugins\": [\"prettier-plugin-coffeescript\"] }"},{"note":"Parser is inferred; do not set parser manually.","wrong":"prettier --plugin=prettier-plugin-coffeescript --parser=coffeescript file.coffee","symbol":"options","correct":"// CLI: prettier --plugin=prettier-plugin-coffeescript file.coffee"}],"quickstart":{"code":"// Install dependencies:\n// yarn add --dev coffeescript@^2.5.0 github:helixbass/prettier#prettier-v2.1.0-dev.100-gitpkg prettier-plugin-coffeescript\n// or\n// npm install --save-dev coffeescript@^2.5.0 github:helixbass/prettier#prettier-v2.1.0-dev.100-gitpkg prettier-plugin-coffeescript\n\n// Then create .prettierrc (JSON):\n{\n  \"plugins\": [\"prettier-plugin-coffeescript\"],\n  \"printWidth\": 80,\n  \"tabWidth\": 2\n}\n\n// Format a CoffeeScript file:\n// npx prettier --write path/to/file.coffee","lang":"javascript","description":"Shows installation, configuration, and basic usage of the plugin with Prettier."},"warnings":[{"fix":"Install the forked Prettier from GitHub as described in the README.","message":"Requires a forked version of Prettier (prettier-v2.1.0-dev.100-gitpkg) which is not the official release. May not work with standard Prettier.","severity":"breaking","affected_versions":">=0.1.0"},{"fix":"Consider using an alternative CoffeeScript formatter or contributing to the project.","message":"The plugin has not been updated since 2020 and may be incompatible with newer versions of CoffeeScript or Prettier.","severity":"deprecated","affected_versions":">=0.1.5"},{"fix":"Upgrade CoffeeScript to ^2.5.0.","message":"The plugin expects CoffeeScript v2.5.0 or higher. Older versions will cause parsing errors.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Use yarn or manually verify the installed version in node_modules.","message":"When installing via npm, the forked Prettier dependency may not be resolved correctly without a lockfile.","severity":"gotcha","affected_versions":">=0.1.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"npm install --save-dev github:helixbass/prettier#prettier-v2.1.0-dev.100-gitpkg","cause":"The plugin expects the forked Prettier to be installed, but standard Prettier is not sufficient.","error":"Error: Cannot find module 'prettier'"},{"fix":"Ensure coffeescript@^2.5.0 is installed and the plugin recognizes the correct parser.","cause":"CoffeeScript file uses syntax not supported by the plugin's parser (e.g., v2.5.0+ features).","error":"SyntaxError: Unexpected token"},{"fix":"Ensure the file has .coffee extension and the plugin is listed in .prettierrc's plugins array.","cause":"File extension is not .coffee or the plugin is not properly loaded.","error":"Error: No parser could be inferred for file"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}