

This can all be done on the command line by the magic of npm. The end functionality will allow the command npm run spellcheck to spellcheck all of the HTML and markdown files and allow the npm run spellcheck-file to spellcheck (given it is HTML or markdown).įirst, we need to initialize the package by adding it as a dependency to package.json. Instead, the package prints out its analysis to stdout. This package is great because it can handle a lot of errors, spellcheck from many files/directories, and it doesn’t actually change any code. Spellcheckerįor the spell checking functionality, I am using the npm package called markdown-spellcheck.

If it starts up properly, you should be good to move on to the next section. If you’re starting from a brand new directory, initialize the folder as a typical NodeJS project via the command line. I’m not going to explain how to set up NodeJS and NPM, but you can learn how to do so here. Even if you’re not familiar with NodeJS or NPM, this shouldn’t be too hard. If you are editing an existing NodeJS project, skip to the next paragraph. Adding a spellcheck feature is super easy for beginner NPM users, so keep reading to see how you can add it to your next project. Even on a personal scale, this feature is great for projects like writing this blog post. This feature is so important for large-scale projects where multiple people contribute to markdown and HTML pages, and it can be challenging to keep track of all the changes. My first Hacktoberfest pull request was to Twilio SendGrid’s docs repository, adding a spellchecking feature. Hacktoberfest, a virtual hackathon that takes place the month of October, is a great opportunity to add something new to an open source project.
