{"id":15198676,"url":"https://github.com/electron/electron-docs-linter","last_synced_at":"2025-10-02T13:31:28.688Z","repository":{"id":9327166,"uuid":"57271796","full_name":"electron/electron-docs-linter","owner":"electron","description":"Parse and validate Electron's API documentation","archived":true,"fork":false,"pushed_at":"2022-10-05T08:17:32.000Z","size":1533,"stargazers_count":21,"open_issues_count":17,"forks_count":18,"subscribers_count":41,"default_branch":"master","last_synced_at":"2025-08-25T07:21:31.013Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://npm.im/electron-docs-linter","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/electron.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"contributing.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-04-28T04:49:04.000Z","updated_at":"2023-10-23T17:05:34.000Z","dependencies_parsed_at":"2022-08-18T05:15:20.296Z","dependency_job_id":null,"html_url":"https://github.com/electron/electron-docs-linter","commit_stats":null,"previous_names":["zeke/electron-apis"],"tags_count":56,"template":false,"template_full_name":null,"purl":"pkg:github/electron/electron-docs-linter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electron%2Felectron-docs-linter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electron%2Felectron-docs-linter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electron%2Felectron-docs-linter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electron%2Felectron-docs-linter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/electron","download_url":"https://codeload.github.com/electron/electron-docs-linter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electron%2Felectron-docs-linter/sbom","scorecard":{"id":372008,"data":{"date":"2025-08-11","repo":{"name":"github.com/electron/electron-docs-linter","commit":"a875477ef310b86f9ba18d45ac8944ec16d6776b"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.5,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"project is archived","details":["Warn: Repository is archived."],"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":-1,"reason":"Found no human activity in the last 20 changesets","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"54 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-h5c3-5r3r-rr8q","Warn: Project is vulnerable to: GHSA-rmvr-2pp2-xj38","Warn: Project is vulnerable to: GHSA-xx4v-prfh-6cgc","Warn: Project is vulnerable to: GHSA-6chw-6frg-f759","Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-cwfw-4gq5-mrqx","Warn: Project is vulnerable to: GHSA-g95f-p29q-9xw4","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-p28h-cc7q-c4fg","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-ff7x-qrg7-qggm","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-4q6p-r6v2-jvc5","Warn: Project is vulnerable to: GHSA-pfrx-2q88-qq97","Warn: Project is vulnerable to: GHSA-rc47-6667-2j5j","Warn: Project is vulnerable to: GHSA-78xj-cgh5-2h22","Warn: Project is vulnerable to: GHSA-2p57-rm9w-gvfp","Warn: Project is vulnerable to: GHSA-896r-f27r-55mw","Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-6vfc-qv3f-vr6c","Warn: Project is vulnerable to: GHSA-4r62-v4vq-hr96","Warn: Project is vulnerable to: GHSA-5v2h-r2cx-5xgj","Warn: Project is vulnerable to: GHSA-rrrm-qjm4-v8hf","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-r683-j2x4-v87g","Warn: Project is vulnerable to: GHSA-hj9c-8jmm-8c52","Warn: Project is vulnerable to: GHSA-rp65-9cf3-cjxr","Warn: Project is vulnerable to: GHSA-g6ww-v8xp-vmwg","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-6g33-f262-xjp4","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-x2pg-mjhr-2m5x","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-44c6-4v22-4mhx","Warn: Project is vulnerable to: GHSA-4x5v-gmq8-25ch","Warn: Project is vulnerable to: GHSA-g36h-6r4f-3mqp","Warn: Project is vulnerable to: GHSA-3jfq-g458-7qm9","Warn: Project is vulnerable to: GHSA-r628-mhmh-qjhw","Warn: Project is vulnerable to: GHSA-9r2w-394v-53qc","Warn: Project is vulnerable to: GHSA-5955-9wpr-37jh","Warn: Project is vulnerable to: GHSA-qq89-hq3f-393p","Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36","Warn: Project is vulnerable to: GHSA-pq67-2wwv-3xjx","Warn: Project is vulnerable to: GHSA-8cj5-5rvv-wf4v","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-7p7h-4mm5-852v"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-18T13:11:37.678Z","repository_id":9327166,"created_at":"2025-08-18T13:11:37.678Z","updated_at":"2025-08-18T13:11:37.678Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275310564,"owners_count":25442313,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-15T02:00:09.272Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-09-28T01:24:08.684Z","updated_at":"2025-10-02T13:31:28.369Z","avatar_url":"https://github.com/electron.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# electron-docs-linter [![Build Status](https://travis-ci.org/electron/electron-docs-linter.svg?branch=master)](https://travis-ci.org/electron/electron-docs-linter)\n\nParse and validate Electron's API documentation.\n\n## Installation\n\n```sh\nnpm install electron-docs-linter --save\n```\n\n## CLI Usage\n\nTo lint the docs:\n\n```sh\nelectron-docs-linter path/to/electron/docs\n```\n\nIf errors are found, they are printed to STDERR and the process\nexits un-gracefully.\n\nTo lint the docs and save the generated [JSON schema](http://electronjs.org/blog/2016/09/27/api-docs-json-schema) to a file:\n\n```sh\nelectron-docs-linter docs/api --version=1.2.3 --outfile=api.json\n```\n\n## Programmatic Usage\n\nThe module exports a function that parses markdown docs in a given directory,\nthen returns a JSON representation of all the APIs.\n\n```js\nconst lint = require('electron-docs-linter')\nconst docPath = './test/fixtures/electron/docs/api'\nconst targetVersion = '1.2.3' // the soon-to-be-released version of electron\n\nlint(docPath, targetVersion).then(function (apis) {\n  // `apis` is an array of API objects. To find one:\n  var win = apis.find(api =\u003e api.name === 'BrowserWindow')\n\n  // The array also has a string key for each API name, so\n  // you can access APIs like this too:\n  win = apis.BrowserWindow\n\n  win.events.length\n  // =\u003e 25\n\n  win.events[0]\n  // {\n  //   \"name\": \"page-title-updated\",\n  //   \"description\": \"Emitted when the document...\",\n  //   \"returns\": [\n  //     {\n  //       \"name\": \"event\",\n  //       \"type\": \"Event\"\n  //     }\n  //   ]\n  // }\n\n  win.instanceMethods[20]\n  // {\n  //   name: 'setSize',\n  //   signature: '(width, height[, animate])'\n  // }\n})\n```\n\n## How It Works\n\nThe linter starts with [a list of all the API names](/lib/seeds.js) as seed data.\n\nEach API's structure is inferred by parsing its raw markdown documentation from\nthe [electron repo](https://github.com/electron/electron/tree/master/docs/api).\nThe [electron-docs](https://github.com/zeke/electron-docs) module abstracts away\nthe challenges of fetching file contents in bulk.\n\nElectron's API documentation adheres to\n[Electron Coding Style](https://github.com/electron/electron/blob/master/docs/development/coding-style.md#naming-things)\nand the\n[Electron Styleguide](https://github.com/electron/electron/blob/master/docs/styleguide.md),\nso its content can be programmatically parsed. To make the content easy to parse,\nthe raw markdown is converted to HTML using\n[marky-markdown-lite](https://ghub.io/marky-markdown-lite),\nwhich returns a [cheerio](https://ghub.io/cheerio) DOM object that can be queried\nand traversed using familiar CSS selectors.\n\nThe result is an array of API objects. The following\nmetadata is included for each API, where appropriate:\n\n- name\n- description\n- type (Class or Module)\n- process (main, renderer, or both)\n- methods\n- events\n- static methods (aka class methods)\n- instance events\n- instance methods\n- instance properties\n- website URL\n- GitHub repository URL\n\n## Related Things and Prior Art\n\n- https://github.com/atom/autocomplete-atom-api\n- https://kapeli.com/docsets#dashDocset\n- [issue: Publish the public API as JSON](https://github.com/electron/electron/issues/3375)\n- https://raw.githubusercontent.com/atom/autocomplete-atom-api/master/completions.json\n- [devdocs.io](http://devdocs.io/)\n- [Node.js - About this Documentation](https://nodejs.org/dist/latest-v6.x/docs/api/documentation.html)\n\n## TypeScript Definitions\n\nA lot of people want an up-to-date TypeScript definition file for Electron.\n\n- https://github.com/MarshallOfSound/Electron-DefinitelyTyped (WIP)\n- https://github.com/electron/electron/issues/4875\n- https://www.npmjs.com/package/@types/electron\n- https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/github-electron\n- https://github.com/RyanCavanaugh/dts-dom - A DOM library for generation TypeScript declaration (.d.ts) files\n- https://github.com/lbovet/typson - Converts TypeScript to JSON-schema\n- https://github.com/lbovet/docson - Documentation for your JSON types\n\n## Dependencies\n\n- [cheerio](https://github.com/cheeriojs/cheerio): Tiny, fast, and elegant implementation of core jQuery designed specifically for the server\n- [clean-deep](https://github.com/seegno/clean-deep): Remove falsy, empty or nullable values from objects\n- [decamelize](https://github.com/sindresorhus/decamelize): Convert a camelized string into a lowercased one with a custom separator: unicornRainbow → unicorn_rainbow\n- [dedent](https://github.com/dmnd/dedent): An ES6 string tag that strips indentation from multi-line strings\n- [electron-docs](https://github.com/zeke/electron-docs): Fetch Electron documentation as raw markdown strings\n- [keyed-array](https://github.com/zeke/keyed-array): Recursively add named keys to arrays of objects\n- [lodash.pick](https://github.com/lodash/lodash): The lodash method `_.pick` exported as a module.\n- [lodash.sum](https://github.com/lodash/lodash): The lodash method `_.sum` exported as a module.\n- [marky-markdown-lite](https://github.com/zeke/marky-markdown-lite): A version of marky-markdown that does less\n- [minimist](https://github.com/substack/minimist): parse argument options\n- [ora](https://github.com/sindresorhus/ora): Elegant terminal spinner\n- [path-exists](https://github.com/sindresorhus/path-exists): Check if a path exists\n- [pify](https://github.com/sindresorhus/pify): Promisify a callback-style function\n- [revalidator](https://github.com/flatiron/revalidator): A cross-browser / node.js validator powered by JSON Schema\n- [semver](https://github.com/npm/node-semver): The semantic version parser used by npm.\n- [to-markdown](https://github.com/domchristie/to-markdown): HTML-to-Markdown converter\n\n## Dev Dependencies\n\n- [chai](https://github.com/chaijs/chai): BDD/TDD assertion library for node.js and the browser. Test framework agnostic.\n- [mocha](https://github.com/mochajs/mocha): simple, flexible, fun test framework\n- [rimraf](https://github.com/isaacs/rimraf): A deep deletion module for node (like `rm -rf`)\n- [standard](https://github.com/feross/standard): JavaScript Standard Style\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felectron%2Felectron-docs-linter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felectron%2Felectron-docs-linter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felectron%2Felectron-docs-linter/lists"}