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

@vumotions/codestandards

v1.0.1

Published

Shared code standards — ESLint, Prettier, Commitlint, Husky, lint-staged

Readme

@vumotions/codestandards

npm version license node

Opinionated code standards for TypeScript projects. One command to setup ESLint, Prettier, Commitlint, Husky, and lint-staged — ready to go.


Features

  • Interactive CLI — detects existing configs, asks before replacing
  • Shared configs — ESLint rules, Prettier formatting, Commitlint conventions
  • Git hooks — Husky + lint-staged pre-configured for pre-commit and commit-msg
  • Fully extensible — override any config in your project
  • Zero manual setup — one command installs everything

Quick Start

npx @vumotions/codestandards init

The CLI will:

  1. Detect existing configs in your project
  2. Ask what to do with each (replace or skip)
  3. Scaffold config files that reference shared standards
  4. Optionally install all peer dependencies
  5. Initialize husky git hooks

CLI Reference

Usage: codestandards init [options]

Options:
  --force          Replace all existing configs without asking
  --skip-existing  Only setup tools that are not yet configured
  -h, --help       Display help

Examples

# Interactive (default) — asks for each existing config
npx @vumotions/codestandards init

# Replace all existing configs without asking
npx @vumotions/codestandards init --force

# Only setup tools that are not yet configured
npx @vumotions/codestandards init --skip-existing

What Gets Created

| File | Tool | Description | |------|------|-------------| | eslint.config.mjs | ESLint | Flat config with TypeScript + Prettier integration | | .prettierrc | Prettier | Formatting rules (no semi, single quotes, 120 width) | | commitlint.config.ts | Commitlint | Conventional commit enforcement | | .husky/commit-msg | Husky | Runs commitlint on commit messages | | .husky/pre-commit | Husky | Runs lint-staged before commit | | package.json | lint-staged | ESLint + Prettier on staged files |


Extending and Overriding

All configs can be extended or overridden in your project.

ESLint

// eslint.config.mjs
import eslint from '@eslint/js'
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended'
import globals from 'globals'
import tseslint from 'typescript-eslint'
import { eslintConfig } from '@vumotions/codestandards'

export default tseslint.config(
  { ignores: ['eslint.config.mjs'] },
  eslint.configs.recommended,
  ...tseslint.configs.recommendedTypeChecked,
  eslintPluginPrettierRecommended,
  {
    languageOptions: {
      globals: { ...globals.node },
      sourceType: 'commonjs',
      parserOptions: {
        projectService: true,
        tsconfigRootDir: import.meta.dirname
      }
    }
  },
  { rules: eslintConfig.rules },
  // Your overrides
  { rules: { 'no-console': 'off' } }
)

Prettier

Override any value in .prettierrc:

{
  "semi": true,
  "printWidth": 100
}

Or reference the shared config and override programmatically:

// prettier.config.mjs
import { prettierConfig } from '@vumotions/codestandards'
export default { ...prettierConfig, semi: true }

Commitlint

// commitlint.config.ts
import type { UserConfig } from '@commitlint/types'
import { commitlintConfig } from '@vumotions/codestandards'

export default {
  ...commitlintConfig,
  rules: {
    ...commitlintConfig.rules,
    'scope-enum': [2, 'always', ['api', 'admin', 'storefront']]
  }
} satisfies UserConfig

lint-staged

Edit the lint-staged field in package.json:

{
  "lint-staged": {
    "src/**/*.ts": ["eslint --fix", "prettier --write"],
    "**/*.{json,md,yml,yaml}": ["prettier --write"],
    "**/*.css": ["prettier --write"]
  }
}

Shared Config Defaults

Prettier

| Option | Value | |--------|-------| | semi | false | | singleQuote | true | | printWidth | 120 | | trailingComma | none | | tabWidth | 2 | | jsxSingleQuote | true | | endOfLine | auto |

ESLint Rules

Formatting | Rule | Value | |------|-------| | prettier/prettier | error (endOfLine: auto) |

Async Safety | Rule | Value | |------|-------| | @typescript-eslint/no-floating-promises | error | | @typescript-eslint/return-await | error (in-try-catch) | | no-async-promise-executor | error |

Type Safety | Rule | Value | |------|-------| | @typescript-eslint/no-explicit-any | warn | | @typescript-eslint/no-non-null-assertion | warn | | @typescript-eslint/prefer-nullish-coalescing | warn | | @typescript-eslint/prefer-optional-chain | error | | @typescript-eslint/only-throw-error | error |

Consistency | Rule | Value | |------|-------| | @typescript-eslint/consistent-type-imports | error (type-imports) | | @typescript-eslint/no-import-type-side-effects | error | | @typescript-eslint/no-unused-vars | error (ignore _ prefix) |

Bug Prevention | Rule | Value | |------|-------| | no-console | warn | | no-debugger | error | | eqeqeq | error (always) | | no-template-curly-in-string | error |

Commitlint

Allowed commit types: feat, fix, chore, refactor, perf, test, docs, style, ci, revert


Peer Dependencies

Installed automatically when you choose "Install peer dependencies" during init:

| Package | Version | |---------|---------| | eslint | >= 9 | | prettier | >= 3 | | typescript-eslint | >= 8 | | @eslint/js | >= 9 | | eslint-config-prettier | >= 10 | | eslint-plugin-prettier | >= 5 | | globals | >= 16 | | husky | >= 9 | | lint-staged | >= 16 | | @commitlint/cli | >= 19 |

All peer dependencies are marked as optional — the CLI only installs what you need.


License

MIT