{"id":41804,"library":"purs-tidy","title":"purs-tidy","description":"A syntax formatter for PureScript, version 0.11.1. It formats PureScript source code in place or via STDIN/STDOUT, and supports checking if files are already formatted (useful for CI). It is the primary formatter for the PureScript ecosystem, offering configurable indentation, arrow style, and operator precedence via a pre-baked table or custom generation. Editor integrations for Spacemacs, Vim, and VS Code are available. Releases are stable with a maintenance focus.","status":"active","version":"0.11.1","language":"javascript","source_language":"en","source_url":"https://github.com/natefaubion/purescript-tidy","tags":["javascript","PureScript","formatter","format"],"install":[{"cmd":"npm install purs-tidy","lang":"bash","label":"npm"},{"cmd":"yarn add purs-tidy","lang":"bash","label":"yarn"},{"cmd":"pnpm add purs-tidy","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required to compile the PureScript source after formatting; purs-tidy itself is a formatting tool that expects valid PureScript syntax.","package":"purs","optional":true}],"imports":[{"note":"purs-tidy is primarily a CLI tool; the programmatic API is not officially documented and may change. Use the CLI directly for reliability.","wrong":"const format = require('purs-tidy')","symbol":"format","correct":"import { format } from 'purs-tidy'"},{"note":"Same as format; programmatic API is experimental.","wrong":"const check = require('purs-tidy').check","symbol":"check","correct":"import { check } from 'purs-tidy'"},{"note":"Same as above.","wrong":"const formatInPlace = require('purs-tidy').formatInPlace","symbol":"formatInPlace","correct":"import { formatInPlace } from 'purs-tidy'"}],"quickstart":{"code":"npm install -g purs-tidy && echo \"module Main where\\nmain = do\\n  log \\\"Hello, World!\\\"\" > MyFile.purs && purs-tidy format < MyFile.purs","lang":"typescript","description":"Installs purs-tidy globally, creates a simple PureScript file, and formats it via STDIN."},"warnings":[{"fix":"Run `spago sources | xargs purs-tidy generate-operators > .tidyoperators` and configure with --operators .tidyoperators.","message":"purs-tidy uses a pre-baked operator precedence table that may not match local operator definitions. Use the generate-operators command to create a project-specific table.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Use the CLI via child_process.exec or similar instead of direct imports.","message":"The programmatic API (import { format } from 'purs-tidy') is not officially supported and may break without notice. Prefer CLI usage.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Do not use --arrow-last; instead remove it or use --arrow-first.","message":"The `--arrow-last` option is deprecated in favor of `--arrow-first` (which is the default).","severity":"deprecated","affected_versions":">=0.10.0"},{"fix":"Use version control (git) before running `purs-tidy format-in-place`.","message":"Formatting with `format-in-place` modifies files directly without creating backups. Ensure version control or backups are in place.","severity":"gotcha","affected_versions":">=0.1.0"}],"env_vars":null,"search_vec":"'0.11.1':10 'alreadi':27 'arrow':44 'avail':67 'bake':53 'check':23 'ci':31 'code':15,65 'configur':42 'custom':56 'ecosystem':40 'editor':58 'file':25 'focus':74 'format':12,28,78 'formatt':6,36,77 'generat':57 'indent':43 'integr':59 'javascript':75 'mainten':73 'offer':41 'oper':47 'place':17 'pre':52 'pre-bak':51 'preced':48 'primari':35 'pur':2 'purescript':8,13,39,76 'purs-tidi':1 'releas':68 'sourc':14 'spacemac':61 'stabl':70 'stdin/stdout':20 'style':45 'support':22 'syntax':5 'tabl':54 'tidi':3 'use':29 'version':9 'via':19,49 'vim':62 'vs':64","created_at":"2026-06-04T18:54:11.227669+00:00","updated_at":"2026-06-04T18:54:11.227669+00:00","problems":[{"fix":"Run: npm install -g purs-tidy","cause":"purs-tidy is not installed globally or locally.","error":"Error: Cannot find module 'purs-tidy'"},{"fix":"Add `$(npm root -g)/bin` to your PATH or install locally with npx.","cause":"Global npm bin directory is not in PATH.","error":"purs-tidy: command not found"},{"fix":"Use --arrow-first or omit the option (default is arrow-first).","cause":"The --arrow-last option was removed in a newer version.","error":"purs-tidy: unrecognized option '--arrow-last'"}],"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/natefaubion/purescript-tidy#readme","github":"https://github.com/natefaubion/purescript-tidy","docs":null,"changelog":null,"pypi":null,"npm":"purs-tidy","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"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}}