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

@paciolan/code-standards

v1.1.0

Published

Paciolan shared code standards: ESLint flat configs, Prettier config, and TypeScript config presets

Readme

@paciolan/code-standards

Paciolan's shared code standards in one package, consumed through three subpath exports:

| Subpath | What it is | | --- | --- | | @paciolan/code-standards/eslint/* | ESLint flat configs (ESLint 9 and 10) plus the pac custom-rules plugin | | @paciolan/code-standards/prettier | Org-wide Prettier settings | | @paciolan/code-standards/tsconfig/* | TypeScript config presets (roles × layers) |

One dependency, one version bump per repo.

npm install --save-dev @paciolan/code-standards eslint prettier typescript

Peer requirements: eslint ^9 or ^10, prettier ^3, typescript >=5 (only if you use the TypeScript-aware configs or tsconfig presets).

ESLint

Pick the entry matching the repo, re-export it from eslint.config.mjs, and delete the repo's hand-rolled rules. Entries are cumulative — each one includes everything below it in the table:

| Entry | Adds | Use for | | --- | --- | --- | | eslint/base | eslint recommended, Prettier-as-error | plain JS utilities | | eslint/typescript | typescript-eslint recommended, unused-import auto-removal, _-prefix conventions | headless TS libraries | | eslint/react | browser globals, react-hooks, import sorting, JSX in .js/.jsx files | React components/libs (TypeScript or plain JS/JSX) | | eslint/react-query | @tanstack/query correctness rules | operator remote components | | eslint/node | node globals, security + n plugins, type-aware promise rules, no-console | node services (layered on typescript) | | eslint/nest | Nest-specific guards | NestJS services | | eslint/lambda | pac/no-direct-aws-sdk-v3-instance | AWS lambdas |

// eslint.config.mjs — operator remote component
import reactQuery from "@paciolan/code-standards/eslint/react-query";

export default reactQuery;
// eslint.config.mjs — node service / nest / lambda, adding repo-local tweaks
import node from "@paciolan/code-standards/eslint/node";

export default [
  ...node,
  { rules: { "@typescript-eslint/no-explicit-any": "off" } }
];

Notes:

  • Type-aware rules (no-floating-promises, no-misused-promises, return-await in the node family) resolve your tsconfig.json via typescript-eslint's project service. Run ESLint from the repo root; if you don't, add { languageOptions: { parserOptions: { tsconfigRootDir: import.meta.dirname } } }.
  • react-hooks is pinned to the classic pair (rules-of-hooks error, exhaustive-deps warn). The plugin's v6+ recommended preset bundles the React Compiler rule set; adopting those is a deliberate future change to this package.
  • Unused code: unused imports are removed by --fix; unused vars/args/catch params warn unless named with a leading _.
  • JS/JSX repos: the react family lints .js and .jsx files with JSX enabled and applies the same unused-code handling. Only browser globals are predefined; add test-runner and node globals (jest, webpack config files) in a repo-local entry.
  • Repos that register additional plugins (e.g. eslint-plugin-react) do so in their own config entry appended after the shared array.

Custom rules (pac/ plugin)

Standalone usage:

import pacPlugin from "@paciolan/code-standards/eslint/plugin";

export default [
  {
    plugins: { pac: pacPlugin },
    rules: { "pac/no-direct-aws-sdk-v3-instance": "error" }
  }
];

pac/no-direct-aws-sdk-v3-instance

Disallows binding *Client names from @aws-sdk/client-* packages (both import and require destructuring), so lambdas and services reuse the shared singleton clients instead of constructing their own per call site. Enabled by the lambda entry; test files are exempt. Disable it inline in the one module that owns the singletons:

// eslint-disable-next-line pac/no-direct-aws-sdk-v3-instance
import { S3Client } from "@aws-sdk/client-s3";

pac/jsx-uses-vars

Reports nothing. It marks variables referenced only from JSX (and the React binding the classic JSX runtime needs) as used, so the unused-code rules don't remove component imports in plain JS/JSX files. Enabled by the react family for .js/.jsx files; TypeScript files don't need it.

Only the React pragma is supported. An import named by a custom @jsx/@jsxFrag pragma (/** @jsx h */ with import { h } from "preact") is reported as unused, and --fix deletes it, which breaks the file at runtime. Under the automatic runtime, a leftover import React in a file with JSX is not reported.

Prettier

Point the prettier key of package.json at the shared config and delete .prettierrc:

{
  "prettier": "@paciolan/code-standards/prettier"
}

Settings: tabWidth: 2, trailingComma: "none" (matches the operator fleet and existing code; everything else is Prettier defaults). The ESLint configs enforce the same settings through prettier/prettier, so editors and CI can't drift.

TypeScript

Extend one role, then stack layers as needed (later entries win):

| Role | For | | --- | --- | | tsconfig/react-lib | browser React components/libs (typecheck-only; the bundler emits) | | tsconfig/node-service | node services compiled with tsc (NodeNext, no DOM lib) | | tsconfig/nest | NestJS services (CommonJS + legacy decorators) | | tsconfig/lambda | AWS lambdas (node-service alias, stable extension point) |

| Layer | Effect | | --- | --- | | tsconfig/strict | extra strictness: noUncheckedIndexedAccess, noImplicitReturns, noImplicitOverride | | tsconfig/jest | types: ["node", "jest"] | | tsconfig/vitest | types: ["node", "vitest/globals"] | | tsconfig/esmodule | NodeNext module semantics (flip a nest/service to ESM) | | tsconfig/commonjs | CommonJS module semantics |

// tsconfig.json — React component with vitest
{
  "extends": [
    "@paciolan/code-standards/tsconfig/react-lib",
    "@paciolan/code-standards/tsconfig/vitest"
  ],
  "include": ["src"]
}
// tsconfig.json — ESM NestJS service
{
  "extends": [
    "@paciolan/code-standards/tsconfig/nest",
    "@paciolan/code-standards/tsconfig/esmodule"
  ],
  "compilerOptions": { "baseUrl": "src/", "outDir": "dist/" },
  "include": ["./"]
}

Every role is strict: true. Heads-up: types replaces rather than merges across extends — a repo needing extra ambient types (e.g. @testing-library/jest-dom) sets the full types array itself.

Upgrading from 1.x to 2.0.0

2.0.0 adds plain JS/JSX support to the react family (eslint/react, eslint/react-query). TypeScript files lint as before. A repo on 1.x can get new findings:

  • .jsx files are linted. 1.x skipped them ("File ignored because no matching configuration was supplied"). Expect prettier/prettier, simple-import-sort, unused-import errors, and no-undef for jest/node names until the repo adds those globals.
  • .js, .mjs and .cjs files use the unused-code rules of TS files. Core no-unused-vars (error) is off. An unused import is an unused-imports/no-unused-imports error, and --fix deletes it. An unused variable is an unused-imports/no-unused-vars warning, unless its name starts with _.
  • no-unused-vars disable comments go stale in those files: each one is reported as an unused directive (a warning, or an error under reportUnusedDisableDirectives: "error"). Above an unused import, the import is now an error as well. Remove the comment, and remove the import or disable unused-imports/no-unused-imports instead.
  • JSX in .js files parses. 1.x failed with "Parsing error: Unexpected token <".

Versioning and publishing

Releases are cut by semantic-release from conventional commits on master (fix: → patch, feat: → minor). A rule/config change that will produce new errors in consuming repos is a breaking change — release it as a major.

Attribution

The tsconfig preset structure (roles extended by layers) is adapted from the MIT-licensed @code-style/typescript-configs by Louis Orleans.