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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@elderbyte/code-style

v5.3.0

Published

Shared frontend code style rules for ElderByte projects

Readme

ElderByte Code Style

This package contains shared frontend code style rules for Prettier, ESLint and TypeScript..

Installation

npm install @elderbyte/code-style --save-dev

Instructions for IDE setup

All repos should use the shared web-code-style package for frontend linting and formatting.

To add this to a service you may copy the setup ngx-components master or follow the instructions below.

This issue replaces https://gitlab.com/elderbyte/shelf/eldorado/-/issues/80

Steps Necessary

In your web root run the following command

npm install @elderbyte/code-style --save-dev

Prettier

In the projects web root should only be the following prettier config: .prettierrc.js with this linet:

module.exports = require('@elderbyte/code-style/src/prettier/elder-prettier-config.js')

Eslint

In your projects web root should only be the following eslint config file: .eslintrc.json and it typically looks like the following example from ngx-components.

{
  "extends": "./node_modules/@elderbyte/code-style/src/eslint/.eslintrc.json",
  "overrides": [
    {
      "files": ["**/.ts"],
      "rules": {
        "@angular-eslint/directive-selector": [
          "error",
          {
            "type": "attribute",
            "prefix": ["elder", "starter"],
            "style": "camelCase"
          }
        ],
        "@angular-eslint/component-selector": [
          "error",
          {
            "type": "element",
            "prefix": ["elder", "starter"],
            "style": "kebab-case"
          }
        ]
      }
    }
  ]
}

The first line must extend the @elderbyte/code-style eslint settings ("extends": "./node_modules/@elderbyte/code-style/src/eslint/.eslintrc.json"). The "overrides" rules in the following example define projects specific rules for component / directive selector prefixes and should be adjusted as needed in the individual projects.

tsconfig

The root tsconfig.json should extend the default @elderbyte/code-style tsconfig.json settings ("extends": "./node_modules/@elderbyte/code-style/src/typescript/tsconfig.elder.json"). These settings only concern a hand full of TS code-style rules such as "strict: true". These rules can then be opted out if needed, the following is an example from ngx-components tsconfig.json:

{
  "extends": "./node_modules/@elderbyte/code-style/src/typescript/tsconfig.elder.json",
  "compileOnSave": false,
  "compilerOptions": {
    "baseUrl": "./",
    "importHelpers": true,
    "module": "es2020",
    "esModuleInterop": true,
    "outDir": "./dist/out-tsc",
    "sourceMap": true,
    "declaration": false,
    "moduleResolution": "node",
    "experimentalDecorators": true,
    "target": "ES2022",
    "useDefineForClassFields": false,
    "lib": ["es2020", "dom"],
    "paths": {
      "@elderbyte/ngx-starter": ["dist/elderbyte/ngx-starter"],
      "@elderbyte/ngx-starter/*": ["dist/elderbyte/ngx-starter/*"]
    },
    "strictNullChecks": false, // opt-out of strict check
    "noImplicitAny": false, // opt-out of strict check
    "noImplicitThis": false, // opt-out of strict check
    "noImplicitReturns": false, // opt-out of strict check
    "noImplicitOverride": false // opt-out of strict check
  }
}

Prettier format full project

To format the full codebase according to prettier rules you can add the following script to your project's package.json:

"format": "prettier --write \"src/**/*.{ts,js,json,css,scss,html}\""

This command will completely format all frontend specific files in your repo.

Using IDE plugins

VSCode

Install plugins ESLint and prettier. It's recommended to the set the prettier plugin to "format on save" benefit from auto code formatting.

IntelliJ

Install plugin "Prettier" if not already installed. ESLint should already be included in IntelliJ.

In your Prettier settings select "Automatic Prettier configuration" and make sure that the correct filetypes are listed. It is recommended in most cases to check "Run on Save" to benefit from auto-formatting.

Check your EsLint settings. The config must also be detected automatically and the files list must at least include ts and ts.

Some words on "eslint --fix"

EsLint features an automatic --fix option. Experience has shown this feature to not be as helpful as one might hope, so typically this can be ignored until a more useful way to use it is discovered in the future.