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

eslint-config-crewmeister

v3.6.8

Published

The eslint config we use at crewmeister.

Downloads

106

Readme

eslint-config-crewmeister

The eslint config we use at crewmeister.

In order to asure we all use the same coding style across crewmeister, this repo defines the rules executed by eslint.

Usage

In any repo (that should be an npm package) install it like this

npm install eslint-config-crewmeister --save-dev

In order to use it, you can call eslint-crewmeister from within the project. The above install adds the executable to your node_modules/bin folder. You should add it to the package.json inside the scripts directory, e.g. like this

"scripts": {
  // ...
  "lint": "eslint-crewmeister src"
  // ...
}

Best practice is also to use the lint before the test run, so that no lint errors slips through. E.g. like this

"scripts": {
  // ...
  "test": "npm run lint && ..."
  // ...
}

Development

In development mode, where you also want to work on this repo here do the following:

> cd crewmeister/repos/eslint-config-crewmeister
npm link # creates a local sym link that refers to this repo here

> cd crewmeister/repos/<what-you-are-working-on>
> npm link eslint-config-crewmeister # use the sym link created above

Release

  1. update the [CHANGELOG.md]
  2. use npm version major to go up to the next version, always going up to next major for now

The Coding Style

By default our coding style is derived from the airbnb style. All modifications/addons are added here.

Table of Contents

  1. Globals

Globals

  • 1.1 Globals: For the tests we provide it and describe as globals

Formatting

  • 2.1 ??? do this that

    // short one line arrow functions
    // DON'T
    const func = () =>
      x + y;
        
    // DO
    const func = () => x + y;
        
    // long one line arrow functions, function body shall be on the next line, including ";"
    // DO
    const func = () =>
      oneLongVariable + anotherLongVariable - orSomethingThatMakesThisQuiteLong;
        
    // nested calls
    // DO
    const func = () =>
      house(thatHas(threeNeighbors())); // if line doesnt get tooo long
          
    const func = () =>
      house(
        thatHas(
          threeNeighbors())); // can also be written like this, for clarity
          
    // `promiseThat` and alikes are an exception  
    it('test description', () => promiseThat(
      something(), fulfills()));  
          
    it('test description', () => promiseThat(
      something(
        needsAParameter(
          whichNeedsAnotherOne())));  
              
    // logical blocks are separated by new-lines, functions/tests can be separated as above, 
        
    const SECOND = 1000;
    const MINUTE = 60 * SECOND;
    const HOUR = 60 * MINUTE;
    const DAY = 24 * HOUR;
        
    const house = new HouseMusic();
    // constants/variables that belong together as a logical block may be written without new-lines in between
        
    import { promiseThat } from 'hamjest';
    import {
      promiseThat,
      assertThat,
    } from 'hamjest';

    In doubt, in general inside one file, the coding style shall be kept! Which means, what is a logical block, where new-lines are added, this is determined by the existing file, which means, don't come in and change the complete file first.