Registry / testing / apigeelint

apigeelint

JSON →
library2.84.6jsnpmunverified

Static code analysis tool for Apigee API proxy and sharedflow bundles, enforcing best practices and avoiding anti-patterns. Version 2.84.6 requires Node >= 20 and npm >= 10.5.0. Active development with frequent releases (multiple per month). Provides over 80 built-in lint rules covering policies, endpoints, and bundle structure. Supports command-line and programmatic usage, multiple formatters (json, table, junit), and external plugins. Compared to alternatives like apigeelint-plugin or custom scripts, apigeelint is the official community-maintained linter with rule contributions from Apigee engineering and support teams.

npm install apigeelint
INSTALL
IMPORT
SIG · APIGEELINT
A
apigeelint
testingjavascriptv2.84.6
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Linter
import { Linter } from 'apigeelint'
const Linter = require('apigeelint')
ESM-only since v2.80.0. Default export is not a constructor.
Plugin
import { Plugin } from 'apigeelint/plugin'
import Plugin from 'apigeelint/plugin'
Plugin is a named export, not default.
getDefaultPlugins
import { getDefaultPlugins } from 'apigeelint'
import { defaultPlugins } from 'apigeelint'
Function, not a constant.

Programmatically lint an Apigee proxy bundle directory and output results as JSON.

import { Linter, getDefaultPlugins } from 'apigeelint'; const linter = new Linter({ sourceType: 'apiproxy', path: './my-proxy/apiproxy', plugins: getDefaultPlugins(), profile: 'apigee' }); const results = await linter.lint(); console.log(JSON.stringify(results, null, 2));
apigeelint --version
Debug
Known issues
breakingNode >= 20 required since v2.80.0. Older Node versions cause runtime errors.
fix
Upgrade Node to 20+ using nvm or package manager.
affects: >=2.80.0
breakingESM-only from v2.80.0: require() calls will fail. Must use import syntax.
fix
Switch to ES modules: set type: module in package.json or use .mjs extension.
affects: >=2.80.0
deprecatedCLI option -d (download) is deprecated and will be removed in v3.0.
fix
Use apigeetool download proxy instead, then lint with -s.
affects: >=2.70.0
gotchaPO025 rule requires eslint.config.js (not .eslintrc) since v2.83.0.
fix
Create eslint.config.js file in your project root.
affects: >=2.83.0
gotcha.apigeelintrc file is ignored when --norc flag is used. Settings may unexpectedly default.
fix
Do not use --norc unless you provide all options via CLI.
affects: >=2.0.0
Errors
Common errors & fixes
Error: Must use import to load ES Module: ...
Using require() on ESM-only version >=2.80.0
fix
Convert to ES module: use import syntax and set type:module.
Cannot find module 'eslint'
PO025 rule requires eslint but it is not installed
fix
Install eslint: npm install -D eslint@10
Error: Configuration file .eslintrc not supported
PO025 expects eslint.config.js (flat config) since v2.83.0
fix
Rename .eslintrc to eslint.config.js and migrate to flat config format.
TypeError: Linter is not a constructor
Using import { Linter } incorrectly (e.g., default import)
fix
Use named import: import { Linter } from 'apigeelint'
Upgrade
Version history
2.84.6latest on npm
Audit
Dependencies
commanderrequiredcommand-line argument parsing
xpathrequiredXPath evaluation for analyzing XML policies
ajvrequiredJSON schema validation for certain rule checks
eslintoptionalUsed by PO025 rule for JavaScript policy linting
Agent activity
48 hits · last 30 days
node
42
OpenAI (training)
1
Resources
apigeelint — npm install apigeelint · libregistry