Skip to content
SPECIFICTION
Get listed

Fantomas vs Prettier

Fantomas

fsprojects.github.io

Prettier

prettier.io

Side by side

FigureFantomasPrettier
Price fromFreeFree
Free planYesYes
Free trial——
Open source—Yes
WebYesYes
WindowsYesYes
macOSYesYes
LinuxYesYes
API—Yes
Self-hosted—Yes
Plans published12
Spec score · Code Formatting Tools8.0 (#9)8.5 (#2)
ConfigurationA limited set of formatting options can be stored in `.editorconfig` and read automatically by the command line tool.Configuration can use JSON, YAML, TOML, JavaScript or TypeScript files, with overrides for selected files and directories.
Editor integrationsThe maker provides setup guides for JetBrains Rider, Visual Studio Code, and Visual Studio.The official site lists integrations or support for VS Code, WebStorm, Visual Studio, Vim, Emacs, Sublime Text, Nova and Espresso.

Plans

Fantomas

  • FantomasFree

Fantomas pricing →

Prettier

  • Open-source PrettierFree
  • PrettierFree

Prettier pricing →

In their own words

Fantomas

Fantomas formats F# source code according to configuration, using default rules based on Microsoft’s F# style guide. Settings are also available for G-Research conventions. It runs as a .NET tool, and local installation is recommended when a repository needs to keep a fixed version. The command line accepts folders or files with `.fs`, `.fsi`, `.fsx`, `.ml` or `.mli` extensions; source files are expected to parse with the F# compiler before formatting. A limited selection of options can be placed in `.editorconfig` for automatic use by the command-line tool. For continuous integration checks, `dotnet fantomas check` reports formatting drift and exits with a failure code when files need formatting. Setup guides are available for JetBrains Rider, Visual Studio Code and Visual Studio, and the official site links to an online tool for trying the formatter and its settings. Fantomas and its library are available under the Apache 2.0 license. The project is described as an fsprojects incubation project. It is free and open source, with web access listed alongside Linux, macOS and Windows.

Visit fsprojects.github.io

Prettier

Prettier is an open-source code formatter that parses source files and prints them in a consistent style while accounting for line length. Its built-in languages include JavaScript, JSX, Angular, Vue, Flow, TypeScript, CSS, Less, SCSS, HTML, JSON, GraphQL, Markdown, YAML, LWC, and MJML. The command-line interface can write formatted files with --write or check formatting with --check in continuous integration. Listed editor integrations include VS Code, Emacs, Vim, Helix, Sublime Text, JetBrains IDEs, Visual Studio, and Espresso; formatting can run from a shortcut or on save. Prettier has configuration options but keeps them limited. Plugins can add languages and formatting rules, and languages outside the built-in set require a plugin. For ESLint integration, the installation guidance recommends eslint-config-prettier to disable rules that are unnecessary or may conflict. Prettier supports browser and JavaScript API use, along with Linux, macOS, and Windows. The listed plan is free. Commercial support and maintenance are available through the Tidelift Subscription.

Visit prettier.io