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-ts-naming-convention

v2.0.1-beta

Published

Builds config for @typescript-eslint/naming-convention rule

Readme

eslint-ts-naming-conventions

Config generator for typescript-eslint plugin @typescript-eslint/naming-convention rule.

This package helps to keep code naming conventions up to date as your projects grow. If you use eslint shared configs you can update it to share your updates among many projects but still keep the small differences from one project to another different.

It generates a .js file containing the @typescript-eslint/naming-convention rule definition ready to be extended in your .eslintrc.js file.

Allows full customization upon its default config.

Table of contents:

Installation

$ yarn install eslint-ts-naming-conventions

Usage

You can set how your rule configuration should be

import eslintTsNamingConventions from 'eslint-ts-naming-convention'

await eslintTsNamingConventions({

    reportLevel: 'warn',
    filePath: '.eslint-ts-naming-conventions.js',

    // Here you can set variables shared across multiple configs for the rule
    general: {
        functionPrefixes: ['create', 'retrieve', 'search', 'delete'],
        booleanPrefixesLC: ['is', 'should', 'enable', 'require'],
        booleanPrefixesUC: ['IS', 'ENABLE'],
        arraySuffixesLC: ['s', 'List'],
        arraySuffixesUC: ['S', 'LIST'],
    },

    // Here you provide your own configs to overwrite defaults as you like
    specific: [
        {
            selector: 'variable',
            format: ['camelCase', 'PascalCase', 'UPPER_CASE'],
            leadingUnderscore: 'allow',
        },
    ]
)

The above code will generate the .eslint-ts-naming-conventions.js file whose content will look like:

module.exports = {
    rules: {
        "@typescript-eslint/naming-convention": [
            "warn",
            {
                "selector": "variable",
                "format": [
                    "camelCase",
                    "PascalCase",
                    "UPPER_CASE"
                ],
                "leadingUnderscore": "allow"
            },
            {
                "selector": "variable",
                "types": [
                    "boolean"
                ],
                "format": [
                    "camelCase",
                    "PascalCase",
                    "UPPER_CASE"
                ],
                "custom": {
                    "match": true,
                    "regex": "^[is|should|enable|require|force|IS|ENABLE]"
                }
            },
            {
                "selector": "variable",
                "types": [
                    "array"
                ],
                "format": [
                    "camelCase",
                    "PascalCase",
                    "UPPER_CASE"
                ],
                "custom": {
                    "match": true,
                    "regex": "[s|List|S|LIST]$"
                }
            },
            {
                "selector": "function",
                "format": [
                    "camelCase"
                ],
                "custom": {
                    "match": true,
                    "regex": "^[create|retrieve|search|delete]"
                }
            },
        ]
    }
}

Finally in your .eslintrc.js file you extend your fresh generated config:

module.exports = {
    parserOptions: {
        project: './tsconfig.json',
        tsconfigRootDir: __dirname,
    },
    extends: './.eslint-ts-naming-convention.js',
}

Default general settings

Here is the default value for 'general' configuration property.

export const DEFAULT_SETTINGS: Required<GeneralSettingsTP> = {
    
    classSuffixes: [],
    
    enumSuffixes: ['Enum'],
    interfacePrefixes: ['I'],
    typeSuffixes: ['TP'],
    typeSuffixesGenerics: ['GTP'],
    
    arraySuffixesUC: ['S', 'ARRAY', 'LIST'],
    arraySuffixesLC: ['s', 'array', 'Array', 'List'],
    booleanPrefixesUC: ['IS', 'ENABLE', 'REQUIRE', 'FORCE', 'DONT'],
    booleanPrefixesLC: ['is', 'are', 'should', 'must', 'can', 'have', 'has', 'did', 'dont', 'will', 'enable', 'require', 'force'],

    functionPrefixes: [
        'add',
        'are',
        'bond',
        'build',
        'check',
        'concat',
        'create',
        'delete',
        'disable',
        'divide',
        'does',
        'enable',
        'execute',
        'find',
        'finish',
        'fix',
        'get',
        'grant',
        'handle',
        'has',
        'initialize',
        'is',
        'list',
        'merge',
        'mount',
        'multiply',
        'onChange',
        'onError',
        'parse',
        'preValidate',
        'register',
        'remove',
        'run',
        'save',
        'search',
        'send',
        'set',
        'sort',
        'split',
        'start',
        'strip',
        'subtract',
        'sum',
        'throw',
        'transform',
        'update',
        'validate',
        'verify',
        'warn',
    ],
}