@double-great/double-check
v0.5.1
Published
Double check your writing uses inclusive language and correct spelling.
Downloads
500
Readme
@double-great/double-check
Double check your writing uses inclusive language and correct spelling.
[!Note]
A fork of https://github.com/get-alex/alex
Install
npm install @double-great/double-check -g
Use it
You can run double-check from your terminal and point it at a folder of markdown files or a specific set of markdown files (using glob pattern):
double-check pages/
If your markdown files use liquid, add the --liquid
flag.
To check HTML files, use the --html
flag.
double-check pages/ --html
If you have a mix of files, you must run separate commands to parse them properly:
double-check **/*.md && double-check **/*.html --html
The command will return errors for any rules your writing may have encountered. The rule might make sense or be totally wrong for your context. You can decide to:
- Fix the error.
- If a rule doesn't make sense for your writing, disable it.
- For files you don't want to double check, ignore them.
If you'd like to warnings instead of error, use the --warn
flag.
Configuration
You can configure double check by committing .doublecheckrc
file to your
repository. This file can
take many formats,
such as .doublecheckrc.json
, .doublecheckrc.js
, or .doublecheckrc.yml
.
retext-simplify:
ignore:
- function
- parameters
retext-spell:
ignore:
- double-check
- CLI
# This plugin is now turned off
retext-passive: false
# This plug is now turned on
retext-quotes: true
Plugins
Default plugins
The following plugins are enabled by default, if the plugin as options that you'd like to change, you can add them to your configuration file:
retext-diacritics
retext-indefinite-article
retext-redundant-acronyms
retext-simplify
retext-repeated-words
retext-passive
retext-spell
retext-sentence-spacing
Example of adding options for a specific plugin:
retext-sentence-spacing:
preferred: double-space
Opt-in plugins
To enable the following plugins, update your configuration file to define the
plugin's options or set the plugin to true.
These plugins are opt-in because
they are often more opinionated and need configuration:
Example of opt-in:
retext-quotes: true
Disable rules
You can disable a rule either for a single page or an entire repository.
For a single page
You can ignore a rule inline with an HTML comment:
<!--double-check ignore just-->
Just double check it.
You can disable a single rule for full blocks of text:
<!--double-check disable just-->
Just double check it.
<!--double-check enable just-->
A message for just this sentence will appear.
To ignore many rules for a page:
<!--double-check ignore however clear indicate-->
However, it was clear that you did not indicate you wanted the last donut.
For an entire repository
In .doublecheckrc
, you can specify a list of rules to disable if you have no
better alternative.
retext-simplify:
ignore:
- info
- appropriate
Ignore specific files
If the are files that you do not want to double check, create a
.doublecheckignore
file in your repository's root that defines these file
paths (kind of like .gitignore
).