Coder Social home page Coder Social logo

happiness's Introduction

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.

Install

$ npm install happiness

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

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.

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)](https://github.com/JedWatson/happiness)

Text editor plugins

Coming Soon

Maintainers

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

License

MIT. Copyright (c) Feross Aboukhadijeh.

happiness's People

Contributors

feross avatar flet avatar max-mapper avatar wesleytodd avatar dcousens avatar rstacruz avatar greenkeeperio-bot avatar ricardofbarros avatar tusharmath avatar yoshuawuyts avatar reggi avatar ungoldman avatar zigomir avatar tzmanics avatar mafintosh avatar mnquintana avatar capaj avatar jelz avatar brandonhorst avatar lvillani avatar matthieuprat avatar nickcolley avatar santiagogil avatar mightyiam avatar sonnyp avatar stephenkubovic avatar yeti-or avatar wadey avatar zeke avatar ibotdotout avatar

Watchers

James Cloos avatar hbcode avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.