JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 112
  • Score
    100M100P100Q95450F
  • License MIT

Standard customized to make me happy

Package Exports

  • happiness

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (happiness) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

JavaScript Happiness Style

travis npm downloads

Standard customised to make me happy.

Install

npm install happiness

Rules

Importantly:

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.

js-happiness-style

[![js-happiness-style](https://cdn.rawgit.com/JedWatson/happiness/master/badge.svg)](https://github.com/JedWatson/happiness)

js-happiness-style

[![js-happiness-style](https://img.shields.io/badge/code%20style-happiness-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)

Usage

The easiest way to use JavaScript happiness 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 happiness globally on your system, omit it if you want to install in the current working directory):

npm install happiness -g

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

$ happiness
Error: Use JavaScript happiness Style
  lib/torrent.js:950:11: Expected '===' and instead saw '=='.

Editor plugins

What you might do if you're clever

  1. Add it to package.json
{
  "name": "my-cool-package",
  "devDependencies": {
    "happiness": "*"
  },
  "scripts": {
    "test": "happiness && 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.

Credits

Thanks to Flet and his work on semistandard for making this super easy to build on standard.