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

@josegalre/code-standards-eslint

v0.1.3

Published

Shared ESLint config for code standards

Readme

@josegalre/code-standards-eslint

Composable ESLint flat-config layers, distributed as ESM JavaScript with TypeScript declarations.

Installation and optional integrations

ESLint is the required peer. Plugin packages are optional peers: install only those needed by the layers you select. The supported peer versions are declared in package.json.

For example, with Vite+:

vp add -D @josegalre/code-standards-eslint eslint @eslint/js

Any package manager can install the package; consumers do not need Vite+. Vite+ is only this repository's development toolchain.

Use independent subpaths for partial installations:

import { eslintConfig } from '@josegalre/code-standards-eslint/core';
import { javascript } from '@josegalre/code-standards-eslint/javascript';

export default eslintConfig(javascript());

eslintConfig only combines the layers you supply. It does not enable a preset implicitly. Pass an empty array (eslintConfig([])) when no layers are needed; ESLint requires at least one argument.

Root entry point

The root entry point retains all existing named exports:

import { eslintConfig, javascript } from '@josegalre/code-standards-eslint';

The root eagerly loads every layer and therefore needs every layer's plugin peers. It is retained for existing imports, not for dependency isolation. Use /core and per-layer subpaths when installing only selected peers.

Layers and their peers

All layers are named exports from their corresponding subpath. ESLint is required in addition to the peers below.

| Subpath | Additional peers | | ---------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | | /core, /custom, /types | None | | /antfu | eslint-plugin-antfu | | /javascript | @eslint/js | | /jsdoc | eslint-plugin-jsdoc | | /jsonc | eslint-plugin-jsonc | | /node | eslint-plugin-n | | /others | @e18e/eslint-plugin, eslint-plugin-de-morgan, eslint-plugin-zod | | /overrides | No imports; compose with the plugin layers whose rules are overridden | | /perfectionist | eslint-plugin-perfectionist | | /promise | eslint-plugin-promise | | /react | @eslint-react/eslint-plugin, eslint-plugin-react-doctor, eslint-plugin-react-refresh, eslint-plugin-react-you-might-not-need-an-effect | | /regexp | eslint-plugin-regexp | | /security | eslint-plugin-security | | /setup | globals | | /sonar | eslint-plugin-sonarjs | | /stylistic | @stylistic/eslint-plugin | | /testing | @vitest/eslint-plugin, eslint-plugin-testing-library | | /typescript | @typescript-eslint/eslint-plugin, @typescript-eslint/parser | | /unicorn | eslint-plugin-unicorn | | /yml | eslint-plugin-yml |

Integrations can have their own peer requirements, such as TypeScript. Respect those packages' peer ranges too. The local development installation deliberately includes all plugins to test the complete export surface.

Custom rules with TypeScript

The custom layer itself imports no external plugin. Select a TypeScript parser when linting TypeScript syntax:

import { eslintConfig } from '@josegalre/code-standards-eslint/core';
import { custom } from '@josegalre/code-standards-eslint/custom';
import parser from '@typescript-eslint/parser';

export default eslintConfig(
  {
    files: ['**/*.{ts,tsx}'],
    languageOptions: { parser },
  },
  custom(),
);

The layer provides three rules:

  • custom/no-duplicate-imports: merges compatible duplicate imports without dropping bindings or type modifiers.
  • custom/no-inline-type-imports: separates inline type specifiers into dedicated type imports.
  • custom/no-param-destructuring: moves value destructuring into the body and, with the default ignoreTypes: false, extracts direct inline object annotations into names such as ReadProps for function read.

Override their options in a following config object. The repository's src/rules directory contains the detailed contributor documentation and colocated rule tests; those source files are not included in the tarball.

Public types

import type { EslintConfig, RuleOptions } from '@josegalre/code-standards-eslint/types';

These types are also exported from /core and the root. Published declarations retain the typed ESLint rule options. The ESLint rule map remains open for third-party rules while validating known options. The generated Vitest valid-title options expose mustMatch and mustNotMatch explicitly alongside the boolean flags.

Linter.RulesConfig is a type alias, not a mergeable interface. Do not redeclare it through module augmentation; compose additional typed rules with EslintConfig and an intersection instead. Keep one instance of this package in each TypeScript program, since distinct installations can introduce duplicate alias declarations. This avoids requiring exactOptionalPropertyTypes in consumers: an interface extending both the open rule map and the optional known rules would fail when that compiler option is disabled.

Development

Run from the workspace root after restoring dependencies. Without a global Vite+ installation, use pnpm exec vp in place of vp to launch the pinned workspace tool.

vp run -r typecheck
vp run -r eslint:check
vp run -r test
vp run -r test:coverage
vp fmt --check
vp run -r build

Tests, formatting, task orchestration, and library packaging use Vite+. ESLint remains the canonical validator for the shared ESLint configurations and custom rules; the native Oxlint command is not a replacement for those checks. Type checking continues to use the configured TypeScript compiler through vp run typecheck.

The package's vite.config.ts owns its pack and test settings. Formatting settings are shared in the workspace-root vite.config.ts. The custom rule implementations retain their per-file 100% coverage thresholds.

The workspace pins Vite's alias to the core shipped with Vite+. That wrapper uses the Vite+ release number while embedding Vite 8.3.4. The workspace therefore has version-specific peer exceptions for the pinned Vitest, Mocker, and Vite React plugin versions, not blanket peer suppression. strictPeerDependencies stays enabled. See the upstream limitation. This development-only configuration does not affect the dependencies of consumers of the tarball.

Build and package

vp pack builds the library; vp pm pack creates the distributable package-manager tarball. They are different operations.

vp run @josegalre/code-standards-eslint#build
vp pm pack --filter @josegalre/code-standards-eslint --pack-destination ./artifacts

The prepack hook rebuilds the library before creating a tarball. Only dist and package metadata/documentation are published: source files, tests, development tooling, and plugins are not bundled into the package. The build emits only .js and .d.ts, preserving the source directory structure (for example, dist/configs/promise.js). Output names are stable, without hashed chunks, source maps, or debug annotations. No publishing command runs automatically.

Toolchain references