TypeScript SDK for writing nginx-lint plugins, version 0.10.5. This package provides types, WIT definitions, and testing utilities for creating WebAssembly Component Model plugins that run in the nginx-lint CLI. Plugins are written in TypeScript (ESM-only), compiled via JCO to WebAssembly, and loaded at runtime. Key features include a PluginTestRunner for unit tests, parseConfig for simulating include contexts, and support for the rowan-based CST parser introduced in v0.9.0. Compared to direct nginx config parsing, this SDK offers a structured plugin API with versioned specifications and automatic integration with nginx-lint's linting pipeline. Release cadence is roughly monthly, with frequent dependency updates.
npm install nginx-lint-pluginNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to define a simple nginx-lint plugin with spec and check functions, using the TypeScript SDK.
Use the rowan-based CST parser via parseConfig or PluginTestRunner instead.
If your plugin depends on the old AST structure, update to use the new CST API or pin to v0.8.x.
Upgrade to >=0.8.3 or manually include the wit directory in your project.
Use ES module imports (import ... from 'nginx-lint-plugin') and set "type": "module" in package.json.
Ensure your bundler supports package.json exports field; or use Node.js test runner directly.
Switch to ESM ("type": "module" in package.json) and use a bundler like esbuild that respects exports.Ensure you are receiving the Config object from the plugin runtime, not from a direct import.
Upgrade nginx-lint-plugin to v0.8.3 or later.