A CLI tool for linting JavaScript scripts (pre-request and test scripts) in Postman collections using ESLint. Version 1.0.3, stable release. It fetches a Postman collection via API, extracts scripts from collection/folder/request levels, and runs ESLint with your local flat config. Differentiator: specifically targets Postman script linting with built-in globals like `pm`, uses Postman Collection SDK for parsing. Requires Node.js >=14.0.0.
npm install postman-eslintNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Installs the CLI globally, sets the API key via environment variable, and lints the specified Postman collection.
Create or convert to eslint.config.js using flat config format. See https://eslint.org/docs/latest/use/configure/configuration-files-new
Ensure eslint.config.js exists where you run the command.
Provide API key via command line option or environment variable.
Check for newer versions of postman-eslint and postman-collection.
Create an eslint.config.js file (flat config) in the directory where you run postman-eslint.
Set POSTMAN_API_KEY environment variable or pass --api-key argument.
Verify collection ID and API key; ensure internet connectivity.
npm install --save-dev eslint