Skip to content
Standard customised to make me happy
JavaScript Shell
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore Test projects that are known to follow JSS Jan 28, 2015
.npmignore readme: Add company logos, other readme cleanup Jan 27, 2017
.travis.yml travis: add node v6 Feb 9, 2017 Merge remote-tracking branch 'upstream/master' into 10.x Jul 17, 2017 feross/standard -> standard/standard Jul 17, 2017
LICENSE Updates after the merge of 7.1.2 Jul 8, 2016 readme fix Jul 13, 2016
eslintrc.json Updates after the merge of 7.1.2 Jul 8, 2016
index.js Merge remote-tracking branch 'upstream/master' into 10.x Jul 17, 2017
sticker.png Add the true standard sticker ;) Jan 28, 2016

One Style You Might Like

travis npm downloads

Standard customised to make us happy.

This is a fork of Standard with two changes:

  • Tabs for indentions
  • Semicolons always

It is called happiness, because we hope that it brings you joy, love and ends strife among your fellow developers.

Reminder: Happiness is not for everyone. Some people will choose to be sad, normal and some might even say "standard". That is alright. A happy person is comfortable with being them and fine to let others be who they want to be. "You do you"

If the information you are looking for is not in this readme, you should take a look at the Standard readme, it might have what you are looking for.


$ npm install happiness


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 '=='.

You can optionally pass in a directory (or directories) using the glob pattern. Be sure to quote paths containing glob patterns so that they are expanded by standard instead of your shell:

$ happiness "src/util/**/*.js" "test/**/*.js"

Many people like to add happiness to their testing setup. To do this, save the packge as a dev dependency and add happiness to your package.json's test script:

$ npm install --save-dev happiness
  "scripts": {
    "test": "happiness && mocha # <- or whatever test runner you use"

Note: by default happiness will look for all files matching the patterns: **/*.js, **/*.jsx.


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.





Text editor plugins

Coming Soon


I want to contribute to happiness. What packages should I know about?


MIT. Copyright (c) Feross Aboukhadijeh.

You can’t perform that action at this time.