Registry /
devops / prettier-plugin-coffeescript
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslnode 18–226 runs
build_error
glibcnode 18–226 runs
build_error
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
default
✓ // No import needed; plugin auto-loads when installed
✗ const plugin = require('prettier-plugin-coffeescript');
Prettier plugins are auto-discovered based on package name. No manual import required.
plugin
✓ // Plugins field in .prettierrc: { "plugins": ["prettier-plugin-coffeescript"] }
✗ { "plugins": ["./node_modules/prettier-plugin-coffeescript"] }
Use the package name, not path, for Prettier to resolve it.
options
✓ // CLI: prettier --plugin=prettier-plugin-coffeescript file.coffee
✗ prettier --plugin=prettier-plugin-coffeescript --parser=coffeescript file.coffee
Parser is inferred; do not set parser manually.
Shows installation, configuration, and basic usage of the plugin with Prettier.
// Install dependencies:
// yarn add --dev coffeescript@^2.5.0 github:helixbass/prettier#prettier-v2.1.0-dev.100-gitpkg prettier-plugin-coffeescript
// or
// npm install --save-dev coffeescript@^2.5.0 github:helixbass/prettier#prettier-v2.1.0-dev.100-gitpkg prettier-plugin-coffeescript
// Then create .prettierrc (JSON):
{
"plugins": ["prettier-plugin-coffeescript"],
"printWidth": 80,
"tabWidth": 2
}
// Format a CoffeeScript file:
// npx prettier --write path/to/file.coffee
Errors
Common errors & fixes
Error: Cannot find module 'prettier'
The plugin expects the forked Prettier to be installed, but standard Prettier is not sufficient.
fixnpm install --save-dev github:helixbass/prettier#prettier-v2.1.0-dev.100-gitpkg
SyntaxError: Unexpected token
CoffeeScript file uses syntax not supported by the plugin's parser (e.g., v2.5.0+ features).
fixEnsure coffeescript@^2.5.0 is installed and the plugin recognizes the correct parser.
Error: No parser could be inferred for file
File extension is not .coffee or the plugin is not properly loaded.
fixEnsure the file has .coffee extension and the plugin is listed in .prettierrc's plugins array.
Audit
Dependencies
coffeescriptrequiredRuntime peer dependency for parsing CoffeeScript; version ^2.5.0 required.
prettierrequiredForked version required; install from github:helixbass/prettier#prettier-v2.1.0-dev.100-gitpkg.