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

jest-runner-standard

v0.1.0

Published

Standard Style runner for Jest

Downloads

41

Readme

jest-runner-standard

JavaScript Style Guide

Standard Style runner for Jest.

Motivation

I liked the idea of the jest-runner-eslint, and thought it would be great to have one like that for standard. I also wanted to add a nice error messaging that will give you some context about where in the code you made a mistake.

Show case

Demonstration

Not only we run them on file changes, alongside with related jest tests, but also we have this beautiful jest-like visualisation of the failure :-)

Usage

Make sure you have standard already installed.

npm install --save-dev jest-runner-standard

In your jest.config.js, assuming you want to run both your tests and linting:

module.exports = {
  projects: [
    {
      'runner': 'jest-runner-standard',
      'testMatch': ['<rootDir>/**/*.js'],
      'displayName': 'standard linting'
    },
    {
      'displayName': 'test'
    }
  ]
}

run

jest --watch

Profit!

Configuration

(Changed in 0.0.12) By default we don't fix standard errors. I would recommend using a IDE shortcut for that, or running a separate console command for that (standard --fix). Unfortunately having them done automatically on file-save tend to be a bit confusing to IDEs/Editors, for changing files you have your cursor in :-( But, if you want to try and see if the workflow suits you, run jest with STANDARD_AUTOFIX=true

Examples

This repo (if you want to use jest while modyfing the package, do npm link and then npm link jest-runner-standard)

also:

https://github.com/TheBrainFamily/TheBrain2.0

TODO

  • tests (I hope to get quibble work with jest.. so I can use testdoubles https://github.com/testdouble/quibble/issues/23 )
  • ?

CREDITS

Using internally a fork of https://github.com/rogeliog/create-jest-runner , and was obviously inspired by https://github.com/jest-community/jest-runner-eslint . Huge kudos to the author @rogeliog and contributors :)