-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
maintenance(docs): Add retext-spell to check spelling #24372
Conversation
if it splitted up, then the script can save new found words in a file:
yes - i like to help out :) if the dictionary not helps that much we can also catch the some hard to defined word combinations with the |
is there a rule to ignore twitter handles like |
@muescha there’s |
# Conflicts: # docs/blog/2020-06-16-Gatsby-slideshow-with-Posenet/index.md
I think if you use hunspell's syntax you can make sure npm and webpack are lowercase:
We have |
thats a twitter handle which allow underscore which is not catched with the since this plugin not handle multiple styles (a feature request it is not possible to add multiple configs multiple config are not possible but this "hacky hack" works on my machine: .use(() => require("retext-syntax-mentions")({ style: 'twitter'}))
.use(() => require("retext-syntax-mentions")({ style: 'github'})) but this hack is not recommended by the unify team |
btw i find out that many of the mentions are triggered by mdx import statements with adding a vFile.info(`formatting "${toString(slice)}" as mention`, newPosition, 'retext-syntax-mentions'); right after: but the team recommend for MDX files the
|
BTW: is it possible to deactivate via label or something the |
@muescha I definitely want to add As for |
BTW: this is a better setting for mentions: .use(require("retext-syntax-mentions"), {style: /^@[\w-]{1,40}$/}) i have written a small tracer which checks the tree diffs - and there i see that the |
i am not sure, but maybe this util helps with the lint-ignore messages? https://github.com/unifiedjs/unified-message-control and this based on the previous util: https://github.com/remarkjs/remark-message-control //in index.js
var test = [
'html', // Comments are `html` nodes in mdast.
'comment' // In MDX, comments have their own node.
] |
i was looking for an option to only have changed lines marked, but there is not this option. in retext on CI we can use this tool for checking only changed lines: https://github.com/unifiedjs/unified-diff |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good! Seems like this allows us to remove the spelling bot as well? That can be a "help wanted" issue as far as I'm concerned.
@muescha this PR is merged in so feel free to start working on other PRs to standardize names and stuff. |
Description
Add retext-spell in order to spell-check our docs and fix a couple of spelling errors. Also add an
update-dictionary
script to make adding new words to the dictionary easier.Motivation
Being able to auto-check words means that we can keep the Gatsby Style easier.
Method
I created
dictionary.txt
by running retext-spell once and then extracting/sorting the "mispelled" words. I looked over the file by hand to find any obvious misspellings, brand name capitalizations, and locale-specific spellings and applied them. There's more stuff that we can improve/regularize, such as putting filenames and code inbackticks
, but I can leave it to follow-up PRs and community maintainers.TODO
Caveats
Follow-up PRs
useStaticQuery
gatsby-source-filesystem
)