StandardJS or JavaScript Standard Style is a JavaScript style guide, linter, and formatter. It is completely opinionated, meaning that it is completely uncustomizable – no configuration is needed, hence there are no .eslintrc, .jshintrc, or .jscsrc files to manage. It is uncustomizable and unconfigurable. The easiest way to use StandardJS is to install it globally as a Node command-line program. Let's find out how you can use this tool in the following steps:
- Install StandardJS via npm globally:
$ npm i standard --global
You can also install it locally for a single project:
$ npm i standard --save-dev
- Navigate to the directory that you want to inspect and type the following command in the terminal:
$ standard
- If you install StandardJS locally, then run it with npx instead:
$ npx standard
You also can add it to the package.json file as follows:
// package.json
{
scripts": {
"jss": "standard",
"jss-fix": "standard...