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

@labeg/code-style

v6.10.19

Published

Code styles rules for difference linters, for create best code quality

Readme

CodeStyle

npm version npm downloads GitHub build status CodeQL

Comprehensive ESLint configuration for TypeScript and React projects with strict code quality rules.

Features

  • ESLint 9+ with flat config format
  • TypeScript support with strict rules
  • React 19+ and React Hooks best practices
  • Accessibility checks (jsx-a11y)
  • Code style enforcement (@stylistic)
  • Modern JavaScript standards

Included Plugins

This configuration includes and configures the following ESLint plugins:

Installation

Install the package as a dev dependency:

npm install -D @labeg/code-style

Usage

ESLint 9+ (Flat Config)

Create or update your eslint.config.js:

import codeStyle from "@labeg/code-style";

export default [
    ...codeStyle,
    {
        // Your custom overrides
        rules: {
            // Override specific rules here
        }
    }
];

Next.js Projects

import nextVitals from "eslint-config-next/core-web-vitals";
import codeStyle from "@labeg/code-style";

export default [
    ...nextVitals,
    ...codeStyle,
    {
        rules: {
            // Next.js specific overrides
            "react/react-in-jsx-scope": "off"
        }
    }
];

TypeScript Projects

The configuration automatically works with TypeScript files (.ts, .tsx). Make sure you have typescript installed:

npm install -D typescript

Code Style Philosophy

Always End Lines with Operators or Semicolons

Lines should always end with an operator or semicolon to make it clear whether the statement continues. This saves reading time and prevents execution errors.

// Bad - unclear if statement continues
let sample = sample.sample.sample
                 + sample.sample.sample;

// Good - operator at end shows continuation
let sample = sample.sample.sample +
                 sample.sample.sample;

Always Use Braces for If Statements

Even for single-line statements, always use braces. This prevents bugs during refactoring and improves code clarity.

// Bad
if (n > 10) alert("Bad");

// Good
if (n > 10) {
    alert("Good");
}

Use Double Quotes and Template Literals

Use double quotes for consistency with other languages, and template literals for string interpolation.

const message = "rolls";
const count = 5;

// Bad
const data = 'Sending "grandma" ' + count * 5 + ' ' + message + '.';

// Good
const data = `Sending "grandma" ${count * 5} ${message}.`;

Line Length: 120 Characters, Indent: 4 Spaces

Optimal line length is 120 characters for readability across different monitors. Use 4-space indentation for clear nesting levels.

Security

For security concerns, please see our Security Policy.

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.

License

MIT © Eugene Labutin

Links