npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

github-spellcheck-cli

v7.1.5

Published

A tool for checking GitHub repositories for spelling errors and submitting PRs to fix them.

Downloads

14

Readme

GitHub Spellcheck

A tool for checking GitHub repositories for spelling errors and submitting PRs to fix them.

Currently, GitHub Spellcheck doesn't work on Linux because of https://github.com/atom/node-spellchecker/issues/54. More information: https://github.com/tbroadley/github-spellcheck-cli/issues/90.

npm Build Status

Demo

Github Spellcheck demo

Inspiration

When I'm looking through the documentation of an open-source software project, I sometimes notice a typo. When I do, I usually create a pull request to fix it. I wanted to streamline this process.

Setup

You need to have Git, Node.js, and NPM installed.

$ npm install --global github-spellcheck-cli

Or:

$ npm install --location=global github-spellcheck-cli

Usage

The command is github-spellcheck. It takes the following options:

-h, --help                                       Print this usage guide.
-t, --token <token>                              GitHub personal access token. You only need to provide the token when you
                                                 start using github-spellcheck, and again if you have a new token.
-r, --repository <username/repository or URL>    The repository to spellcheck.
--no-pr                                          Do not automatically create a pull request on the target repository.
--branch <branch name>                           The name of the branch to commit corrections to.
--base <branch name>                             The name of the branch to create the pull request against.
-e, --extensions <extension> [<extension>] ...   Only spellcheck files with these extensions for spelling mistakes.
--include <glob> ...                             Only spellcheck files that match at least one of these globs.
--exclude <glob> ...                             Do not spellcheck files that match one of these globs.
-q, --quiet                                      Do not open CONTRIBUTING.md or the new pull request in a browser.

Applying corrections

The tool will search for potential spelling mistakes in the specified GitHub repository, then ask you what you want to do with each mistake. Here are the commands that the tool accepts:

Command   Meaning           Description
y         yes               Include this correction in the pull request.
n         no                Do not include this correction in the pull request.
d         delete repeated   Delete the word to be corrected and the space in front of it. For example, "the the" will become "the".
w         whitelist         Permanently whitelist the word to be corrected.
e         edit              Replace the word to be corrected with a specified word.
s         skip file         Do not include this correction on any other corrections in this file.
h         help              Print this usage guide.

Whitelist

The whitelist is stored at ~/.github-spellcheck/whitelist.txt.

GitHub personal access token

Instructions for generating a personal access token are here. The token should have the repo and delete_repo scopes.

After generating a personal access token, invoke the tool as follows:

$ github-spellcheck --token <token> --repository ...

It's only necessary to pass --token <token> to the tool once, or if you want to update the token. GitHub Spellcheck will store the token in a file and subsequent invocations will read the token from there.

Development

Fork this repository, clone your fork, then run npm install.

You can run node index.js to start the CLI or npm test to run the tests.

Linting

Run npm run lint to run ESLint or npm run lint-fix to automatically fix problems.