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

@krknet/eslint-plugin

v2.0.2

Published

KRKnet Standard Rules

Readme

@krknet/eslint-plugin

KRKnet ESLint rules and flat-config helpers for Node, Vue frontend, and SuiteScript projects.

Requirements

  • Node.js >= 22
  • ESLint ^9

Installation

npm install --save-dev eslint @krknet/eslint-plugin

Quick Start (Flat Config)

Create or update your ESLint config:

// eslint.config.mjs
import {
    createBase,
    createNode,
    createFrontend,
    plugin
} from '@krknet/eslint-plugin'

export default [
    ...createBase(),
    ...createNode(),
    createFrontend({ tailwindPath: './app/frontend/layout/main.css' }),

    // Optional: manual rule setup for custom rule usage in other file groups.
    {
        files: ['**/*.vue'],
        plugins: {
            krk: plugin
        },
        rules: {
            'krk/vue-html-linebreak': 'warn',
            'krk/vue-sort-components': 'warn'
        }
    }
]

Exports

This package exports:

  • plugin: ESLint plugin object (rules, configs)
  • rules: custom rule map
  • configs: config factory map
  • createBase(options?)
  • createNode(options?) returns two config entries (CJS + ESM)
  • createNodeCjs(options?)
  • createNodeEsm(options?)
  • createFrontend(options?)
  • createSuiteScriptBase()
  • createSuiteScriptSource(options?)

Config Helpers

createBase

Shared baseline config. You can add ignore patterns with createBase({ ignores: [...] }).

createNode

Returns an array with dedicated configs for CommonJS and ESM Node files.

Options:

  • aliases (default { '>': './app' })
  • rules (applies to both CJS and ESM entries)
  • cjsRules (CJS-only overrides)
  • esmRules (ESM-only overrides)
  • plugins
  • settings

createFrontend

Vue-focused config with import ordering, Vue rules, Tailwind rules, and KRK custom rules.

Options:

  • tailwindPath (optional better-tailwindcss entry point)
  • aliases (default { '@': './app/frontend/components' })
  • plugins

createSuiteScriptBase / createSuiteScriptSource

Helpers for SuiteScript build and source folders.

Supported Rules

krk/vue-html-linebreak

Enforces splitting long Vue start tags into one-attribute-per-line form and merges short multiline tags back to one line.

Options:

  • split number (default 80)
  • merge number (default 50)

Example:

{
    rules: {
        'krk/vue-html-linebreak': ['warn', { split: 100, merge: 60 }]
    }
}

krk/vue-sort-components

Sorts component registration keys in Vue components objects.

Options:

  • 'asc' (default)
  • 'desc'

Example:

{
    rules: {
        'krk/vue-sort-components': ['warn', 'asc']
    }
}