{"id":24910,"library":"apigeelint","title":"apigeelint - Apigee Proxy Linter","description":"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.","status":"active","version":"2.84.6","language":"javascript","source_language":"en","source_url":"https://github.com/apigee/apigeelint","tags":["javascript","API","bundle","lint","linter","Apigee","Edge"],"install":[{"cmd":"npm install apigeelint","lang":"bash","label":"npm"},{"cmd":"yarn add apigeelint","lang":"bash","label":"yarn"},{"cmd":"pnpm add apigeelint","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"command-line argument parsing","package":"commander","optional":false},{"reason":"XPath evaluation for analyzing XML policies","package":"xpath","optional":false},{"reason":"JSON schema validation for certain rule checks","package":"ajv","optional":false},{"reason":"Used by PO025 rule for JavaScript policy linting","package":"eslint","optional":true}],"imports":[{"note":"ESM-only since v2.80.0. Default export is not a constructor.","wrong":"const Linter = require('apigeelint')","symbol":"Linter","correct":"import { Linter } from 'apigeelint'"},{"note":"Plugin is a named export, not default.","wrong":"import Plugin from 'apigeelint/plugin'","symbol":"Plugin","correct":"import { Plugin } from 'apigeelint/plugin'"},{"note":"Function, not a constant.","wrong":"import { defaultPlugins } from 'apigeelint'","symbol":"getDefaultPlugins","correct":"import { getDefaultPlugins } from 'apigeelint'"}],"quickstart":{"code":"import { Linter, getDefaultPlugins } from 'apigeelint';\n\nconst linter = new Linter({\n  sourceType: 'apiproxy',\n  path: './my-proxy/apiproxy',\n  plugins: getDefaultPlugins(),\n  profile: 'apigee'\n});\n\nconst results = await linter.lint();\nconsole.log(JSON.stringify(results, null, 2));","lang":"typescript","description":"Programmatically lint an Apigee proxy bundle directory and output results as JSON."},"warnings":[{"fix":"Upgrade Node to 20+ using nvm or package manager.","message":"Node >= 20 required since v2.80.0. Older Node versions cause runtime errors.","severity":"breaking","affected_versions":">=2.80.0"},{"fix":"Switch to ES modules: set type: module in package.json or use .mjs extension.","message":"ESM-only from v2.80.0: require() calls will fail. Must use import syntax.","severity":"breaking","affected_versions":">=2.80.0"},{"fix":"Use apigeetool download proxy instead, then lint with -s.","message":"CLI option -d (download) is deprecated and will be removed in v3.0.","severity":"deprecated","affected_versions":">=2.70.0"},{"fix":"Create eslint.config.js file in your project root.","message":"PO025 rule requires eslint.config.js (not .eslintrc) since v2.83.0.","severity":"gotcha","affected_versions":">=2.83.0"},{"fix":"Do not use --norc unless you provide all options via CLI.","message":".apigeelintrc file is ignored when --norc flag is used. Settings may unexpectedly default.","severity":"gotcha","affected_versions":">=2.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Convert to ES module: use import syntax and set type:module.","cause":"Using require() on ESM-only version >=2.80.0","error":"Error: Must use import to load ES Module: ..."},{"fix":"Install eslint: npm install -D eslint@10","cause":"PO025 rule requires eslint but it is not installed","error":"Cannot find module 'eslint'"},{"fix":"Rename .eslintrc to eslint.config.js and migrate to flat config format.","cause":"PO025 expects eslint.config.js (flat config) since v2.83.0","error":"Error: Configuration file .eslintrc not supported"},{"fix":"Use named import: import { Linter } from 'apigeelint'","cause":"Using import { Linter } incorrectly (e.g., default import)","error":"TypeError: Linter is not a constructor"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}