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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@node-ts/code-standards

v0.0.10

Published

A sane and opinionated set of linting rules for TypeScript

Readme

@node-ts/code-standards

CircleCI

An opinionated set of linting and build configurations for typescript projects to build modern, maintainable TypeScript projects.

Linting

The linting rules aim to produce terse, neat and consistent TypeScript code. This is valuable in any repo that has more than one contributor, but single author projects may also find it useful.

Below shows a small example of the code produced with this style:

// Enforce ES6 style imports
import { S3 } from 'aws-sdk' // single quotes, no semicolon on the end of lines

export class ObjectStorageService {

  constructor ( // double-space indents
    private readonly s3 = new S3()
  ) {
  }

  async upload (bucket: string, key: string, body: Buffer): Promise<void> { // enforce complete method signature
    const putObjectRequest: S3.Types.PutObjectRequest = { // prefer const
      Bucket: bucket,
      Key: key,
      Body: body
    }
    await this.s3.putObject(putObjectRequest).promise()
  }

}
// All files end with a new line (LF)

TypeScript Configuration

TypeScript options have been set in tsconfig.json that target Node v8 and up. These options can be overridden for web projects that target browsers.

Installation

  1. Install into your project along with tslint and typescript

    npm i @node-ts/code-standards tslint typescript --save-dev
  2. Copy .editorconfig into the root of your project. This will let your code editor confirm to many of the whitespacing rules automatically. See Editor Config on setting up your code editor for the first time.

  3. Create a tslint.json file in the root of your project with the following contents:

    {
      "extends": "./node_modules/@node-ts/code-standards/tslint.json"
    }
  4. Create a tsconfig.json file in the root of your project with the following contents. You may wish to extend this with further options

    {
      "extends": "./node_modules/@node-ts/code-standards/tsconfig.json"
    }
  5. Add the following to the scripts block in your project's package.json:

    {
      "lint": "tslint --project tsconfig.json 'src/**/*.ts'",
      "lint:fix": "npm lint --fix"
    }

IDE Configuration

IDE defaults for line spacing, whitespace etc can be set by placing an .editorconfig file (like the one in this package) into the root of your project. This is used by the Editor Config plugin of your preferred browser to set such defaults for your project.

This helps ensure any characters inserted by your editor conforms to the linting rules in this package.

Overriding Rules

Individual rules can be overridden if they do not suit the particular project they're being imported into. This is common for web sites that need to transpile slightly differently to a regular node application.

In tslint.json

Individual linting rules cna be overridden by specifying the updated rule in your local tslint.json file as such:

{
  "extends": "./node_modules/@node-ts/code-standards/tslint.json",
  "rules": {
    "semicolon": [true, "always"]
  }
}

In tsconfig.json

Similar to linting, TypeScript configuration options can be overridden by specifying the updated values in the local tsconfig.json file.

For example:

{
  "extends": "./node_modules/@node-ts/code-standards/tsconfig.json",
  "compilerOptions": {
    "target": "es6",
    "lib": ["es7"]
  }
}