{"library":"prettier-plugin-nginx","title":"Prettier for NGINX","description":"prettier-plugin-nginx is a Prettier plugin that formats NGINX configuration files (.nginx, .nginxconf). Version 1.0.3 ships TypeScript types and targets modern Prettier (v2+). It is written in TypeScript and depends only on Prettier. Differentiators: opinionated formatting with configurable alignment, parameter wrapping, and continuation indentation; supports standard NGINX directives but not extensions like lua-nginx-module. Release cadence is low; last release was 2024.","language":"javascript","status":"active","last_verified":"Sat Apr 25","install":{"commands":["npm install prettier-plugin-nginx"],"cli":null},"imports":["import prettier from 'prettier-plugin-nginx'","import * as prettier from 'prettier'; const options = { plugins: ['prettier-plugin-nginx'] }","import { alignUniversally } from 'prettier-plugin-nginx'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import prettier from 'prettier';\nimport nginxPlugin from 'prettier-plugin-nginx';\n\nconst code = `server {\n    listen 80;\n    server_name example.com;\n    location / { proxy_pass http://proxy; } }`;\n\nprettier.format(code, {\n  parser: 'nginx',\n  plugins: [nginxPlugin],\n  alignDirectives: true,\n  wrapParameters: true\n}).then(result => console.log(result));","lang":"typescript","description":"Formats an NGINX config string using Prettier with the plugin, enabling directive alignment and parameter wrapping.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}