10.0.2 • Public • Published

    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.


    npm i happiness

    DownloadsWeekly Downloads






    Last publish


    • jedwatson
    • wesleytodd