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

@sabzidev/eslint-rules

v1.0.9

Published

A collection of ESLint rules for better code quality, consistency, and maintainability.

Readme

🛠️ @sabzidev/eslint-rules

A collection of custom ESLint rules for improving code quality, consistency, and maintainability.


👀 Overview

GITHUB | NPM


✨ Features

  • Recommended configuration for ESLint Flat Config.
  • Easy integration into existing ESLint setups.

🚀📦 Installation & Usage

Install the package as a development dependency:

pnpm i -D @sabzidev/eslint-rules

Choose one of the following configuration methods for your eslint.config.js file:

● Recommended Configuration

Add the recommended configuration:

import sabzidev from "@sabzidev/eslint-rules";
import { defineConfig } from "eslint/config";

export default defineConfig([
  // Your existing configurations
  sabzidev.configs.recommended,
]);

This enables all recommended rules with their predefined severity levels.

● Custom Configuration

Alternatively, register the plugin and configure each rule individually:

import sabzidev from "@sabzidev/eslint-rules";
import { defineConfig } from "eslint/config";

export default defineConfig([
  {
    plugins: {
      "@sabzidev": sabzidev,
    },
    rules: {
      "@sabzidev/merge-duplicate-id-and-classname-props": "warn",
      "@sabzidev/merge-exports": "warn",
      "@sabzidev/no-invalid-id-and-classname-value": "warn",
      "@sabzidev/no-useless-empty-type": "warn",
      "@sabzidev/no-useless-template-literal": "warn",
      "@sabzidev/padding-before-jump-statement": "warn",
      "@sabzidev/sort-comments": "warn",
      "@sabzidev/sort-jsx-props": "warn",
      "@sabzidev/sort-props": "warn",
    },
  },
]);

⭐ Recommended ESLint & Prettier Setup

Install the required dependencies:

pnpm i -D eslint prettier @fullstacksjs/eslint-config @sabzidev/eslint-rules eslint-plugin-sonarjs eslint-plugin-unicorn

For a comprehensive code-quality setup, combine ESLint, Prettier, @fullstacksjs/eslint-config, @sabzidev/eslint-rules, eslint-plugin-sonarjs, and eslint-plugin-unicorn.

This setup combines code formatting, code-quality checks, bug detection, maintainability rules, and custom ESLint rules.

This setup combines code-quality rules, bug detection, maintainability checks, and custom linting rules.

Configuration for eslint.config.js:

import { defineConfig } from "@fullstacksjs/eslint-config";
import sabzidev from "@sabzidev/eslint-rules";
import sonarjs from "eslint-plugin-sonarjs";
import unicorn from "eslint-plugin-unicorn";

const baseRules = {
  "func-style": ["warn", "expression"],
  quotes: [
    "error",
    "double",
    { avoidEscape: true, allowTemplateLiterals: false },
  ],
  eqeqeq: ["error", "always"],
  "no-console": "warn",
};

const plugins = [
  sabzidev.configs.recommended,
  sonarjs.configs.recommended,
  unicorn.configs.recommended,
];

const pluginsRules = {
  "unicorn/filename-case": "off",
  "unicorn/name-replacements": [
    "error",
    {
      replacements: {
        prop: false,
        props: false,
        param: false,
        params: false,
        ref: false,
        refs: false,
        prev: false,
        e: false,
        res: false,
        err: false,
      },
    },
  ],
  "unicorn/no-null": "off",
  "unicorn/prefer-global-this": "off",
  "unicorn/default-export-style": "off",
};

const config = defineConfig(
  { rules: baseRules, tailwind: { entryPoint: "./src/input.css" } },

  plugins,
  { rules: pluginsRules },
);

export default config;

Note: Adjust the rules to suit your project and ensure compatibility with your installed plugin versions.


📋 Available Rules

| Rule | Description | | :--------------------------------------- | :------------------------------------------------------------------------- | | merge-duplicate-id-and-classname-props | Merges duplicate id and className props. | | merge-exports | Merges or organizes export declarations. | | no-invalid-id-and-classname-value | Detects invalid id and className values. | | no-useless-empty-type | Detects unnecessary empty types. | | no-useless-template-literal | Detects unnecessary template literals. | | padding-before-jump-statement | Enforces padding before jump statements. | | sort-comments | Sorts comments. | | sort-jsx-props | Sorts JSX props. | | sort-props | Sorts object properties, function parameters, and TypeScript type members. |


👨‍💻 Developer

Developed by Abolfazl Sabzmohammadi.