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-pyosh

v4.0.0

Published

pyo-sh's TypeScript ESLint shareable config with Flat Config support (ESLint 9+)

Readme

eslint-config-pyosh

npm version License: MIT

pyo-sh's ESLint shareable config for TypeScript projects.

Referenced by eslint-config-airbnb (not based on).

⚠️ Version 4.0 Breaking Changes

Version 4.0 introduces breaking changes to support ESLint 9 and @typescript-eslint v8:

  • Requires ESLint 9.x (Flat Config format)
  • Requires @typescript-eslint v8.x
  • Removed .eslintrc format support
  • See Migration Guide below

If you need the old .eslintrc format, use version 3.x:

npm install --save-dev eslint-config-pyosh@3

Requirements

  • Node.js: 18.x or higher
  • ESLint: 9.x
  • TypeScript: 5.x (if using TypeScript configs)

Installation

Install the package and its peer dependencies:

npm install --save-dev eslint-config-pyosh \
  @eslint/js \
  @typescript-eslint/eslint-plugin \
  @typescript-eslint/parser \
  eslint \
  eslint-config-prettier \
  eslint-import-resolver-typescript \
  eslint-plugin-import \
  eslint-plugin-prettier \
  globals \
  prettier

Or check peer dependencies:

npm info "eslint-config-pyosh@latest" peerDependencies

Usage

Basic JavaScript Config

For JavaScript projects with import rules:

eslint.config.js:

const pyoshConfig = require('eslint-config-pyosh');

module.exports = [
  ...pyoshConfig,
];

TypeScript Config

For TypeScript projects:

eslint.config.js:

const pyoshConfig = require('eslint-config-pyosh');
const pyoshTsConfig = require('eslint-config-pyosh/typescript');

module.exports = [
  ...pyoshConfig,
  ...pyoshTsConfig,
];

Note: Make sure you have a tsconfig.json in your project root.

With Prettier

For projects using Prettier:

eslint.config.js:

const pyoshConfig = require('eslint-config-pyosh');
const pyoshTsConfig = require('eslint-config-pyosh/typescript');
const pyoshPrettierConfig = require('eslint-config-pyosh/prettier');

module.exports = [
  ...pyoshConfig,
  ...pyoshTsConfig,
  ...pyoshPrettierConfig,
];

Full Example

Complete configuration with custom settings:

eslint.config.js:

const js = require('@eslint/js');
const globals = require('globals');
const pyoshConfig = require('eslint-config-pyosh');
const pyoshTsConfig = require('eslint-config-pyosh/typescript');
const pyoshPrettierConfig = require('eslint-config-pyosh/prettier');

module.exports = [
  // Add ESLint recommended rules
  js.configs.recommended,

  // Add pyosh configs
  ...pyoshConfig,
  ...pyoshTsConfig,
  ...pyoshPrettierConfig,

  // Custom overrides
  {
    languageOptions: {
      globals: {
        ...globals.browser,
        ...globals.node,
        ...globals.es2021,
      },
    },
    ignores: ['dist/**', 'build/**', 'node_modules/**'],
  },
];

Exported Configs

This package exports three configurations:

eslint-config-pyosh (default)

Base JavaScript rules with import plugin configured.

Includes:

  • Core ESLint rules
  • Import/export rules
  • ES6+ features
  • Style and formatting rules

eslint-config-pyosh/typescript

TypeScript-specific rules and parser configuration.

Requires:

  • @typescript-eslint/eslint-plugin
  • @typescript-eslint/parser
  • eslint-import-resolver-typescript

Features:

  • TypeScript parser and plugin
  • Type-aware linting rules
  • Import resolver for TypeScript
  • Member ordering rules
  • Naming conventions

eslint-config-pyosh/prettier

Prettier integration with ESLint.

Requires:

  • eslint-config-prettier
  • eslint-plugin-prettier

Features:

  • Disables conflicting ESLint rules
  • Runs Prettier as an ESLint rule
  • JSX support

Migration from v3 to v4

What Changed?

  1. Configuration Format: .eslintrc.*eslint.config.js (Flat Config)
  2. ESLint Version: 8.x → 9.x
  3. @typescript-eslint Version: 6.x → 8.x
  4. Removed Rules: Some deprecated rules were replaced

Deprecated Rules Replaced

| Old Rule (v3) | New Rule (v4) | |---------------|---------------| | @typescript-eslint/ban-types | @typescript-eslint/no-empty-object-type@typescript-eslint/no-unsafe-function-type@typescript-eslint/no-wrapper-object-types | | @typescript-eslint/no-empty-interface | @typescript-eslint/no-empty-object-type | | @typescript-eslint/no-var-requires | @typescript-eslint/no-require-imports |

Migration Steps

  1. Update dependencies:

    npm install --save-dev \
      eslint@^9.0.0 \
      @typescript-eslint/eslint-plugin@^8.0.0 \
      @typescript-eslint/parser@^8.0.0 \
      globals@^15.0.0 \
      @eslint/js@^9.0.0
  2. Delete old config:

    rm .eslintrc.js .eslintrc.json .eslintrc.yml .eslintrc
  3. Create new Flat Config:

    Old .eslintrc.js:

    module.exports = {
      extends: [
        'eslint-config-pyosh',
        'eslint-config-pyosh/typescript',
        'eslint-config-pyosh/prettier',
      ],
    };

    New eslint.config.js:

    const pyoshConfig = require('eslint-config-pyosh');
    const pyoshTsConfig = require('eslint-config-pyosh/typescript');
    const pyoshPrettierConfig = require('eslint-config-pyosh/prettier');
    
    module.exports = [
      ...pyoshConfig,
      ...pyoshTsConfig,
      ...pyoshPrettierConfig,
    ];
  4. Update npm scripts (if needed):

    {
      "scripts": {
        "lint": "eslint .",
        "lint:fix": "eslint . --fix"
      }
    }
  5. Test your configuration:

    npm run lint

Troubleshooting

Import Plugin Not Found

If you see Could not find plugin "import":

Make sure all peer dependencies are installed:

npm install --save-dev eslint-plugin-import

TypeScript Parser Issues

If you see parser errors with TypeScript files:

  1. Ensure tsconfig.json exists in your project root
  2. Check that TypeScript files are matched by the config
  3. Verify @typescript-eslint/parser is installed

Prettier Conflicts

If you see style conflicts between ESLint and Prettier:

  1. Make sure eslint-config-prettier is the last config in your array
  2. Update your Prettier config to match your style preferences

Contributing

Issues and pull requests are welcome! Please visit the GitHub repository.

License

MIT © pyo-sh