standard
's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.Name | Version | Size | License | Type | Vulnerabilities |
---|---|---|---|---|---|
eslint-config-standard-jsx | 11.0.0 | 3.41 kB | MIT | prod | |
eslint-config-standard | 17.1.0 | 5.25 kB | MIT | prod | |
eslint-plugin-import | 2.29.1 | 343.75 kB | MIT | prod peer | |
eslint-plugin-n | 15.7.0 | 57.83 kB | MIT | prod peer | |
eslint-plugin-promise | 6.1.1 | 15.28 kB | ISC | prod peer | |
eslint-plugin-react | 7.34.1 | 789.64 kB | MIT | prod peer | |
eslint | 8.57.0 | 2.9 MB | MIT | prod peer | |
standard-engine | 15.1.0 | 12.09 kB | MIT | prod | |
version-guard | 1.1.2 | 8.93 kB | 0BSD | prod |
JavaScript Standard Style, simply known as "standard", is a popular npm package that serves as a style guide, linter, and formatter for JavaScript. It is designed to save you time in three essential ways. Firstly, it requires no configuration which means it is an easy way to implement and enforce code quality in your project. Secondly, it can automatically format your code – one simple command (standard --fix
) will tidy messy or inconsistent code. Lastly, standard will catch style issues and programmer errors early in the development process, saving precious code review time by eliminating back-and-forth between reviewer and contributor.
You use standard by first installing it globally as a Node command line program by running npm install standard --global
in Terminal. Alternatively, for use in a specific project, you can install it locally with npm install standard --save-dev
. Once installed, you can use the standard
program to check the style of all JavaScript files in the current working directory by running standard
in your command line. If you've installed standard locally, use npx standard
instead. To check specific directories, pass them in using the glob pattern, such as standard "src/util/**/*.js" "test/**/*.js"
. Another smart way to use standard is to add it to your package.json
script. This way, the style is checked automatically when you run npm test
.
{
"name": "my-cool-package",
"devDependencies": {
"standard": "*"
},
"scripts": {
"test": "standard && node my-tests.js"
}
}
The 'standard' package documentation is available here in multiple languages. Furthermore, the module's readme file and GitHub repository provide extensive directions and answers to frequently asked questions. By following the official documents and guidelines provided on these platforms, you will be able to effectively use 'standard' and improve the quality of your JavaScript code.