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

@lyrolab/frontend-shared

v1.2.0

Published

Shared frontend ESLint/Prettier/TypeScript presets and architecture guidelines for Lyrolab web apps.

Downloads

419

Readme

@lyrolab/frontend-shared

Shared ESLint / Prettier / TypeScript presets and architecture guidelines for Lyrolab web frontends. The frontend counterpart to @lyrolab/nest-shared.

Install

npm i -D @lyrolab/frontend-shared

Usage

ESLint (eslint.config.mjs)

import { lyrolabFrontend } from "@lyrolab/frontend-shared/eslint"

export default lyrolabFrontend({
  dataQueryDirs: ["data/queries"],
  restrictedWrapperImports: [
    { name: "posthog-js", allowedDir: "modules/analytics" },
  ],
  ignores: ["src/routeTree.gen.ts", "src/clients/**"],
  i18n: true,
  storybook: true,
})

Options:

| Option | Default | Purpose | | -------------------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------- | | dataQueryDirs | ["data/queries"] | Dirs where React Query hooks may be imported. These dirs are also the data layer and may not import presentation code. | | restrictedWrapperImports | [] | Modules confined to one dir (e.g. an analytics client → its wrapper dir). | | maxLinesPerFunction | 150 | Warn threshold for function length. Pass false to disable. | | typeChecked | false | Enables the type-checked tier (no-floating-promises, etc.). Set tsconfigRootDir too. | | ignores | [] | Extra ignore globs (generated files, build output). | | i18n | false | true or { ignoreWords, ignoreFiles }. Flags literal JSX text (i18next/no-literal-string), not attributes. | | storybook | false | Storybook recommended rules for *.stories.@(ts\|tsx); relaxes react/no-multi-comp and max-lines-per-function there. | | extend | [] | Extra flat configs appended after the preset. |

The preset bundles: @eslint/js recommended, typescript-eslint, eslint-plugin-react-hooks (rules-of-hooks + exhaustive-deps), react/no-multi-comp (one component per file), max-lines-per-function (warn), @tanstack/eslint-plugin-query, Prettier, and the architecture guardrails: React Query and wrapper-only imports are confined to their dirs, and the data layer may not import the presentation layer (components/, pages/, entrypoints/, layout/). Browser globals are enabled for source files and Node globals for *.config.* files.

i18n

i18n: true reports literal text inside JSX (<p>Hello</p>) while leaving attributes (className, type, …) alone. Test files (*.test.*, *.spec.*, __tests__/, __mocks__/) and stories are always skipped. Options:

i18n: {
  ignoreWords: ["^©$"], // extra regex sources allowed as literal text
  ignoreFiles: ["src/dev/**"], // extra globs to skip
},

Storybook

storybook: true applies eslint-plugin-storybook's recommended story rules to *.stories.ts / *.stories.tsx, and turns off react/no-multi-comp and max-lines-per-function in those files so decorators and render helpers can live next to the stories.

Requirements and pnpm

Peers: eslint ^9.7, prettier ^3, typescript >=5.6 <6.1 (the range supported by typescript-eslint). Every plugin the preset imports is a regular dependency, so it works under pnpm's strict, non-hoisted layout without extra installs. npm run test:pnpm proves it: it packs the package, installs it into a temporary pnpm project with hoisting disabled, and lints a small React + TypeScript sample with the default options and each opt-in.

Prettier (prettier.config.mjs)

import config from "@lyrolab/frontend-shared/prettier" with { type: "json" }
export default config

TypeScript (tsconfig.json)

{ "extends": "@lyrolab/frontend-shared/tsconfig" }

Guidelines

The full architecture guidelines ship in GUIDELINES.md and are readable from node_modules/@lyrolab/frontend-shared/GUIDELINES.md (also exported as @lyrolab/frontend-shared/guidelines).

Releasing

Automated via semantic-release on push to main (conventional commits, npm Trusted Publishing via OIDC). No manual version bumps — the version field stays 0.0.0-semantically-released.