npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

js-sane-standard

v1.1.0

Published

JavaScript Sane Standard Style - standard modified for my sanity

Downloads

18

Readme

travis npm downloads

Standard customised to keep me sane.

This is a fork of Standard with two changes:

  • 4 Space Soft Tabs for indentions
  • Semicolons always

It is called sane-standard, because I hope that it brings you sanity the same as it does for me!

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 js-sane-standard

Usage

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

$ npm install js-sane-standard -g

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

$ sane-standard
Error: Use JavaScript sane-standard 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:

$ sane-standard "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 sane-standard
{
  "scripts": {
    "test": "sane-standard && mocha # <- or whatever test runner you use"
  }
}

Note: by default sane-standard 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-sane-standard-style

[![js-sane-standard-style](https://cdn.rawgit.com/hanakin/js-sane-standard/master/badge.svg)](https://github.com/hanakin/js-sane-standard)

js-sane-standard-style

[![js-sane-standard-style](https://img.shields.io/badge/code%20style-js-sane-standard-brightgreen.svg)](https://github.com/hanakin/js-sane-standard)

Text editor plugins

Coming Soon

Maintainers

I want to contribute to sane-standard. What packages should I know about?

License

MIT. Copyright (c) Feross Aboukhadijeh.