This package consumes:
-
Made for Pulsar!
This package was written specifically for Pulsar and did not exist in the Atom package repository.
prettier-plus
Pulsar plugin for formatting files using Prettier.
Fork of prettier-atom.
Features
- Format on command: Format the active editor via
prettier-plus:format(Ctrl+Alt+F). - Format project: Format all files in open projects via
prettier-plus:format-project(Ctrl+Alt+Shift+F). Walks every project directory, skips files that Prettier doesn't handle or that.prettierignoreexcludes, and writes back only changed files. Progress is reported in a notification. - Format on save: Automatically format files when saving, with fine-grained control over which files to include or exclude.
- Glob filtering: Include or exclude files from format-on-save using glob patterns.
- Respect
.eslintignore: Optionally skip files listed in.eslintignore. - Prettier config support: Reads all standard Prettier config formats (
.prettierrc,.prettierrc.json,.prettierrc.js,prettier.config.js,package.json, etc.) via Prettier's built-inresolveConfig. - Status bar indicator: Optional status bar tile showing format-on-save state.
- Linter integration: Reports Prettier errors via the
linterservice. - Debug mode: Enable
Debug Modein settings to log Prettier detection, resolution paths, and formatting details to the developer console. - Prettier 3: Ships with Prettier 3 and runs it in a child process to avoid Electron compatibility issues.
- Lightweight: Simplified fork with minimal dependencies — no bundled ESLint or Stylelint, no lodash, no forced packages.
Installation
To install prettier-plus search for prettier-plus in the Install pane of the Pulsar settings or run ppm install prettier-plus. Alternatively, you can run ppm install asiloisad/pulsar-prettier-plus to install a package directly from the GitHub repository.
Commands
Commands available in atom-workspace:
prettier-plus:format-project: format all files in open projects,prettier-plus:toggle: toggle format on save,prettier-plus:debug: show debug information.
Commands available in atom-text-editor:
prettier-plus:format: format the active editor.
How it works
Prettier runs in a child process (child_process.fork) so that Prettier 3's async API works correctly inside Electron's renderer. The child process is spawned lazily on first format and shared across all editors.
Prettier resolution order:
- Local — walks up from the file's directory (bounded by the project root) looking for
node_modules/prettier/index.cjsorindex.js. - Global — checks global npm and Yarn module paths.
- Bundled — falls back to the Prettier version shipped with this package.
Contributing
Got ideas to make this package better, found a bug, or want to help add new features? Just drop your thoughts on GitHub — any feedback's welcome!