{"id":13432961,"url":"https://github.com/get-alex/alex","last_synced_at":"2025-12-12T03:15:47.330Z","repository":{"id":36476102,"uuid":"40781628","full_name":"get-alex/alex","owner":"get-alex","description":"Catch insensitive, inconsiderate writing","archived":false,"fork":false,"pushed_at":"2024-11-27T17:45:46.000Z","size":5913,"stargazers_count":5068,"open_issues_count":27,"forks_count":213,"subscribers_count":71,"default_branch":"main","last_synced_at":"2025-12-11T19:52:46.557Z","etag":null,"topics":["alex","hacktoberfest2018","linter","writing"],"latest_commit_sha":null,"homepage":"https://alexjs.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/get-alex.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":"funding.yml","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,"zenodo":null},"funding":{"github":"wooorm"}},"created_at":"2015-08-15T19:53:54.000Z","updated_at":"2025-12-11T13:31:14.000Z","dependencies_parsed_at":"2023-07-12T16:00:46.670Z","dependency_job_id":"38cd3271-ac24-442b-adb2-7f0be0eb1f5c","html_url":"https://github.com/get-alex/alex","commit_stats":{"total_commits":299,"total_committers":43,"mean_commits":6.953488372093023,"dds":"0.21404682274247488","last_synced_commit":"52cb3d128827ee01602eba4e9081a10a21172fc2"},"previous_names":["wooorm/alex"],"tags_count":33,"template":false,"template_full_name":null,"purl":"pkg:github/get-alex/alex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/get-alex%2Falex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/get-alex%2Falex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/get-alex%2Falex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/get-alex%2Falex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/get-alex","download_url":"https://codeload.github.com/get-alex/alex/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/get-alex%2Falex/sbom","scorecard":{"id":423994,"data":{"date":"2025-08-11","repo":{"name":"github.com/get-alex/alex","commit":"9a57595d1050d8fff99dc073670ee2bb41c925f6"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.2,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","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":"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/main.yml:1","Info: no jobLevel write permissions found"],"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":"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":"Code-Review","score":1,"reason":"Found 5/30 approved changesets -- score normalized to 1","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":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/get-alex/alex/main.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/get-alex/alex/main.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/main.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/get-alex/alex/main.yml/main?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/main.yml:15","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   1 npmCommand dependencies pinned"],"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":"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":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: license:0","Info: FSF or OSI recognized license: MIT License: license:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"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":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact 9.1.0 not signed: https://api.github.com/repos/get-alex/alex/releases/33910552","Warn: release artifact 9.1.0 does not have provenance: https://api.github.com/repos/get-alex/alex/releases/33910552"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"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 5 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"}}]},"last_synced_at":"2025-08-19T01:52:49.687Z","repository_id":36476102,"created_at":"2025-08-19T01:52:49.687Z","updated_at":"2025-08-19T01:52:49.687Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27675350,"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-12-12T02:00:06.775Z","response_time":129,"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":["alex","hacktoberfest2018","linter","writing"],"created_at":"2024-07-31T02:01:19.048Z","updated_at":"2025-12-12T03:15:47.280Z","avatar_url":"https://github.com/get-alex.png","language":"JavaScript","funding_links":["https://github.com/sponsors/wooorm"],"categories":["JavaScript","Utilities","Quality Assurance","\u003ca name=\"writing\"\u003e\u003c/a\u003eWriting","Tools","Web development tools","General Tools","Built on retext"],"sub_categories":["Calendars","Chess :chess_pawn:","Checker \u0026 Formatter"],"readme":"\u003c!--lint disable no-html first-heading-level no-shell-dollars--\u003e\n\n\u003ch1 align=\"center\"\u003e\n  \u003cimg width=\"300\" src=\"https://raw.githubusercontent.com/get-alex/alex/a192b46/media/logo-alex-purple.svg?sanitize=true\" alt=\"alex\"\u003e\n  \u003cbr\u003e\n  \u003cbr\u003e\n\u003c/h1\u003e\n\n\u003e 📝 **alex** — Catch insensitive, inconsiderate writing.\n\n[![Build][build-badge]][build]\n[![Coverage][coverage-badge]][coverage]\n[![First timers friendly][first-timers-badge]][first-timers]\n\nWhether your own or someone else’s writing, **alex** helps you find gender\nfavoring, polarizing, race related, or other **unequal** phrasing in text.\n\nFor example, when `We’ve confirmed his identity` is given, **alex** will warn\nyou and suggest using `their` instead of `his`.\n\nGive **alex** a spin on the [Online demo »][demo].\n\n## Why\n\n*   [x] Helps to get better at considerate writing\n*   [x] Catches many possible offences\n*   [x] Suggests helpful alternatives\n*   [x] Reads plain text, HTML, MDX, or markdown as input\n*   [x] Stylish\n\n## Install\n\nUsing [npm][] (with [Node.js][node]):\n\n```sh\n$ npm install alex --global\n```\n\nUsing [yarn][]:\n\n```sh\n$ yarn global add alex\n```\n\nOr you can follow this step-by-step tutorial:\n[Setting up alex in your project][setup-tutorial]\n\n\u003c!--alex disable wacko stupid--\u003e\n\n## Contents\n\n*   [Checks](#checks)\n*   [Integrations](#integrations)\n*   [Ignoring files](#ignoring-files)\n    *   [`.alexignore`](#alexignore)\n*   [Control](#control)\n*   [Configuration](#configuration)\n*   [CLI](#cli)\n*   [API](#api)\n    *   [`markdown(value, config)`](#markdownvalue-config)\n    *   [`mdx(value, config)`](#mdxvalue-config)\n    *   [`html(value, config)`](#htmlvalue-config)\n    *   [`text(value, config)`](#textvalue-config)\n*   [Workflow](#workflow)\n*   [FAQ](#faq)\n    *   [This is stupid!](#this-is-stupid)\n    *   [alex didn’t check “X”!](#alex-didnt-check-x)\n    *   [Why is this named alex?](#why-is-this-named-alex)\n*   [Further reading](#further-reading)\n*   [Contribute](#contribute)\n*   [Origin story](#origin-story)\n*   [Acknowledgments](#acknowledgments)\n*   [License](#license)\n\n## Checks\n\n**alex** checks things such as:\n\n*   Gendered work-titles (if you write `garbageman` alex suggests `garbage\n    collector`; if you write `landlord` alex suggests `proprietor`)\n*   Gendered proverbs (if you write `like a man` alex suggests `bravely`; if you\n    write `ladylike` alex suggests `courteous`)\n*   Ableist language (if you write `learning disabled` alex suggests `person\n    with learning disabilities`)\n*   Condescending language (if you write `obviously` or `everyone knows` alex\n    warns about it)\n*   Intolerant phrasing (if you write `master` and `slave` alex suggests\n    `primary` and `replica`)\n*   Profanities (if you write `butt` 🍑 alex warns about it)\n\n…and much more!\n\nNote: alex assumes good intent: that you don’t mean to offend!\n\nSee [`retext-equality`][equality] and [`retext-profanities`][profanities] for\nall rules.\n\n**alex** ignores words meant literally, so `“he”`, `He — ...`, and [the\nlike][literals] are not warned about.\n\n## Integrations\n\n*   Sublime — [`sindresorhus/SublimeLinter-contrib-alex`](https://github.com/sindresorhus/SublimeLinter-contrib-alex)\n*   Gulp — [`dustinspecker/gulp-alex`](https://github.com/dustinspecker/gulp-alex)\n*   Slack — [`keoghpe/alex-slack`](https://github.com/keoghpe/alex-slack)\n*   Ember — [`yohanmishkin/ember-cli-alex`](https://github.com/yohanmishkin/ember-cli-alex)\n*   Probot — [`swinton/linter-alex`](https://github.com/swinton/linter-alex)\n*   GitHub Actions — [`brown-ccv/alex-recommends`](https://github.com/marketplace/actions/alex-recommends)\n*   GitHub Actions (reviewdog) — [`reviewdog/action-alex`](https://github.com/marketplace/actions/run-alex-with-reviewdog)\n*   Vim — [`w0rp/ale`](https://github.com/w0rp/ale),\n    [`Freed-Wu/coc-alex`](https://github.com/Freed-Wu/coc-alex)\n*   Browser extension — [`skn0tt/alex-browser-extension`](https://github.com/skn0tt/alex-browser-extension)\n*   Contentful - [`stefanjudis/alex-js-contentful-ui-extension`](https://github.com/stefanjudis/alex-js-contentful-ui-extension)\n*   Figma - [`nickradford/figma-plugin-alex`](https://github.com/nickradford/figma-plugin-alex)\n*   VSCode - [`tlahmann/vscode-alex`](https://github.com/tlahmann/vscode-alex)\n\n## Ignoring files\n\nThe CLI searches for files with a markdown or text extension when given\ndirectories (so `$ alex .` will find `readme.md` and `path/to/file.txt`).\nTo prevent files from being found, create an [`.alexignore`][alexignore] file.\n\n### `.alexignore`\n\nThe CLI will sometimes [search for files][ignoring-files].\nTo prevent files from being found, add a file named `.alexignore` in one of the\ndirectories above the current working directory (the place you run `alex` from).\nThe format of these files is similar to [`.eslintignore`][eslintignore] (which\nin turn is similar to `.gitignore` files).\n\nFor example, when working in `~/path/to/place`, the ignore file can be in\n`to`, `place`, or `~`.\n\nThe ignore file for [this project itself][.alexignore] looks like this:\n\n```txt\n# `node_modules` is ignored by default.\nexample.md\n```\n\n## Control\n\nSometimes **alex** makes mistakes:\n\n```markdown\nA message for this sentence will pop up.\n```\n\nYields:\n\n```txt\nreadme.md\n  1:15-1:18  warning  `pop` may be insensitive, use `parent` instead  dad-mom  retext-equality\n\n⚠ 1 warning\n```\n\nHTML comments in Markdown can be used to ignore them:\n\n```markdown\n\u003c!--alex ignore dad-mom--\u003e\n\nA message for this sentence will **not** pop up.\n```\n\nYields:\n\n```txt\nreadme.md: no issues found\n```\n\n`ignore` turns off messages for the thing after the comment (in this case, the\nparagraph).\nIt’s also possible to turn off messages after a comment by using `disable`, and,\nturn those messages back on using `enable`:\n\n```markdown\n\u003c!--alex disable dad-mom--\u003e\n\nA message for this sentence will **not** pop up.\n\nA message for this sentence will also **not** pop up.\n\nYet another sentence where a message will **not** pop up.\n\n\u003c!--alex enable dad-mom--\u003e\n\nA message for this sentence will pop up.\n```\n\nYields:\n\n```txt\nreadme.md\n  9:15-9:18  warning  `pop` may be insensitive, use `parent` instead  dad-mom  retext-equality\n\n⚠ 1 warning\n```\n\nMultiple messages can be controlled in one go:\n\n```md\n\u003c!--alex disable he-her his-hers dad-mom--\u003e\n```\n\n…and all messages can be controlled by omitting all rule identifiers:\n\n```md\n\u003c!--alex ignore--\u003e\n```\n\n## Configuration\n\nYou can control **alex** through `.alexrc` configuration files:\n\n```json\n{\n  \"allow\": [\"boogeyman-boogeywoman\"]\n}\n```\n\n…you can use YAML if the file is named `.alexrc.yml` or `.alexrc.yaml`:\n\n```yml\nallow:\n  - dad-mom\n```\n\n…you can also use JavaScript if the file is named `.alexrc.js`:\n\n```js\n// But making it random like this is a bad idea!\nexports.profanitySureness = Math.floor(Math.random() * 3)\n```\n\n…and finally it is possible to use an `alex` field in `package.json`:\n\n```txt\n{\n  …\n  \"alex\": {\n    \"noBinary\": true\n  },\n  …\n}\n```\n\nThe `allow` field should be an array of rules or `undefined` (the default is\n`undefined`).  When provided, the rules specified are skipped and not reported.\n\nThe `deny` field should be an array of rules or `undefined` (the default is\n`undefined`).  When provided, *only* the rules specified are reported.\n\nYou cannot use both `allow` and `deny` at the same time.\n\nThe `noBinary` field should be a boolean (the default is `false`).\nWhen turned on (`true`), pairs such as `he and she` and `garbageman or\ngarbagewoman` are seen as errors.\nWhen turned off (`false`, the default), such pairs are okay.\n\nThe `profanitySureness` field is a number (the default is `0`).\nWe use [`cuss`][cuss], which has a dictionary of words that have a rating\nbetween 0 and 2 of how likely it is that a word or phrase is a profanity (not\nhow “bad” it is):\n\n| Rating | Use as a profanity | Use in clean text | Example  |\n| ------ | ------------------ | ----------------- | -------- |\n| 2      | likely             | unlikely          | `asshat` |\n| 1      | maybe              | maybe             | `addict` |\n| 0      | unlikely           | likely            | `beaver` |\n\nThe `profanitySureness` field is the minimum rating (including) that you want to\ncheck for.\nIf you set it to `1` (maybe) then it will warn for level `1` *and* `2` (likely)\nprofanities, but not for level `0` (unlikely).\n\n## CLI\n\n\u003c!--alex enable wacko stupid--\u003e\n\n![][screenshot]\n\nLet’s say `example.md` looks as follows:\n\n```markdown\nThe boogeyman wrote all changes to the **master server**. Thus, the slaves\nwere read-only copies of master. But not to worry, he was a cripple.\n```\n\nNow, run **alex** on `example.md`:\n\n```sh\n$ alex example.md\n```\n\nYields:\n\n```txt\nexample.md\n   1:5-1:14  warning  `boogeyman` may be insensitive, use `boogeymonster` instead                boogeyman-boogeywoman  retext-equality\n  1:42-1:48  warning  `master` / `slaves` may be insensitive, use `primary` / `replica` instead  master-slave           retext-equality\n  1:69-1:75  warning  Don’t use `slaves`, it’s profane                                           slaves                 retext-profanities\n  2:52-2:54  warning  `he` may be insensitive, use `they`, `it` instead                          he-she                 retext-equality\n  2:61-2:68  warning  `cripple` may be insensitive, use `person with a limp` instead             gimp                   retext-equality\n\n⚠ 5 warnings\n```\n\nSee `$ alex --help` for more information.\n\n\u003e When no input files are given to **alex**, it searches for files in the\n\u003e current directory, `doc`, and `docs`.\n\u003e If `--mdx` is given, it searches for `mdx` extensions.\n\u003e If `--html` is given, it searches for `htm` and `html` extensions.\n\u003e Otherwise, it searches for `txt`, `text`, `md`, `mkd`, `mkdn`, `mkdown`,\n\u003e `ron`, and `markdown` extensions.\n\n## API\n\nThis package is [ESM only](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c):\nNode 14+ is needed to use it and it must be `import`ed instead of `require`d.\n\n[npm][]:\n\n```sh\n$ npm install alex --save\n```\n\nThis package exports the identifiers `markdown`, `mdx`, `html`, and `text`.\nThe default export is `markdown`.\n\n### `markdown(value, config)`\n\nCheck Markdown (ignoring syntax).\n\n###### Parameters\n\n*   `value` ([`VFile`][vfile] or `string`) — Markdown document\n*   `config` (`Object`, optional) — See the [Configuration][] section\n\n###### Returns\n\n[`VFile`][vfile].\nYou are probably interested in its [`messages`][vfile-message] property, as\nshown in the example below, because it holds the possible violations.\n\n###### Example\n\n```js\nimport alex from 'alex'\n\nalex('We’ve confirmed his identity.').messages\n```\n\nYields:\n\n```js\n[\n  [1:17-1:20: `his` may be insensitive, when referring to a person, use `their`, `theirs`, `them` instead] {\n    message: '`his` may be insensitive, when referring to a ' +\n      'person, use `their`, `theirs`, `them` instead',\n    name: '1:17-1:20',\n    reason: '`his` may be insensitive, when referring to a ' +\n      'person, use `their`, `theirs`, `them` instead',\n    line: 1,\n    column: 17,\n    location: { start: [Object], end: [Object] },\n    source: 'retext-equality',\n    ruleId: 'her-him',\n    fatal: false,\n    actual: 'his',\n    expected: [ 'their', 'theirs', 'them' ]\n  }\n]\n```\n\n### `mdx(value, config)`\n\nCheck [MDX][] (ignoring syntax).\n\n\u003e Note: the syntax for [MDX@2][mdx-next], while currently in beta, is used in\n\u003e alex.\n\n###### Parameters\n\n*   `value` ([`VFile`][vfile] or `string`) — MDX document\n*   `config` (`Object`, optional) — See the [Configuration][] section\n\n###### Returns\n\n[`VFile`][vfile].\n\n###### Example\n\n```js\nimport {mdx} from 'alex'\n\nmdx('\u003cComponent\u003eHe walked to class.\u003c/Component\u003e').messages\n```\n\nYields:\n\n```js\n[\n  [1:12-1:14: `He` may be insensitive, use `They`, `It` instead] {\n    reason: '`He` may be insensitive, use `They`, `It` instead',\n    line: 1,\n    column: 12,\n    location: { start: [Object], end: [Object] },\n    source: 'retext-equality',\n    ruleId: 'he-she',\n    fatal: false,\n    actual: 'He',\n    expected: [ 'They', 'It' ]\n  }\n]\n```\n\n### `html(value, config)`\n\nCheck HTML (ignoring syntax).\n\n###### Parameters\n\n*   `value` ([`VFile`][vfile] or `string`) — HTML document\n*   `config` (`Object`, optional) — See the [Configuration][] section\n\n###### Returns\n\n[`VFile`][vfile].\n\n###### Example\n\n```js\nimport {html} from 'alex'\n\nhtml('\u003cp class=\"black\"\u003eHe walked to class.\u003c/p\u003e').messages\n```\n\nYields:\n\n```js\n[\n  [1:18-1:20: `He` may be insensitive, use `They`, `It` instead] {\n    message: '`He` may be insensitive, use `They`, `It` instead',\n    name: '1:18-1:20',\n    reason: '`He` may be insensitive, use `They`, `It` instead',\n    line: 1,\n    column: 18,\n    location: { start: [Object], end: [Object] },\n    source: 'retext-equality',\n    ruleId: 'he-she',\n    fatal: false,\n    actual: 'He',\n    expected: [ 'They', 'It' ]\n  }\n]\n```\n\n### `text(value, config)`\n\nCheck plain text (as in, syntax is checked).\n\n###### Parameters\n\n*   `value` ([`VFile`][vfile] or `string`) — Text document\n*   `config` (`Object`, optional) — See the [Configuration][] section\n\n###### Returns\n\n[`VFile`][vfile].\n\n###### Example\n\n```js\nimport {markdown, text} from 'alex'\n\nmarkdown('The `boogeyman`.').messages // =\u003e []\n\ntext('The `boogeyman`.').messages\n```\n\nYields:\n\n```js\n[\n  [1:6-1:15: `boogeyman` may be insensitive, use `boogeymonster` instead] {\n    message: '`boogeyman` may be insensitive, use `boogeymonster` instead',\n    name: '1:6-1:15',\n    reason: '`boogeyman` may be insensitive, use `boogeymonster` instead',\n    line: 1,\n    column: 6,\n    location: Position { start: [Object], end: [Object] },\n    source: 'retext-equality',\n    ruleId: 'boogeyman-boogeywoman',\n    fatal: false,\n    actual: 'boogeyman',\n    expected: [ 'boogeymonster' ]\n  }\n]\n```\n\n## Workflow\n\nThe recommended workflow is to add **alex** to `package.json` and to run it with\nyour tests in Travis.\n\nYou can opt to ignore warnings through [alexrc][configuration] files and\n[control comments][control].\n\nA `package.json` file with [npm scripts][npm-scripts], and additionally using\n[AVA][] for unit tests, could look like so:\n\n```json\n{\n  \"scripts\": {\n    \"test-api\": \"ava\",\n    \"test-doc\": \"alex\",\n    \"test\": \"npm run test-api \u0026\u0026 npm run test-doc\"\n  },\n  \"devDependencies\": {\n    \"alex\": \"^1.0.0\",\n    \"ava\": \"^0.1.0\"\n  }\n}\n```\n\nIf you’re using Travis for continuous integration, set up something like the\nfollowing in your `.travis.yml`:\n\n```diff\n script:\n - npm test\n+- alex --diff\n```\n\nMake sure to still install alex though!\n\nIf the `--diff` flag is used, and Travis is detected, lines that are not changes\nin this push are ignored.\nUsing this workflow, you can merge PRs if it has warnings, and then if someone\nedits an entirely different file, they won’t be bothered about existing\nwarnings, only about the things they added!\n\n## FAQ\n\n\u003c!--lint disable no-heading-punctuation--\u003e\n\n\u003c!--alex ignore wacko stupid--\u003e\n\n### This is stupid!\n\nNot a question.\nAnd yeah, alex isn’t very smart.\nPeople are much better at this.\nBut people make mistakes, and alex is there to help.\n\n### alex didn’t check “X”!\n\nSee [`contributing.md`][contributing] on how to get “X” checked by alex.\n\n### Why is this named alex?\n\nIt’s a nice unisex name, it was free on npm, I like it!  :smile:\n\n\u003c!--lint enable no-heading-punctuation--\u003e\n\n## Further reading\n\nNo automated tool can replace studying inclusive communication and listening to\nthe lived experiences of others.\nAn error from `alex` can be an invitation to learn more.\nThese resources are a launch point for deepening your own understanding and\neditorial skills beyond what `alex` can offer:\n\n*   The [18F Content Guide](https://content-guide.18f.gov/our-style/inclusive-language/)\n    has a helpful list of links to other inclusive language guides used in\n    journalism and academic writing.\n*   The [Conscious Style Guide](https://consciousstyleguide.com/articles/) has\n    articles on many nuanced topics of language.  For example, the terms race\n    and ethnicity mean different things, and choosing the right word is up to\n    you.\n    Likewise, a sentence that overgeneralizes about a group of people\n    (e.g. “Developers love to code all day”) may not be noticed by `alex`, but\n    it is not inclusive.  A good human editor can step up to the challenge and\n    find a better way to phrase things.\n*   Sometimes, the only way to know what is inclusive is to ask.\n    In [Disability is a nuanced thing](https://incl.ca/disability-language-is-a-nuanced-thing/),\n    Nicolas Steenhout writes about how person-first language, such as\n    “a person with a disability,” is not always the right choice.\n*   Language is always evolving.  A term that is neutral one year ago can be\n    problematic today.  Projects like the\n    [Self-Defined Dictionary](https://github.com/selfdefined/web-app) aim to\n    collect the words that we use to define ourselves and others, and connect\n    them with the history and some helpful advice.\n*   Unconscious bias is present in daily decisions and conversations and can\n    show up in writing.\n    [Textio](https://textio.com/blog/4-overlooked-types-of-bias-in-business-writing/27521593662)\n\n    offers some examples of how descriptive adjective choice and tone can push\n    some people away, and how regional language differences can cause confusion.\n*   Using complex sentences and uncommon vocabulary can lead to less inclusive\n    content.  This is described as literacy exclusion in\n    [this article by Harver](https://harver.com/blog/inclusive-job-descriptions/).\n    This is critical to be aware of if your content has a global audience,\n    where a reader’s strongest language may not be the language you are writing\n    in.\n\n## Contribute\n\nSee [`contributing.md`][contributing] in [`get-alex/.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## Origin story\n\nThanks to [**@iheanyi**][iheany] for [raising the problem][tweet] and\n[**@sindresorhus**][sindre] for inspiring me ([**@wooorm**][wooorm]) to do\nsomething about it.\n\nWhen alex launched, it got some traction on [twitter][] and [producthunt][].\nThen there was a [lot][tnw] [of][dailydot] [press][vice] [coverage][bustle].\n\n## Acknowledgments\n\nPreliminary work for alex was done [in 2015][preliminary].\nThe project was authored by [**@wooorm**][wooorm].\n\nLots of [people helped since][contributors]!\n\n## License\n\n[MIT][license] © [Titus Wormer][author]\n\n\u003c!-- Definitions. --\u003e\n\n[build]: https://github.com/get-alex/alex/actions\n\n[build-badge]: https://github.com/get-alex/alex/workflows/main/badge.svg\n\n[coverage]: https://codecov.io/github/get-alex/alex\n\n[coverage-badge]: https://img.shields.io/codecov/c/github/get-alex/alex.svg\n\n[first-timers]: https://www.firsttimersonly.com/\n\n[first-timers-badge]: https://img.shields.io/badge/first--timers--only-friendly-blue.svg\n\n[node]: https://nodejs.org/en/download/\n\n[npm]: https://docs.npmjs.com/cli/install\n\n[yarn]: https://yarnpkg.com/\n\n[setup-tutorial]: https://dev.to/meeshkan/setting-up-the-alex-js-language-linter-in-your-project-3bpl\n\n[demo]: http://alexjs.com/#demo\n\n[screenshot]: screenshot.png\n\n[vfile]: https://github.com/vfile/vfile\n\n[profanities]: https://github.com/retextjs/retext-profanities/blob/main/rules.md\n\n[equality]: https://github.com/retextjs/retext-equality/blob/main/rules.md\n\n[vfile-message]: https://github.com/vfile/vfile#vfilemessages\n\n[literals]: https://github.com/syntax-tree/nlcst-is-literal#isliteralparent-index\n\n[eslintignore]: http://eslint.org/docs/user-guide/configuring.html#ignoring-files-and-directories\n\n[cuss]: https://github.com/words/cuss\n\n[npm-scripts]: https://docs.npmjs.com/misc/scripts\n\n[ava]: http://ava.li\n\n[author]: http://wooorm.com\n\n[health]: https://github.com/get-alex/.github\n\n[contributing]: https://github.com/get-alex/.github/blob/main/contributing.md\n\n[support]: https://github.com/get-alex/.github/blob/main/support.md\n\n[coc]: https://github.com/get-alex/.github/blob/main/code-of-conduct.md\n\n[tweet]: https://twitter.com/kwuchu/status/618799087006130176\n\n[twitter]: https://twitter.com/wooorm/status/639123753490907136\n\n[producthunt]: https://www.producthunt.com/posts/alex\n\n[tnw]: http://thenextweb.com/apps/2015/09/11/alex-stops-you-from-publishing-inconsiderate-content/\n\n[vice]: https://www.vice.com/en_us/article/nzeawx/meet-alex-the-javascript-tool-to-make-your-code-less-offensive\n\n[bustle]: https://www.bustle.com/articles/108684-alex-javascript-tool-corrects-harmful-language-in-your-writing-because-there-are-some-mistakes-spell-check\n\n[dailydot]: https://www.dailydot.com/debug/alex-coding-tool-offensive/\n\n[iheany]: https://github.com/iheanyi\n\n[sindre]: https://github.com/sindresorhus\n\n[wooorm]: https://github.com/wooorm\n\n[preliminary]: https://github.com/get-alex/alex/commit/3621b0a\n\n[contributors]: https://github.com/get-alex/alex/graphs/contributors\n\n[.alexignore]: .alexignore\n\n[license]: license\n\n[control]: #control\n\n[configuration]: #configuration\n\n[ignoring-files]: #ignoring-files\n\n[alexignore]: #alexignore\n\n[mdx]: https://mdxjs.com\n\n[mdx-next]: https://github.com/mdx-js/mdx/issues/1041\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fget-alex%2Falex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fget-alex%2Falex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fget-alex%2Falex/lists"}