A CLI tool for linting and formatting Nginx configuration files, version 0.7.0. It validates style and common pitfalls with built-in rules such as 'if-is-evil', indentation enforcement, line-ending consistency, location ordering, and trailing whitespace checks. Requires Node 18+. Designed for DevOps workflows, it offers opinionated defaults but is configurable. Compared to alternatives like gixy, it focuses on style and best practices rather than security analysis.
npm install nginx-linterNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Installation and basic usage of nginx-linter to lint an Nginx configuration file.
Upgrade to Node 18 or later.
Always specify a path or use custom config via --config-file.
Set if-is-evil rule to 'none' or adjust mode in .nginx-linterrc.
Use 'trailing-whitespace: warning' or remove from config.
Run 'npm install -g nginx-linter' or add to project dependencies.
Add 'type': 'module' to package.json or use dynamic import.
Use '--indentation' instead of '--indent'.
No dependency data recorded yet.