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

@wesleytodd/eslint-plugin-ini

v0.0.2

Published

eslint plugin for processing ini files

Downloads

88

Readme

ESLint plugin for ini files

Lint ini format files (ex. .npmrc) along with your JavaScript.

Usage

npm install -D eslint @wesleytodd/eslint-plugin-ini
// eslint.config.js
import { defineConfig } from 'eslint/config';
import ini from '@wesleytodd/eslint-plugin-ini';

export default defineConfig([
  ini.configs.recommended,
  ini.configs.npmrc
]);

Configuration

Two default configs are provided:

  1. recommended: For general ini files
  2. npmrc: For .npmrc files

Usage with other plugins/configs

Because this plugin requires a custom Language, it might need other plugins/configs to specify files instead of relying on the defaults. For example, neostandard has a few plugins that use the eslint defaults that will break when including this plugin. To fix this, be sure to explicitly include the defaults:

import { defineConfig } from 'eslint/config';
import neostandard from 'neostandard';
import ini from 'eslint-plugin-ini';

const ns = neostandard({
  semi: true,
  noJsx: true
});

for (const conf of ns) {
  if (
    conf.name === 'neostandard/base' ||
    conf.name === 'neostandard/modernization-since-standard-17' ||
    conf.name === 'neostandard/style' ||
    conf.name === 'neostandard/style/modernization-since-standard-17' ||
    conf.name === 'neostandard/semi'
  ) {
    conf.files = ['**/*.js', '**/*.cjs', '**/*.mjs'];
  }
}

export default defineConfig([
  ...ns,
  ini.configs.npmrc
]);

Rules

require-field: Require fields to be present

rules: {
  'ini/require-field': [
    'error', // error or warn
    ['foo', 'bar'] // list of required fields
  ]
}

delim-whitespace: Standardize whitespace around the = delimiter

rules: {
  'ini/delim-whitespace': [
    'error', // error or warn
    'none' // none or single-space
  ]
}

trailing-whitespace: Remove trailing whitespace on lines

rules: {
  'ini/trailing-whitespace': [
    'error' // error or warn
  ]
}

duplicate-keys: Disallow duplicate keys

rules: {
  'ini/duplicate-keys': [
    'error' // error or warn
  ]
}

npmrc-registry: Set registry configurations

rules: {
  'ini/npmrc-registry': [
    'error', // error or warn
    'https://registry.npmjs.com/', // a default registry url or an object (see below)
    true // strict mode disallows unknown registries
  ]
}

Setting scoped registries and optional registries can be done by passing an object:

rules: {
  'ini/npmrc-registry': [
    'error', // error or warn
    {
      // Can still set a string URL value
      default: 'https://registry.npmjs.com',
      // Require the scope @foo to be present with this url
      '@foo': {
        url: 'https://registry.foo.com/',
        required: true
      },
      // If the scope @bar is present it must use this url
      '@bar': {
        url: 'https://registry.bar.com/',
        required: false
      }
    }
  ]
}

npmrc-legacy-peer-deps: Require fields to be present

rules: {
  'ini/npmrc-legacy-peer-deps': [
    'error', // error or warn
    'absent' // absent, true, false (as strings, uses this value directly in fixes)
  ]
}

npmrc-email: Remove deprecated email field

rules: {
  'ini/npmrc-email': [
    'error' // error or warn
  ]
}

npmrc-always-auth: Remove deprecated always-auth field

rules: {
  'ini/npmrc-always-auth': [
    'error' // error or warn
  ]
}

npmrc-no-auth: Remove any auth tokens

rules: {
  'ini/npmrc-no-auth': [
    'error' // error or warn
  ]
}

Usage with neovim/conform

To enable linting/fixing automatically in neovim via conform, you can use the 'dosini' filetype:

return {
  "stevearc/conform.nvim",
  opts = {
    formatters_by_ft = {
      -- lint ini/.npmrc files
      dosini = { "eslint_d" },
    },
  },
}