{"id":13684354,"url":"https://github.com/orta/danger-plugin-spellcheck","last_synced_at":"2025-04-30T08:22:49.235Z","repository":{"id":23268059,"uuid":"98583281","full_name":"orta/danger-plugin-spellcheck","owner":"orta","description":"Spell checks any created or modified code or markdown files in a GitHub PR","archived":false,"fork":false,"pushed_at":"2022-03-22T07:16:19.000Z","size":542,"stargazers_count":26,"open_issues_count":10,"forks_count":16,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-15T08:11:22.634Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/orta.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-07-27T22:03:14.000Z","updated_at":"2023-12-04T20:58:44.000Z","dependencies_parsed_at":"2022-08-07T11:00:19.665Z","dependency_job_id":null,"html_url":"https://github.com/orta/danger-plugin-spellcheck","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orta%2Fdanger-plugin-spellcheck","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orta%2Fdanger-plugin-spellcheck/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orta%2Fdanger-plugin-spellcheck/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orta%2Fdanger-plugin-spellcheck/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/orta","download_url":"https://codeload.github.com/orta/danger-plugin-spellcheck/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251666921,"owners_count":21624396,"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","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-08-02T14:00:32.533Z","updated_at":"2025-04-30T08:22:49.214Z","avatar_url":"https://github.com/orta.png","language":"TypeScript","funding_links":[],"categories":["Plugins"],"sub_categories":["TypeScript (danger-js)"],"readme":"# danger-plugin-spellcheck\n\n[![Build Status](https://travis-ci.org/orta/danger-plugin-spellcheck.svg?branch=master)](https://travis-ci.org/orta/danger-plugin-spellcheck)\n[![npm version](https://badge.fury.io/js/danger-plugin-spellcheck.svg)](https://badge.fury.io/js/danger-plugin-spellcheck)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n\n\u003e Spell checks any created or modified files in a GitHub PR using :\n\u003e\n\u003e - [node-markdown-spellcheck](https://github.com/lukeapage/node-markdown-spellcheck) for Markdown.\n\u003e - [cspell](https://github.com/streetsidesoftware/cspell) for code (opt-in).\n\n## Usage\n\nInstall:\n\n```sh\nyarn add danger-plugin-spellcheck --dev\n```\n\nAt a glance:\n\n```js\n// dangerfile.js\nimport spellcheck from 'danger-plugin-spellcheck'\n\nspellcheck()\n```\n\nYou can have a shared repo for the settings for your spell checking, or you can have a file called `spellcheck.json` in your repo's root.\n\n```js\n// dangerfile.js\nimport spellcheck from 'danger-plugin-spellcheck'\n\nspellcheck({ settings: \"artsy/artsy-danger@spellcheck.json\" })\n```\n\nThe JSON should look something like:\n\n```json\n{\n  \"ignore\": [\"orta\", \"artsy\", \"github\", \"/danger-*.\"],\n  \"ignoreFiles\": [\"README.md\"]\n}\n```\n\nThe `\"ignore\"` section is case in-sensitive for words, if a word has a prefix of `\"/\"` then it will be treated as a `RegExp`.\n\nThe `\"ignoreFiles\"` section is an array of files which will **NOT** be spellchecked.\n\n#### Dynamic Content\n\nThe spellcheck function also accepts `ignore` and `ignoreFiles` as properties of the options object.  If you already have a list of spell check exceptions (_e.g._ from your editor), you can build them in your dangerfile and pass them in to your spellcheck function call.\n\n```js\n// dangerfile.js\nimport spellcheck from 'danger-plugin-spellcheck'\n\nspellcheck({\n  ignore: ['Nachoz', 'Tacoz'],\n  ignoreFiles: ['README.md']\n})\n```\n\n#### Checking Code\n\nThe spellcheck also takes a set of globs to run cspell against:\n\n```js\n// dangerfile.js\nimport spellcheck from 'danger-plugin-spellcheck'\n\nspellcheck({\n  ignore: ['Nachoz', 'Tacoz'],\n  ignoreFiles: ['README.md'],\n  codeSpellCheck: [\"**/*.ts\", \"**/*.js\"]\n})\n```\n\n## Peril\n\nIf you're using Peril you can use both a global settings for org wide-spellchecking, and then have local additions to any\nof the settings. This can make it easier to handle specific one off cases that feel a bit too unique to a single project.\n\nHere is our Artsy setup where we do this:\n\n* [Dangerfile for every PR](https://github.com/artsy/artsy-danger/blob/997d4fb7f4680973ac016eb75474ad15bf18c183/org/all-prs.ts#L7-L9)\n* [Global Spellcheck for every repo](https://github.com/artsy/artsy-danger/blob/997d4fb7f4680973ac016eb75474ad15bf18c183/spellcheck.json)\n* [A per-repo override for a specific repo](https://github.com/artsy/bearden/blob/1979379bb56dacb13593fbc90981ed88e1b097b3/spellcheck.json)\n\n## Credits\n\nThis was created by [Orta Therox](https://twitter.com/orta) and [Yuki Nishijima](https://twitter.com/yuki24) in an amazing pairing session on cold thursday before an [Artsy Happy Hour](https://github.com/artsy/meta/blob/master/meta/happy_hour.md).\n\n## Contributing\n\nSee [CONTRIBUTING.md](contributing.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forta%2Fdanger-plugin-spellcheck","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Forta%2Fdanger-plugin-spellcheck","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forta%2Fdanger-plugin-spellcheck/lists"}