Skip to content

cobudget-old/costandard

 
 

Repository files navigation

JavaScript Co-Standard Style

travis npm downloads

One Semicolon And Comma for the Dark Lord on his dark throne

All the goodness of feross/standard with semicolons and dangling commas sprinkled on top.

Install

npm install costandard

Rules

Importantly:

  • semicolons
  • dangling commas in multiline literals
  • Check feross/standard for the rest of the rules.

Badge

Use this in one of your projects? Include one of these badges in your readme to let people know that your code is using the standard style.

TODO

Usage

The easiest way to use JavaScript Co-Standard Style to check your code is to install it globally as a Node command line program. To do so, simply run the following command in your terminal (flag -g installs costandard globally on your system, omit it if you want to install in the current working directory):

npm install costandard -g

After you've done that you should be able to use the costandard program. The simplest use case would be checking the style of all JavaScript files in the current working directory:

$ costandard
Error: Use JavaScript Co-Standard Style
  lib/torrent.js:950:11: Expected '===' and instead saw '=='.

Editor plugins

TODO

What you might do if you're clever

  1. Add it to package.json
{
  "name": "my-cool-package",
  "devDependencies": {
    "costandard": "*"
  },
  "scripts": {
    "test": "costandard && node my-normal-tests-littered-with-semicolons.js"
  }
}
  1. Check style automatically when you run npm test
$ npm test
Error: Code style check failed:
  lib/torrent.js:950:11: Expected '===' and instead saw '=='.
  1. Never give style feedback on a pull request again! (unless it's about semicolons)

See feross/standard for more information.

About

DEPRECATED All the goodness of `feross/standard` with semicolons and dangling commas sprinkled on top.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%