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

eslint-plugin-signal-naming-conventions

v1.0.1

Published

ESLint plugin enforcing configurable Angular signal naming conventions.

Readme

eslint-plugin-signal-naming-conventions

ESLint 10 plugin that enforces a configurable naming convention for Angular signals.

Installation

npm install --save-dev eslint-plugin-signal-naming-conventions

Usage

The plugin exports a built-in recommended flat config that enables signal-naming-conventions/signal-naming-convention.

Recommended (default):

const { defineConfig } = require('eslint/config');
const signalNamingConventions = require('eslint-plugin-signal-naming-conventions');
const tsParser = require('@typescript-eslint/parser');

module.exports = defineConfig([
  {
    files: ['**/*.ts'],
    languageOptions: {
      parser: tsParser,
      ecmaVersion: 2022,
      sourceType: 'module',
    },
  },
  ...signalNamingConventions.configs.recommended,
]);

Optional manual override (advanced):

const { defineConfig } = require('eslint/config');
const signalNamingConventions = require('eslint-plugin-signal-naming-conventions');
const tsParser = require('@typescript-eslint/parser');

module.exports = defineConfig([
  {
    files: ['**/*.ts'],
    languageOptions: {
      parser: tsParser,
      ecmaVersion: 2022,
      sourceType: 'module',
    },
    plugins: {
      'signal-naming-conventions': signalNamingConventions,
    },
    rules: {
      'signal-naming-conventions/signal-naming-convention': ['error', { prefix: '$' }],
    },
  },
]);

Rule: signal-naming-convention

Ensures variables and class properties initialized with Angular signal APIs use a configured prefix.

By default, the rule detects:

  • signal(...)
  • computed(...)
  • toSignal(...)
  • aliases imported from @angular/core, such as import { signal as s } from '@angular/core'

It applies to variable declarations and class properties. Destructuring, non-Identifier class keys, and declarations without initializers are ignored.

Options

{
  "prefix": "$",
  "functions": ["signal", "computed", "toSignal"],
  "enforceForProperties": true
}
  • prefix: string or string array. Defaults to "$".
  • functions: signal factory function names to detect. Defaults to ["signal", "computed", "toSignal"].
  • enforceForProperties: whether to check class properties. Defaults to true.

Examples

Invalid:

const count = signal(0);
const total = computed(() => count() + 1);

class Counter {
  count = signal(0);
}

Valid:

const $count = signal(0);
const $total = computed(() => $count() + 1);

class Counter {
  $count = signal(0);
}

Alias imports are supported:

import { signal as s } from '@angular/core';

const $count = s(0);

Multiple prefixes:

const config = {
  rules: {
    'signal-naming-conventions/signal-naming-convention': ['error', { prefix: ['$', 'signal'] }],
  },
};

Custom detected functions:

const config = {
  rules: {
    'signal-naming-conventions/signal-naming-convention': [
      'error',
      { functions: ['signal', 'computed', 'toSignal', 'rxSignal'] },
    ],
  },
};

Disable class property enforcement:

const config = {
  rules: {
    'signal-naming-conventions/signal-naming-convention': ['error', { enforceForProperties: false }],
  },
};

Autofix

Autofix prepends the first configured prefix to the local declaration name only:

const count = signal(0);

becomes:

const $count = signal(0);

The fixer does not rename references or perform cross-file changes.

Development

npm install
npm run lint
npm run build
npm test