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

@haskou/eslint-config

v0.2.1

Published

Shared ESLint and Prettier configuration for strict TypeScript projects

Readme

@haskou/eslint-config

CI npm version Renovate License: MIT

Shared ESLint flat config for TypeScript libraries using:

  • ESLint recommended rules
  • TypeScript parser and plugin
  • type-aware TypeScript rules through parserOptions.projectService
  • Prettier integration
  • SonarJS rules
  • Perfectionist import/object sorting
  • unused-imports cleanup

Install

Using npm:

npm i -D eslint prettier typescript @haskou/eslint-config

Using yarn:

yarn add -D eslint prettier typescript @haskou/eslint-config

Using pnpm:

pnpm add -D eslint prettier typescript @haskou/eslint-config

The ESLint plugins and parser are dependencies of this package, so consumer projects do not need to install the whole plugin zoo manually.

Code style

This config is opinionated. It is not just "run Prettier and avoid unused variables"; it pushes projects toward small, explicit, type-driven TypeScript.

The general vibe is close to backend/service code: clear modules, one main concept per file, explicit public/private class members, low cognitive complexity, and very little magic hidden in loose typing.

In practice, it encourages:

  • strict TypeScript usage: type-aware linting is enabled through parserOptions.projectService, floating promises are errors, unsafe returns are errors, and unsafe calls/arguments are at least warnings
  • explicit APIs: exported functions and methods need boundary types, except for known serialization-style methods like toPrimitives
  • class structure with discipline: class members must be ordered, access modifiers are required, files should not accumulate several top-level classes/types/interfaces, and there is a maximum of one class per file
  • small methods and simple control flow: complexity above 8 fails, cognitive complexity above 10 fails, nesting deeper than 3 warns, and repeated or collapsible branches are reported by SonarJS
  • predictable formatting: 2 spaces, semicolons, single quotes, trailing commas, 80 character lines, and arrow parentheses are handled by Prettier
  • predictable ordering: imports must be sorted, object keys are sorted with warnings, and unused imports are errors
  • fewer mutation-heavy habits: parameter reassignment warns, one-var is forbidden, object shorthand is required, and old CommonJS require imports are errors

It is intentionally stricter than a casual frontend preset. The goal is code that reads like maintained application/domain code: explicit boundaries, boring diffs, short files, clear class APIs, and fewer "I'll remember this later" assumptions.

ESLint usage

Create eslint.config.mjs in the consumer project:

import haskou from '@haskou/eslint-config';

export default haskou;

Then add scripts:

{
  "scripts": {
    "lint": "eslint .",
    "lint:fix": "eslint . --fix"
  }
}

Custom usage

import { createHaskouConfig } from '@haskou/eslint-config';

export default createHaskouConfig({
  ignores: ['generated/**'],
});

Available options:

type HaskouConfigOptions = {
  files?: string[];
  ignores?: string[];
  javascriptFiles?: string[];
  parserOptions?: Record<string, unknown>;
  testFiles?: string[];
  tsconfigRootDir?: string;
};

Prettier usage

Create prettier.config.mjs in the consumer project:

import prettierConfig from '@haskou/eslint-config/prettier';

export default prettierConfig;

Release Branches

CI publishes npm versions from pull requests merged into the default branch according to the source branch prefix:

| Branch prefix | npm version bump | | --- | --- | | fix/* | Patch | | feat/* | Minor | | break/* | Major |

Other branch names run validation only and do not publish.