Installing standard is fairly simple. To install it globally so it is accessible across your system, run the following command (requires Node and npm):
npm install standard –global
If you’d like to only install it on a per-project basis, you can do so by just adding it as a dev dependency within your project:
npm install standard –save-dev
If you’d like to use standard to check a specific file in isolation, you can just append the file path after the standard command:
To fix any errors caught by standard, you can either go into the file and manually fix them, or you can simply run standard —fix to fix all errors within the directory. Note that the standard —fix command will only work for syntactical errors or other mistakes where the fix is immediately apparent.
There are third-party plugins or features for standard available for the most popular text editors, such as Vim, VS Code, Atom and Sublime Text. These integrations will allow standard to run as an in-editor linter, providing error messages whenever a new error is detected: