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

eslint-config-greenpie

v16.1.0

Published

GreenPie's ESLint and oxlint configs

Readme

Pretty tough linting configs

npm version

This package provides ESLint's shared config that designed to be strict as hell.

Usage

Install the base package with required dependencies:

npm install eslint-config-greenpie eslint --save-dev

Then install additional dependencies depending on your use case:

For oxlint users:

npm install oxlint oxlint-tsgolint --save-dev

For ESLint users:

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

For TypeScript projects:

npm install typescript-eslint --save-dev

For Vue.js projects:

npm install eslint-plugin-vue --save-dev

Oxlint configuration

If using oxlint, create a .oxlintrc.jsonc file in the root of your project with the following content:

{
  "$schema": "./node_modules/oxlint/configuration_schema.json",

  "extends": [
    "./node_modules/eslint-config-greenpie/configs/oxlintrc.jsonc"
  ]
}

Vitest rules are included in the shared Oxlint config through the package's internal configs/oxlintrc.vitest.jsonc addon, so the consumer setup stays at a single extends entry.

Note: The internal Vitest addon currently applies to **/*.test.ts and **/__tests__/**/*.ts.

Oxlint CLI

Run oxlint with the following command:

oxlint

If you want Oxlint output in an agent-friendly format, use:

oxlint --format agent

Note: The shared config has reportUnusedDisableDirectives enabled by default and does not honor eslint-disable* comments. Use oxlint-disable* comments for Oxlint suppressions. If you are still migrating from ESLint comments, you can override this in your local .oxlintrc.jsonc:

{
  "options": {
    "reportUnusedDisableDirectives": "off",
    "respectEslintDisableDirectives": true
  }
}

ESLint configuration

import { defineConfig } from 'eslint/config';
import { configs } from 'eslint-config-greenpie';

export default defineConfig(
  ...configs.default,
  ...configs.vue
);

See more examples below.

Configs (ESLint)

| Config | Description | |-----------|--------------------------------| | default | Includes js and ts configs | | js | Includes JavaScript rules | | ts | Includes TypeScript rules | | vue | Includes rules for Vue.js |

Type-aware linting (oxlint)

Type-aware linting is enabled by default in this config via options.typeAware: true. This enables powerful type-checking rules like:

  • no-floating-promises — ensures promises are properly handled
  • no-unsafe-* — prevents unsafe type operations (no-unsafe-argument, no-unsafe-assignment, no-unsafe-call, no-unsafe-member-access, no-unsafe-return)
  • await-thenable — only await thenable values
  • no-misused-promises — prevents incorrect promise usage
  • And many more type-aware rules

To use type-aware rules, install both oxlint and oxlint-tsgolint.

Type-aware linting requires a tsconfig.json file in your project root. Oxlint will automatically discover and use it for type checking.

Configuration examples

Oxlint

{
  "$schema": "./node_modules/oxlint/configuration_schema.json",

  "extends": [
    "./node_modules/eslint-config-greenpie/configs/oxlintrc.jsonc"
  ],

  "rules": {
    "eslint/no-magic-numbers": "off",
  },

  "overrides": [{
    "files": ["src/**/*.{ts,vue}"],

    "env": {
      "browser": true
    }
  }, {
    "files": ["vite.config.mts"],

    "env": {
      "node": true
    }
  }]
}

JS/TS rules

import { configs } from 'eslint-config-greenpie';

export default [
  ...configs.js
];

JS + Vue

import { configs } from 'eslint-config-greenpie';

export default [
  ...configs.js,
  ...configs.vue
];

JS + TS + Vue

You will probably need to configure another parser for the <script> tag.

import { configs } from 'eslint-config-greenpie';

export default [
  ...configs.default,
  ...configs.vue
];

Tips

Allow short identifiers for id-length

The eslint/id-length rule enforces minimum identifier length (default: 2). If your project has legitimate short identifiers, add only those in your local .oxlintrc.jsonc.

{
  "extends": [
    "./node_modules/eslint-config-greenpie/configs/oxlintrc.jsonc"
  ],

  "rules": {
    "eslint/id-length": ["error", {
      "max": 40,

      "exceptions": [
        "t", // translation function, e.g. from vue-i18n
        "v"  // valibot schema builder, e.g. `v.string()`, `v.object({...})`, etc.
      ]
    }]
  }
}

Allow namespace imports for specific packages

The import/no-namespace rule disallows import * as syntax. If you need to use namespace imports for a specific package (e.g. valibot), you can override the rule in your local .oxlintrc.jsonc:

{
  "extends": [
    "./node_modules/eslint-config-greenpie/configs/oxlintrc.jsonc"
  ],

  "rules": {
    "import/no-namespace": ["error", {
      "ignore": ["valibot"]
    }]
  }
}

Links

Development

Running tests

npm run test

Tests use Vitest and the ESLint programmatic API to lint code snippets directly against the configs defined in this repository.