CLI and API formatter for Nginx configuration files. Version 1.4.5, released under MIT license. Ships TypeScript types. Differentiated from nginxbeautifier by adding empty line trimming after '{' and before '}', TypeScript API, and test consistency. Supports glob patterns, indent style (space/tab), alignment, and trailing blank lines. Requires Node >=14.18.0.
npm install nginx-config-formatterNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates both formatFile and formatContent usage with options.
Ensure you intend to format all .conf files in the directory tree, or specify a single file.
Use TypeScript or ensure option types match the OptionType interface.
Validate your config beforehand or use nginx -t to check syntax.
Check that the path exists and that the process has read permissions.
Change to import { formatFile } from 'nginx-config-formatter'.Run npm install fast-glob or reinstall the package.