{"_id":"prettier-plugin-nginx","_rev":"7-087bdefbd8f16abc5c1061e021b5f142","name":"prettier-plugin-nginx","dist-tags":{"latest":"2.0.0"},"versions":{"1.0.0":{"name":"prettier-plugin-nginx","version":"1.0.0","keywords":["nginx","prettier","prettier-plugin","configuration","format","autoformat","autoformatter"],"author":{"name":"Joe Dean","email":"joe@joedean.dev"},"license":"MIT","_id":"prettier-plugin-nginx@1.0.0","maintainers":[{"name":"joedeandev","email":"joe@joedean.dev"}],"homepage":"https://github.com/joedeandev/prettier-plugin-nginx","bugs":{"url":"https://github.com/joedeandev/prettier-plugin-nginx/issues"},"dist":{"shasum":"ba791fc0bac2c4862d47bbaf4f62a7dc87171300","tarball":"https://registry.npmjs.org/prettier-plugin-nginx/-/prettier-plugin-nginx-1.0.0.tgz","fileCount":12,"integrity":"sha512-6KsRYQRwx3sRn+l+xieXvP1pzhrq211isyXrdHZYYwyLL4808Qz+f99pYL6nS9SGHJEMXjhCC2nUsPvZEh5t/g==","signatures":[{"sig":"MEQCIElB8LH37J+kWgNapgyM7Z3543XXdzH9t99Me8+lYhdxAiAVqqMz4Oay+GbbP3Pttafp8DQBzMHzRNmmND03jjF2sg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":55424,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiEN45ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqp/A/8C9NYSsWPtAkdSw5LQuSHbMbGHZAwxcgxcTDw1RFanuReDRqB\r\nKfSb6EEgOIK7BM0e4aK08hLMT2Xnv2L6uYr/5yuigz2nRPuW0+13mkPUwhIg\r\ntfRFzqej7UJjxzZIB2Lm5bY7lvmM2EAGbGzR9fU8QPQmJDmyOov74CzhoMPK\r\naD3wNAgrYYOovT9Ehd4KYK8TUEAH2Q+SEPehS6V2THi0QU+LrTxPa3F4U3I0\r\nPdRp0zffQxfpmFGBooYOPZlCDwsYDMHFqCFHwoW3x23un+FtKgcQ7pdLxWBT\r\n6GT5CPbfXz7xfZ2MF216vykv7RuR6IWeXjXmrQwMXZ5UjoFvORDZJlGNGrQo\r\nQybiazvCjralLAWhi0SMMZ7Vkl/PC/Bv06BZ5AabJ9feQjQbA+Wix3XvCKb3\r\nDYa8OEYbXXikluiPGQ2yNvdJzr+V+SPrJpin6bZ8eSsB8k8/hrfp/CDdw8+d\r\nS7dhY5ZAagXa2ye+CWaJAEBiWhvuuKNBnAqJz4VyzpHuV7+65z8mUC9V15Y1\r\nFzcqJctH7HnxIZ2Fe4nsWwzhBPixzVSMr7RkS7BmsW6/4EbSgChAIvYOTzG6\r\nKdRrE0ghqr0SG+CVffKUASX12xoHeX8V9kuRpW8QwrRrgYWtF2GWVcqyy7bB\r\nbWqKZxjCdGBAUoOTJ3MZiolpa1PpKKSNesU=\r\n=1vxC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index","types":"dist/index","gitHead":"4a237aa82a6c681a374158c599ce06ee32d3a318","scripts":{"test":"npm run build-test && cd dist-test && node index.js","build":"tsc","build-test":"npm run build && tsc -p tsconfig.tests.json && cp -r ./test/files/. ./dist-test/files"},"_npmUser":{"name":"joedeandev","email":"joe@joedean.dev"},"repository":{"url":"git+https://github.com/joedeandev/prettier-plugin-nginx.git","type":"git"},"_npmVersion":"8.3.1","description":"NGINX configuration plugin for Prettier","directories":{},"_nodeVersion":"16.14.0","_hasShrinkwrap":false,"devDependencies":{"prettier":"^2.5.1","typescript":"^4.5.5","@types/node":"^17.0.16","@types/prettier":"^2.4.3"},"_npmOperationalInternal":{"tmp":"tmp/prettier-plugin-nginx_1.0.0_1645272633149_0.4124615630875412","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"prettier-plugin-nginx","version":"1.0.1","keywords":["nginx","prettier","prettier-plugin","configuration","format","autoformat","autoformatter"],"author":{"name":"Joe Dean","email":"joe@joedean.dev"},"license":"MIT","_id":"prettier-plugin-nginx@1.0.1","maintainers":[{"name":"joedeandev","email":"joe@joedean.dev"}],"homepage":"https://github.com/joedeandev/prettier-plugin-nginx","bugs":{"url":"https://github.com/joedeandev/prettier-plugin-nginx/issues"},"dist":{"shasum":"b08ffee926d6a7d75f7ef6d032146ec7675b7da9","tarball":"https://registry.npmjs.org/prettier-plugin-nginx/-/prettier-plugin-nginx-1.0.1.tgz","fileCount":12,"integrity":"sha512-DLljDbUOleKmLg1dReB26ZcsMjUkkplR8/I78CMALKVeDbfzwWAz7yRGD9AjBDS3feHNK7ghBVBidCgGq9tWMg==","signatures":[{"sig":"MEYCIQD6GqfT5oHL3HgwwjY7cSyEc+vue5ds5VAQe3ji3pc5ZQIhAPxoT32s7Vu9YYZJAzncudWCiwD8ABN/lsfuaZFTNF0k","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":56531,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiEPMMACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq8Lw/+PGZMMDc+nm2SO8uabmFCCqrFa4Fngn6Hyj2o5sdP6DA0hKal\r\na4CdMrXoTulnBw+BpqSyS+4bmtO1tHAcLcoovNq9oe+c3UzbXrUkB30keC3y\r\n9Acvo9Dvx1o6++t64ihl04HYVsG/1jfj98EmdzmC2JspdxKI/YAxbHMO1oP2\r\nYRqJ1ouFvGF93Vq8Bax8HJxSWFGlm4BQPOBx7EQBJTtlXVS350RGmZU+pkT3\r\nh9GGi2z68wJ6oj86Lk+CowbFIu1BxsWb1HH3ntoAbod0QMDhUJn0bV8MxxDT\r\nCsATKa8m6ddMW62yfhrNjaCHMEEzzC9AI2Wj4Oz2qUhA/m8F936OyX9V03fq\r\nR+eNUYXFu0+hWcC4XHSgBR1PQDB5J1BmKezPLxCfpR4WO83/1TFanrfgy9qO\r\nvjJiPH98w5Md3xcCDnwkU4JXcr/QfaRqELRdzhi+JqzITS1LF3cJ1BoLl1FI\r\nOSCoCGr2inCJyGPqLpXVM0rnL53GHUxoCvPWDJoo1WvrlVVgBKaaOxre60XN\r\nKVRYfOIXUEEhAfTM+KXoLSkZCkQ1FJUT6klPU5nWxq1ik0TfUBzBtDEQxa6Z\r\ngDNFvoCdUGCHZbL8WqvGgbBG42Tb1edR2ZNmuyBbMQyEm+UoAoH5mKyodJCN\r\nbw6plf6rifmrJJcwtxsg/hsc0wg8z7gZ0+E=\r\n=3Kgc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index","types":"dist/index","gitHead":"2c747f7a4ea252a5b79a0df6bcf2b43ba704e7fe","scripts":{"test":"npm run build-test && cd dist-test && node index.js","build":"tsc","build-test":"npm run build && tsc -p tsconfig.tests.json && mkdir -p ./dist-test/files && cp -r ./test/files/. ./dist-test/files"},"_npmUser":{"name":"joedeandev","email":"joe@joedean.dev"},"repository":{"url":"git+https://github.com/joedeandev/prettier-plugin-nginx.git","type":"git"},"_npmVersion":"8.3.1","description":"NGINX configuration plugin for Prettier","directories":{},"_nodeVersion":"16.14.0","_hasShrinkwrap":false,"devDependencies":{"prettier":"^2.5.1","typescript":"^4.5.5","@types/node":"^17.0.16","@types/prettier":"^2.4.3"},"_npmOperationalInternal":{"tmp":"tmp/prettier-plugin-nginx_1.0.1_1645277964508_0.31218866207831764","host":"s3://npm-registry-packages"}},"1.0.2":{"name":"prettier-plugin-nginx","version":"1.0.2","keywords":["nginx","prettier","prettier-plugin","configuration","format","autoformat","autoformatter"],"author":{"name":"Joe Dean","email":"joe@joedean.dev"},"license":"MIT","_id":"prettier-plugin-nginx@1.0.2","maintainers":[{"name":"joedeandev","email":"joe@joedean.dev"}],"homepage":"https://github.com/joedeandev/prettier-plugin-nginx","bugs":{"url":"https://github.com/joedeandev/prettier-plugin-nginx/issues"},"dist":{"shasum":"3646524339048dd84a10a7db8599aca43cf7dde4","tarball":"https://registry.npmjs.org/prettier-plugin-nginx/-/prettier-plugin-nginx-1.0.2.tgz","fileCount":9,"integrity":"sha512-yrrOhiOawqhbLT0Zg4cr30+M8atRdr9A0IYAN9geDLimEROeJNJ8ejN5dsfw0mFOhiZ0YaQWw0AXHa0qTbz0+g==","signatures":[{"sig":"MEYCIQDEK+z83SD3jI9m2DUdMhWHOFTldxEj2ZTBIeMR8qFpzgIhAMZ8L0nkOs23vMgEN4vXqyqRlIL7ybIpaY9rbSzkPtxT","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50764,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiG5r/ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo/FA//akNzuhADJkCrxh6ZYavGNMouxfOPJXaRnp7tORkAKXvbKygA\r\nFQOK5UNjhg/C65thl35uvDNACghXxsJM9G4W0dISZeT7IZl1ZElzIRCbkSXD\r\n1wrL9wWVTCnLWqVNhlo/od4Ovkgxdd7R4+HkVJmwz0AQFKgFwYAtHnpz9F0E\r\ntXYK03/LmOVOfPRo5QOvTQ3W3dMRpeS/ZS8pkgCeIAVLoSifVurRzh36YABD\r\n+7BI/PZn5zOWPS23gVevWwrIwY6mUdJz9EeCqLjl4mRxUIRoj4N0e3xG9oP5\r\nvX/KLv2qX00kXvSJbtsSYcTmbLRMOiynfCkd/G+v5FvdCOu4rrul5qfbA4Rv\r\njNZbbTj0x1KEae+u5bmSrLDUDnHBv4ymILR6Cu96vWyxOrafKYqw+FKTnG8U\r\nxhK5kTYoYOMiAL/YxdzcFL6w2cS1MwpfY78jB307MaEpm7MOGnpS85Jl8DrO\r\n2v4tlgdkRSSTdXOtDJrNqX19mLzHhxE30J4Nx0s7VnDa4XX/WkWEvDIKK3Rh\r\nuYr4PyW5+zsMwURWtwSgmUo7OF++ujFS+wkEJFmA1retXgIOYWb8Tso9iQDE\r\nGjISV/bqlY9+lwXuynK4cJmGeApvDJVskg/1MnP/IZbZUfysHWv6mnRqye/i\r\nZ0d45MXO2orIJhgmHywOaZSOHUycsV++ooI=\r\n=aC6I\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index","types":"dist/index","gitHead":"e23d79cbb22cc35ebb003022a9caffc27cdd316c","scripts":{"test":"npm run build-test && cd dist-test && node index.js","build":"tsc","build-test":"npm run build && tsc -p tsconfig.tests.json && mkdir -p ./dist-test/files && cp -r ./test/files/. ./dist-test/files"},"_npmUser":{"name":"joedeandev","email":"joe@joedean.dev"},"repository":{"url":"git+https://github.com/joedeandev/prettier-plugin-nginx.git","type":"git"},"_npmVersion":"8.3.1","description":"NGINX configuration plugin for Prettier","directories":{},"_nodeVersion":"16.14.0","_hasShrinkwrap":false,"devDependencies":{"prettier":"^2.5.1","typescript":"^4.5.5","@types/node":"^17.0.16","@types/prettier":"^2.4.3"},"_npmOperationalInternal":{"tmp":"tmp/prettier-plugin-nginx_1.0.2_1645976318908_0.6327833452842109","host":"s3://npm-registry-packages"}},"1.0.3":{"name":"prettier-plugin-nginx","version":"1.0.3","keywords":["nginx","prettier","prettier-plugin","configuration","format","autoformat","autoformatter"],"author":{"name":"Joe Dean","email":"joe@joedean.dev"},"license":"MIT","_id":"prettier-plugin-nginx@1.0.3","maintainers":[{"name":"joedeandev","email":"joe@joedean.dev"}],"homepage":"https://github.com/joedeandev/prettier-plugin-nginx","bugs":{"url":"https://github.com/joedeandev/prettier-plugin-nginx/issues"},"dist":{"shasum":"11133cb13369130a8160eac3e2d6f808f868e445","tarball":"https://registry.npmjs.org/prettier-plugin-nginx/-/prettier-plugin-nginx-1.0.3.tgz","fileCount":9,"integrity":"sha512-vV5q85s8XnV6NEgvz1gVLfZhmxAxY03MyOYj2ApBpjFkbs00lRsRkTmqO9L39ADuD18z1RRCcfZ3eVxKhI/nqg==","signatures":[{"sig":"MEQCIDFvLVmphZVPpDV7aMAjUognmnygmIN9yVr0UUXmNcoBAiB0kWu/IckNJan1VFsgEOuL5iYV+P3s743k8xvUEozIhw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50762,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkFEZrACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoG6w/+NK48Q6SdbdO//MeCsggFpXX4XkCoVMEXLHtBqBYlIF4Zkly8\r\nXmI9+/IpJTgWUzYUSQ7b3uW9ug2JWRaNFxh9wYoeGUDU9e+XXoIrtaDtmrYQ\r\n9GyWkBt3KFBTBQb2TZhfEdTPefNyKiVVDk77L4IJT5CgzACNQaz+1TP7Gqlb\r\nLNFh+Z4+IzgvvEE4zPA0v5eievyLdbX29/xiHeTSbc7NYT9SLzVMv8KQlB+V\r\n08dRxKX7yNikkjQ34k9Z42I1yVu+8xbXsZ5aikZjHaglSBA8U0rHa+OPpGD6\r\nOU53cpCDpCuBs9btQgUH7NVMQfc1UKY3NyZzfC55YEENn7fy9xi4wndkZPvn\r\nQbdDQwVo8iM95NS2UxLE+lGALZ8HGan0U2YzyCY54lRin5allnWwi85vqoR/\r\n96uB1xCWFw75NWrYY9HiJRcV4v0ELou3L3nrHzQh9r56TNwLzor4ohMMWm+i\r\naiLR+asNyxiI0SgYdu1EQmo7sCbrHHsSuRF0rqsONJeEWNQnw12rdozGx79S\r\nvk/5N9FK7EeT2k5qrln3PksVFvpa7NULHSowFN72m8/G4BT38aN8SoKhZJtl\r\nTxsnyl2houpVuvZ7N8AnNM7mg8p+6HmS7Ddeu7yiZIgAIketi1U80lrKZoSQ\r\nlWoc1lc6uQ92QCegidYRc41AYHl3vm9Jkbo=\r\n=qDOp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index","types":"dist/index","gitHead":"b3c840f4bac1373c2dc984825e3dad3308fcbcbe","scripts":{"test":"npm run build-test && cd dist-test && node index.js","build":"tsc","build-test":"npm run build && tsc -p tsconfig.tests.json && mkdir -p ./dist-test/files && cp -r ./test/files/. ./dist-test/files"},"_npmUser":{"name":"joedeandev","email":"joe@joedean.dev"},"repository":{"url":"git+https://github.com/joedeandev/prettier-plugin-nginx.git","type":"git"},"_npmVersion":"8.19.3","description":"NGINX configuration plugin for Prettier","directories":{},"_nodeVersion":"16.19.1","_hasShrinkwrap":false,"devDependencies":{"prettier":"^2.8.4","typescript":"^5.0.0","@types/node":"^18.15.3","@types/prettier":"^2.7.2"},"_npmOperationalInternal":{"tmp":"tmp/prettier-plugin-nginx_1.0.3_1679050347214_0.5342066768171658","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"prettier-plugin-nginx","version":"2.0.0","description":"NGINX configuration plugin for Prettier","author":{"name":"Joe Dean","email":"joe@jxd.dk","url":"https://jxd.dk"},"license":"MIT","type":"module","main":"./dist/cjs/index.js","module":"./dist/esm/index.js","types":"./dist/esm/index.d.ts","exports":{".":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/cjs/index.d.ts","default":"./dist/cjs/index.js"}},"./package.json":"./package.json"},"sideEffects":false,"engines":{"node":">=18"},"homepage":"https://github.com/jxddk/prettier-plugin-nginx","repository":{"type":"git","url":"git+https://github.com/jxddk/prettier-plugin-nginx.git"},"bugs":{"url":"https://github.com/jxddk/prettier-plugin-nginx/issues"},"keywords":["nginx","openresty","prettier","prettier-plugin","configuration","format","autoformat","autoformatter"],"scripts":{"build":"node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && node -e \"require('fs').writeFileSync('dist/cjs/package.json','{\\\"type\\\":\\\"commonjs\\\"}\\n')\"","typecheck":"tsc -p tsconfig.json --noEmit","test":"npm run build && node --test \"test/**/*.test.ts\"","test:update":"UPDATE_FIXTURES=1 node --test \"test/fixtures.test.ts\"","coverage":"npm run build && node --test --experimental-test-coverage --test-coverage-include=\"src/**\" --test-coverage-lines=95 --test-coverage-branches=90 \"test/**/*.test.ts\"","format":"prettier --write .","format:check":"prettier --check .","prepublishOnly":"npm test"},"peerDependencies":{"prettier":"^3.6.0"},"devDependencies":{"@types/node":"26.4.1","prettier":"3.9.6","typescript":"7.0.2"},"gitHead":"f537ba5685806a6e7e4aacf33e1270041c885364","_id":"prettier-plugin-nginx@2.0.0","_nodeVersion":"24.19.0","_npmVersion":"11.17.0","dist":{"integrity":"sha512-fdSsnlYu1CyVrKNgOjEihIJ/32vdwCR3OOUfYCJ+S/phdzmML97Z6VC5KKHlUWRtzGU2Z2juQOdRMyG0QeO0Ng==","shasum":"d799432e155e65bb5a17372167c063c7aeb43056","tarball":"https://registry.npmjs.org/prettier-plugin-nginx/-/prettier-plugin-nginx-2.0.0.tgz","fileCount":45,"unpackedSize":82719,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/prettier-plugin-nginx@2.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCY4kq85hbv1zRqRM/HX0h3UwiZemL2vNpCCoIGwz41rAIhAKzaNepEsznp5y7TOvZfW3FYom8ckpNM0qBoYT/BJ3Ty"}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:04a0de48-f1b8-45f6-8216-a5c6f2c0a231"}},"directories":{},"maintainers":[{"name":"joedeandev","email":"joe@joedean.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/prettier-plugin-nginx_2.0.0_1788481826815_0.5178823044354834"},"_hasShrinkwrap":false}},"time":{"created":"2022-02-19T12:10:33.149Z","modified":"2026-09-04T00:30:27.293Z","1.0.0":"2022-02-19T12:10:33.326Z","1.0.1":"2022-02-19T13:39:24.691Z","1.0.2":"2022-02-27T15:38:39.040Z","1.0.3":"2023-03-17T10:52:27.358Z","2.0.0":"2026-09-04T00:30:26.966Z"},"bugs":{"url":"https://github.com/jxddk/prettier-plugin-nginx/issues"},"author":{"name":"Joe Dean","email":"joe@jxd.dk","url":"https://jxd.dk"},"license":"MIT","homepage":"https://github.com/jxddk/prettier-plugin-nginx","keywords":["nginx","openresty","prettier","prettier-plugin","configuration","format","autoformat","autoformatter"],"repository":{"type":"git","url":"git+https://github.com/jxddk/prettier-plugin-nginx.git"},"description":"NGINX configuration plugin for Prettier","maintainers":[{"name":"joedeandev","email":"joe@joedean.dev"}],"readme":"<div align=\"center\">\n    <img src=\"./.github/images/prettier-plugin-nginx.png\" alt=\"Banner\">\n</div>\n<h1 align=\"center\">Prettier for NGINX</h1>\n\n<hr>\n\nA [Prettier](https://prettier.io) plugin that formats\n[NGINX configuration files](https://nginx.org/en/docs/beginners_guide.html#conf_structure),\nincluding [OpenResty](https://openresty.org) `*_by_lua_block` directives. It is\nwritten in TypeScript, depends only on Prettier, and needs Prettier 3.6 or\nlater.\n\n## Getting Started\n\nInstall [Prettier](https://prettier.io/docs/install) and the plugin:\n\n```shell\nnpm install --save-dev prettier prettier-plugin-nginx\n```\n\nRegister the plugin in your\n[Prettier configuration](https://prettier.io/docs/configuration):\n\n```json\n{\n  \"plugins\": [\"prettier-plugin-nginx\"]\n}\n```\n\nThe plugin formats these files automatically:\n\n- files with the extensions `.nginx`, `.nginxconf` and `.vhost`,\n- `nginx.conf`, `mime.types`, `fastcgi_params`, `fastcgi.conf`, `scgi_params`,\n  `uwsgi_params`, `proxy_params`, `koi-utf`, `koi-win` and `win-utf`,\n- inside a directory named `nginx`: any `.conf` or `.template` file, such as\n  `docker/nginx/default.conf`, and any file in a `sites-available`,\n  `sites-enabled`, `conf.d` or `snippets` directory, such as\n  `/etc/nginx/sites-available/default`, apart from dotfiles, certificates,\n  scripts, logs and backups. List anything else that lives there, such as a\n  `supervisord.conf`, in `.prettierignore`.\n\nTo format other files, assign them the `nginx` parser with an\n[override](https://prettier.io/docs/configuration#configuration-overrides):\n\n```json\n{\n  \"plugins\": [\"prettier-plugin-nginx\"],\n  \"overrides\": [\n    {\n      \"files\": [\"*.conf\", \"sites-enabled/*\"],\n      \"options\": { \"parser\": \"nginx\" }\n    }\n  ]\n}\n```\n\nOr from the command line:\n\n```shell\nnpx prettier --write --plugin prettier-plugin-nginx --parser nginx default.conf\n```\n\n## Example\n\nA messy file like this...\n\n```nginx\nserver {\n# server definition\nlisten 443 ssl; listen [::]:443 ssl;\nserver_name example.com;\nlocation / { proxy_pass http://proxy; proxy_set_header Host $http_host;\nproxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\nproxy_set_header X-Forwarded-Proto $scheme;\nproxy_read_timeout 1000; }\n# end server definition\n}\n```\n\n...is transformed to this:\n\n```nginx\nserver {\n    # server definition\n    listen      443 ssl;\n    listen      [::]:443 ssl;\n    server_name example.com;\n\n    location / {\n        proxy_pass         http://proxy;\n        proxy_set_header   Host $http_host;\n        proxy_set_header   X-Real-IP $remote_addr;\n        proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;\n        proxy_set_header   X-Forwarded-Proto $scheme;\n        proxy_read_timeout 1000;\n    }\n    # end server definition\n}\n```\n\n## Formatting\n\nThis plugin, like Prettier, is\n[opinionated](https://prettier.io/docs/option-philosophy). The style follows the\nconfiguration examples in the [NGINX documentation](https://nginx.org/en/docs/):\n\n- Blocks are indented by one `tabWidth`, four spaces by default. Block\n  directives are separated from their neighbours by a blank line, and a\n  single blank line between other statements is kept; blank lines at the\n  start or end of a block are not.\n- The parameters of the simple directives in a block, or at the top level,\n  are aligned to one column. A name that ends beyond the middle of the line stays out of the\n  alignment, so one long name does not push everything else to the right.\n- Parameters that do not fit within `printWidth` wrap onto continuation\n  lines; the first parameter stays on the directive's line.\n- Comments stay where they are: on their own line, after a `;`, or after a\n  `{` or `}` on the same line. A comment between a directive's parameters\n  ends the line it is on, and one right before the `;` or `{` moves after\n  it, joining any comment already there.\n- Every word is printed exactly as written. Quotes, escapes, regular\n  expressions and multi-line strings are never altered, and an `if`\n  condition is only re-spaced as `if (...)`, on one line. With `endOfLine`\n  set to `crlf`, the line breaks inside multi-line strings change with the\n  rest of the file, and a word continued across lines with a backslash would\n  be split, so keep the default `lf` for such files. `cr` is refused, since\n  NGINX ends comments only at a line feed.\n- `*_by_lua_block` bodies are re-indented as a unit; the Lua inside them is\n  not otherwise changed, and lines inside `[[...]]` long brackets are kept\n  byte for byte. If a Prettier plugin providing a `lua` parser is loaded, the\n  Lua is formatted with it instead.\n- A `# prettier-ignore` comment on its own line keeps the next statement,\n  including a block and its original inner indentation, exactly as written.\n  Other comments and blank lines may sit between the two.\n- Range formatting (`--range-start`, `--range-end`) is not supported; with\n  a range the file is left unchanged.\n- `# @format` or `# @prettier` on the first line works with\n  [`--require-pragma`](https://prettier.io/docs/options#require-pragma) and\n  [`--insert-pragma`](https://prettier.io/docs/options#insert-pragma), and\n  `# @noformat` or `# @noprettier` with `--check-ignore-pragma`.\n\nInvalid configuration, such as a directive without its `;`, is reported as a\nsyntax error with its location; NGINX would reject it too. Template syntax is\nnot supported: `{{ ... }}` is rejected as a stray brace, and `<% ... %>` is\nnot detected at all, so it would be merged into the surrounding directive.\nenvsubst style `${VAR}` references are fine.\n\n## Configuration\n\nThe following options are available.\n\n| API Option           | CLI Option              | Default | Description                                                                                  |\n| -------------------- | ----------------------- | ------- | -------------------------------------------------------------------------------------------- |\n| `printWidth`         | `--print-width`         | `80`    | [Same option as in Prettier](https://prettier.io/docs/options#print-width)                   |\n| `tabWidth`           | `--tab-width`           | `4`     | [Same option as in Prettier](https://prettier.io/docs/options#tab-width)                     |\n| `useTabs`            | `--use-tabs`            | `false` | [Same option as in Prettier](https://prettier.io/docs/options#tabs)                          |\n| `alignDirectives`    | `--align-directives`    | `true`  | Align directive parameters within a block to the same column.                                |\n| `alignUniversally`   | `--align-universally`   | `false` | Align all directive parameters within a file to the same column. Requires `alignDirectives`. |\n| `wrapParameters`     | `--wrap-parameters`     | `true`  | Wrap parameters to new lines to fit print width.                                             |\n| `continuationIndent` | `--continuation-indent` | `2`     | Additional indentation for wrapped lines.                                                    |\n\nNote that `tabWidth` defaults to `4` rather than Prettier's `2`, to match the\nNGINX documentation.\n\n## Contributing\n\nBug reports and pull requests are welcome on\n[GitHub](https://github.com/jxddk/prettier-plugin-nginx/issues).\n\nDevelopment needs Node.js 24 (see `.node-version`). `npm test` builds the\nplugin and runs the test suite; CI also runs `npm run typecheck` and\n`npm run format:check`, and `npm run coverage` reports coverage. The fixtures\nunder `test/fixtures` are grouped by case; each case holds two example\nconfigurations taken from the NGINX or OpenResty documentation or from\nNGINX's `conf/` directory, cited on their first line and cut down to an\nexcerpt where marked, and one written to break the formatter, next to their\nformatted output or expected error. A documented example is named after its\nsource page or file and its position among that page's configuration\nexamples. Run\n`npm run test:update` after an intentional change to the output.\n\n## License\n\nThe package is available as open source under the terms of the\n[MIT License](https://opensource.org/licenses/MIT).\n","readmeFilename":"README.md","users":{"flumpus-dev":true}}