{"id":25499,"library":"eslint-plugin-apidoc","title":"eslint-plugin-apidoc","description":"An ESLint plugin for linting apidoc.json configuration files based on API style rules. Version 0.0.7 is the latest release. It provides rules to enforce base URL, contact information, and description presence for APIs and resources. Designed to integrate with ESLint, it allows developers to validate apidoc.json files as part of their linting process. The plugin is minimal, with only a few rules, and requires ESLint as a peer dependency. It is not actively maintained, with no recent updates.","status":"active","version":"0.0.7","language":"javascript","source_language":"en","source_url":"https://github.com/securityscorecard/eslint-plugin-apidoc","tags":["javascript","eslint","eslintplugin","eslint-plugin","apidoc","api"],"install":[{"cmd":"npm install eslint-plugin-apidoc","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-plugin-apidoc","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-plugin-apidoc","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency required to use ESLint plugins","package":"eslint","optional":false}],"imports":[{"note":"Plugin is used via ESLint config, not imported in code","wrong":"import { apidoc } from 'eslint-plugin-apidoc'","symbol":"apidoc","correct":"\"plugins\": [\"apidoc\"]"},{"note":"Rule names must be prefixed with 'apidoc/'","wrong":"\"rules\": { \"base-url\": 2 }","symbol":"rules","correct":"\"rules\": { \"apidoc/base-url\": 2 }"},{"note":"Package is CommonJS; using dynamic import may work but require is safer","wrong":"import plugin from 'eslint-plugin-apidoc'; // CJS module, default import fails","symbol":"require('eslint-plugin-apidoc')","correct":"const plugin = require('eslint-plugin-apidoc'); // in ESM context, use createRequire"}],"quickstart":{"code":"// .eslintrc.json\n{\n  \"plugins\": [\"apidoc\"],\n  \"rules\": {\n    \"apidoc/base-url\": [\"error\", { \"domain\": \"example.com\" }],\n    \"apidoc/contact\": \"error\",\n    \"apidoc/description\": \"warn\"\n  }\n}\n\n// Run: eslint apidoc.json","lang":"javascript","description":"Shows ESLint configuration to lint apidoc.json using the plugin's three rules."},"warnings":[{"fix":"Consider forking or using an alternative if issues arise.","message":"Package is not widely maintained; no updates since 2017. May have compatibility issues with modern ESLint versions.","severity":"gotcha","affected_versions":">=0.0.7"},{"fix":"Ensure your apiDoc configuration is in a separate JSON file.","message":"The plugin only works with apidoc.json files; it does not parse inline JSDoc annotations for apiDoc.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run 'npm install eslint-plugin-apidoc --save-dev'","cause":"Plugin not installed or ESLint cannot resolve it.","error":"Error: Failed to load plugin 'apidoc': Cannot find module 'eslint-plugin-apidoc'"},{"fix":"Use 'apidoc/base-url' instead of 'base-url'","cause":"Missing 'apidoc/' prefix in rule name.","error":"Error: Cannot read property 'base-url' of undefined"},{"fix":"Ensure the file is valid JSON and exists.","cause":"apidoc.json file is not valid JSON or missing.","error":"Parsing error: Unexpected token"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}