{"id":13784053,"url":"https://github.com/retextjs/retext-spell","last_synced_at":"2025-07-24T08:10:57.609Z","repository":{"id":45256290,"uuid":"42998490","full_name":"retextjs/retext-spell","owner":"retextjs","description":"plugin to check spelling","archived":false,"fork":false,"pushed_at":"2024-02-05T09:42:31.000Z","size":189,"stargazers_count":75,"open_issues_count":0,"forks_count":15,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-06-25T04:53:03.043Z","etag":null,"topics":["natural-language","retext","retext-plugin","spell","spell-check","spell-checker"],"latest_commit_sha":null,"homepage":"https://unifiedjs.com","language":"JavaScript","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/retextjs.png","metadata":{"funding":{"github":"unifiedjs","open_collective":"unified"},"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-09-23T12:07:15.000Z","updated_at":"2025-03-30T00:42:09.000Z","dependencies_parsed_at":"2024-01-18T18:10:07.546Z","dependency_job_id":"0da2d79c-efae-4c44-88d0-26a4267f38fe","html_url":"https://github.com/retextjs/retext-spell","commit_stats":{"total_commits":118,"total_committers":9,"mean_commits":13.11111111111111,"dds":0.09322033898305082,"last_synced_commit":"419d8d91ad9ae91b5bac596dfddd798e727f748d"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/retextjs/retext-spell","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/retextjs%2Fretext-spell","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/retextjs%2Fretext-spell/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/retextjs%2Fretext-spell/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/retextjs%2Fretext-spell/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/retextjs","download_url":"https://codeload.github.com/retextjs/retext-spell/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/retextjs%2Fretext-spell/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266813462,"owners_count":23988545,"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-07-24T02:00:09.469Z","response_time":99,"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":["natural-language","retext","retext-plugin","spell","spell-check","spell-checker"],"created_at":"2024-08-03T19:00:34.882Z","updated_at":"2025-07-24T08:10:57.587Z","avatar_url":"https://github.com/retextjs.png","language":"JavaScript","funding_links":["https://github.com/sponsors/unifiedjs","https://opencollective.com/unified"],"categories":["Plugins"],"sub_categories":[],"readme":"# retext-spell\n\n[![Build][build-badge]][build]\n[![Coverage][coverage-badge]][coverage]\n[![Downloads][downloads-badge]][downloads]\n[![Size][size-badge]][size]\n[![Sponsors][sponsors-badge]][collective]\n[![Backers][backers-badge]][collective]\n[![Chat][chat-badge]][chat]\n\n**[retext][]** plugin to check spelling.\n\n## Contents\n\n*   [What is this?](#what-is-this)\n*   [When should I use this?](#when-should-i-use-this)\n*   [Install](#install)\n*   [Use](#use)\n*   [API](#api)\n    *   [`unified().use(retextSpell, options)`](#unifieduseretextspell-options)\n    *   [`Dictionary`](#dictionary)\n    *   [`Options`](#options)\n*   [Messages](#messages)\n*   [Types](#types)\n*   [Compatibility](#compatibility)\n*   [Related](#related)\n*   [Contribute](#contribute)\n*   [License](#license)\n\n## What is this?\n\nThis package is a [unified][] ([retext][]) plugin to check spelling with\n[`nspell`][nspell] and a [dictionary][dictionaries].\n\n## When should I use this?\n\nYou can opt-into this plugin when you’re dealing with content that might contain\nspelling mistakes, and have authors that can fix that content.\n\n## Install\n\nThis package is [ESM only][esm].\nIn Node.js (version 16+), install with [npm][]:\n\n```sh\nnpm install retext-spell\n```\n\nIn Deno with [`esm.sh`][esmsh]:\n\n```js\nimport retextSpell from 'https://esm.sh/retext-spell@6'\n```\n\nIn browsers with [`esm.sh`][esmsh]:\n\n```html\n\u003cscript type=\"module\"\u003e\n  import retextSpell from 'https://esm.sh/retext-spell@6?bundle'\n\u003c/script\u003e\n```\n\n## Use\n\n```js\nimport dictionaryEn from 'dictionary-en'\nimport {retext} from 'retext'\nimport retextSpell from 'retext-spell'\nimport {reporter} from 'vfile-reporter'\n\nconst file = await retext()\n  .use(retextSpell, {dictionary: dictionaryEn})\n  .process('Some useles documeant.')\n\nconsole.error(reporter(file))\n```\n\nYields:\n\n```txt\n1:6-1:12  warning Unexpected unknown word `useles`, expected for example `useless`     useles    retext-spell\n1:13-1:22 warning Unexpected unknown word `documeant`, expected for example `document` documeant retext-spell\n\n⚠ 2 warnings\n```\n\n## API\n\nThis package exports no identifiers.\nThe default export is [`retextSpell`][api-retext-spell].\n\n### `unified().use(retextSpell, options)`\n\nCheck spelling.\n\n###### Parameters\n\n*   `options` ([`Options`][api-options], **required**)\n    — configuration\n\n###### Returns\n\nTransform ([`Transformer`][unified-transformer]).\n\n### `Dictionary`\n\nDictionary function (TypeScript type).\n\n###### Type\n\n```ts\ntype Dictionary = (onload: OnLoad) =\u003e undefined | void\n\ntype OnLoad = (error: Error | undefined, result?: unknown) =\u003e undefined | void\n```\n\n### `Options`\n\nConfiguration (TypeScript type).\n\n###### Fields\n\n*   `dictionary` ([`Dictionary`][api-dictionary], **required**)\n    — dictionary function;\n    result of importing one of the dictionaries in\n    [`wooorm/dictionaries`][dictionaries]\n*   `ignore` (`Array\u003cstring\u003e`, optional)\n    — list of words to ignore\n*   `ignoreLiteral` (`boolean`, default: `true`)\n    — whether to ignore [literal words][nlcst-is-literal]\n*   `ignoreDigits` (`boolean`, default: `true`)\n    — whether to ignore “words” that contain digits or times such as `123456`\n    or `2:41pm`\n*   `max` (`number`, default: `30`)\n    — number of times to suggest;\n    further misspellings do not get suggestions\n*   `normalizeApostrophes` (`boolean`, default: `true`)\n    — normalize smart apostrophes (`’`) as straight (`'`) apostrophes;\n    dictionaries sometimes don’t support smart apostrophes\n*   `personal` (`Buffer` in UTF-8 or `string`, optional)\n    — [personal][nspell-personal] dictionary to use\n\n## Messages\n\nEach message is emitted as a [`VFileMessage`][vfile-message] on `file`, with\n`source` set to `'retext-spell'`, `ruleId` to the normalized unknown word,\n`actual` to the unknown word, and `expected` to an array with suggestions.\n\n## Types\n\nThis package is fully typed with [TypeScript][].\nIt exports the additional types [`Dictionary`][api-dictionary] and\n[`Options`][api-options].\n\n## Compatibility\n\nProjects maintained by the unified collective are compatible with maintained\nversions of Node.js.\n\nWhen we cut a new major release, we drop support for unmaintained versions of\nNode.\nThis means we try to keep the current release line, `retext-spell@^6`,\ncompatible with Node.js 16.\n\n## Related\n\n*   [`retext-contractions`](https://github.com/retextjs/retext-contractions)\n    — check apostrophe use in contractions\n*   [`retext-diacritics`](https://github.com/retextjs/retext-diacritics)\n    — check for proper use of diacritics\n*   [`retext-indefinite-article`](https://github.com/retextjs/retext-indefinite-article)\n    — check if indefinite articles (`a`, `an`) are used correctly\n*   [`retext-redundant-acronyms`](https://github.com/retextjs/retext-redundant-acronyms)\n    — check for redundant acronyms (`ATM machine`)\n*   [`retext-repeated-words`](https://github.com/retextjs/retext-repeated-words)\n    — check `for for` repeated words\n*   [`retext-emoji`](https://github.com/retextjs/retext-emoji)\n    — classify emoji, gemoji, emoticons\n*   [`retext-syntax-mentions`](https://github.com/retextjs/retext-syntax-mentions)\n    — classify [**@mentions**](https://github.com/blog/821) as syntax\n*   [`retext-syntax-urls`](https://github.com/retextjs/retext-syntax-urls)\n    — classify URLs and filepaths as syntax\n\n## Contribute\n\nSee [`contributing.md`][contributing] in [`retextjs/.github`][health] for ways\nto get started.\nSee [`support.md`][support] for ways to get help.\n\nThis project has a [code of conduct][coc].\nBy interacting with this repository, organization, or community you agree to\nabide by its terms.\n\n## License\n\n[MIT][license] © [Titus Wormer][author]\n\n\u003c!-- Definitions --\u003e\n\n[build-badge]: https://github.com/retextjs/retext-spell/workflows/main/badge.svg\n\n[build]: https://github.com/retextjs/retext-spell/actions\n\n[coverage-badge]: https://img.shields.io/codecov/c/github/retextjs/retext-spell.svg\n\n[coverage]: https://codecov.io/github/retextjs/retext-spell\n\n[downloads-badge]: https://img.shields.io/npm/dm/retext-spell.svg\n\n[downloads]: https://www.npmjs.com/package/retext-spell\n\n[size-badge]: https://img.shields.io/bundlejs/size/retext-spell\n\n[size]: https://bundlejs.com/?q=retext-spell\n\n[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg\n\n[backers-badge]: https://opencollective.com/unified/backers/badge.svg\n\n[collective]: https://opencollective.com/unified\n\n[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg\n\n[chat]: https://github.com/retextjs/retext/discussions\n\n[npm]: https://docs.npmjs.com/cli/install\n\n[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c\n\n[esmsh]: https://esm.sh\n\n[typescript]: https://www.typescriptlang.org\n\n[health]: https://github.com/retextjs/.github\n\n[contributing]: https://github.com/retextjs/.github/blob/main/contributing.md\n\n[support]: https://github.com/retextjs/.github/blob/main/support.md\n\n[coc]: https://github.com/retextjs/.github/blob/main/code-of-conduct.md\n\n[license]: license\n\n[author]: https://wooorm.com\n\n[dictionaries]: https://github.com/wooorm/dictionaries\n\n[nlcst-is-literal]: https://github.com/syntax-tree/nlcst-is-literal\n\n[nspell]: https://github.com/wooorm/nspell\n\n[nspell-personal]: https://github.com/wooorm/nspell#personal-dictionary-documents\n\n[retext]: https://github.com/retextjs/retext\n\n[unified]: https://github.com/unifiedjs/unified\n\n[unified-transformer]: https://github.com/unifiedjs/unified#transformer\n\n[vfile-message]: https://github.com/vfile/vfile-message\n\n[api-dictionary]: #dictionary\n\n[api-options]: #options\n\n[api-retext-spell]: #unifieduseretextspell-options\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fretextjs%2Fretext-spell","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fretextjs%2Fretext-spell","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fretextjs%2Fretext-spell/lists"}