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

@laruiss/eslint-stylistic-extension

v1.0.0

Published

ESLint rules for line-break placement that the core stylistic rule set doesn't cover yet, starting with per-parameter newlines in function definitions.

Downloads

104

Readme

@laruiss/eslint-stylistic-extension

ESLint rules for line-break placement in places the core @stylistic/eslint-plugin rule set doesn't cover yet.

Rules

function-declaration-argument-newline

The definition-side counterpart to @stylistic/function-call-argument-newline. That rule only controls line breaks between the arguments of a call (foo(a, b, c)); this rule controls line breaks between the parameters of a function definition (function foo(a, b, c) {}, function expressions, and arrow functions).

@stylistic/function-paren-newline is the closest existing rule, but it only requires a break right after ( and right before ) — the parameters themselves can still all sit on one line between those breaks. This rule adds the missing per-parameter behavior, mirroring function-call-argument-newline option-for-option.

Options: "always" (default) | "never" | "consistent".

'@laruiss/newline/function-declaration-argument-newline': ['error', 'always']
// always
const createNumericRule = (
  isInvalid: (value: number) => boolean,
  getErrorMessage: () => string,
) => { /* ... */ }

import-specifier-newline

@stylistic/object-curly-newline already treats the braces of import { ... } and export { ... } the same way it treats object literal braces — so with a config like { multiline: true, minProperties: 2 }, the { and } correctly end up on their own line once there are 2+ named specifiers.

But @stylistic/object-property-newline, the rule that puts each item on its own line, only listens to ObjectExpression, TSTypeLiteral and TSInterfaceBody — it doesn't cover ImportDeclaration or ExportNamedDeclaration. So the specifiers themselves can still end up packed onto a single line between the braces:

import {
  describe, expect, it, beforeEach, vi,
} from 'vitest'

This rule adds the missing per-specifier behavior for named imports and exports, mirroring function-declaration-argument-newline option-for-option. Default and namespace specifiers (import Foo from, import * as ns from) aren't part of the { } group and are left untouched.

Options: "always" (default) | "never" | "consistent".

'@laruiss/newline/import-specifier-newline': ['error', 'always']
// always
import {
  describe,
  expect,
  it,
  beforeEach,
  vi,
} from 'vitest'

object-pattern-property-newline

@stylistic/object-curly-newline covers ObjectPattern for the braces too — so the { and } of a destructured parameter, variable, or catch binding correctly end up on their own line once there are 2+ properties.

But @stylistic/object-property-newline only listens to ObjectExpression, TSTypeLiteral and TSInterfaceBody — it doesn't cover ObjectPattern. So a destructured pattern's properties can still end up packed together between the braces:

const usePrefixedErrorState = ({
  prefix, errorProps = useInjectedErrorProps(), tabKeyTransform,
}: Options) => { /* ... */ }

This rule adds the missing per-property behavior for destructured object patterns (function parameters, variable declarations, catch clauses), mirroring the other two rules option-for-option.

Options: "always" (default) | "never" | "consistent".

'@laruiss/newline/object-pattern-property-newline': ['error', 'always']
// always
const usePrefixedErrorState = ({
  prefix,
  errorProps = useInjectedErrorProps(),
  tabKeyTransform,
}: Options) => { /* ... */ }

Usage

Flat config (eslint.config.js / eslint.config.ts):

import newline from '@laruiss/eslint-stylistic-extension'

export default [
  {
    plugins: {
      '@laruiss/newline': newline,
    },
    rules: {
      '@laruiss/newline/function-declaration-argument-newline': ['error', 'always'],
      '@laruiss/newline/import-specifier-newline': ['error', 'always'],
      '@laruiss/newline/object-pattern-property-newline': ['error', 'always'],
    },
  },
]

Development

pnpm install
pnpm build   # compiles src/ -> dist/