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

v4.0.0

Published

My ESLint config

Downloads

250

Readme

eslint-config-vladpuz

My ESLint config

Features:

  • Supports JavaScript, TypeScript, mixed codebases and framework-agnostic JSX (pure base for use with any framework!)
  • Auto fix for formatting via eslint-stylistic (targeted for use without Prettier)
  • Does not conflict with TypeScript regardless of tsconfig.json options (TypeScript fully replaces some rules)
  • Supports .gitignore by default
  • Ability to customize your own stylistic preferences
  • Does not use other pre-configured setups, all rules are manually reviewed (except stylistic, uses a custom preset)
  • No warn severity, only error

Principles:

  • Safety
  • Consistency
  • Minimal for readability
  • Stability for diff

If you need React, use eslint-config-vladpuz-react.

Installation

npm install --save-dev eslint eslint-config-vladpuz

Usage

Create a file eslint.config.js:

import vladpuz from 'eslint-config-vladpuz'

export default vladpuz()

If you want to use Prettier for formatting other file types (json, md, html, css, ...), disable Prettier for JavaScript and TypeScript files. For this, create a file .prettierignore:

# javascript
*.js
*.jsx
*.mjs
*.cjs

# typescript
*.ts
*.tsx
*.mts
*.cts

Run ESLint in check mode:

eslint .

Run ESLint in fix mode:

eslint --fix .

Options

Overview:

interface Options {
  filesJs?: string[] // Default - ['**/*.js', '**/*.jsx', '**/*.mjs', '**/*.cjs']
  filesTs?: string[] // Default - ['**/*.ts', '**/*.tsx', '**/*.mts', '**/*.cts']
  env?: Array<keyof typeof globals> // Default - ['builtin', 'node', 'browser']
  gitignore?: boolean | GitignoreOptions // Default - true
  typescript?: boolean | ParserOptions // Default - true
  stylistic?: boolean | StylisticOptions // Default - true
  jsx?: boolean // Default - true
}

filesJs, filesTs

Type: string[]

Default for js: ['**/*.js', '**/*.jsx', '**/*.mjs', '**/*.cjs']

Default for ts: ['**/*.ts', '**/*.tsx', '**/*.mts', '**/*.cts']

Override patterns for js and ts files:

import vladpuz, { FILES_JS, FILES_TS } from 'eslint-config-vladpuz'

// For example any additional extensions
export default vladpuz({
  filesJs: [...FILES_JS, '**/*.extension'],
  filesTs: [...FILES_TS, '**/*.extension'],
})

env

Type: string[]

Default: ['builtin', 'node', 'browser']

Overrides environments providing predefined global variables:

import vladpuz from 'eslint-config-vladpuz'

export default vladpuz({
  env: ['node'], // For example only node
})

gitignore

Type: boolean | GitignoreOptions

Default: true

Enables/disables support for .gitignore or configures its search options.

import vladpuz from 'eslint-config-vladpuz'

export default vladpuz({
  // Default gitignore config is:
  gitignore: {
    strict: false,
  },
  // You can disable gitignore:
  // gitignore: false,
})

typescript

Type: boolean | ParserOptions

Default: true

Enables/disables TypeScript or customizes its parser options.

import vladpuz from 'eslint-config-vladpuz'

export default vladpuz({
  // Default typescript config is:
  typescript: {
    projectService: true,
  },
  // You can disable typescript:
  // typescript: false,
})

stylistic

Type: boolean | StylisticOptions

Default: true

Enables/disables Stylistic or configures your own stylistic preferences:

import vladpuz from 'eslint-config-vladpuz'

export default vladpuz({
  // Default stylistic config is:
  stylistic: {
    indent: 2,
    quotes: 'single',
    semi: false,
  },
  // You can disable stylistic:
  // stylistic: false,
})

jsx

Type: boolean

Default: true

Enables/disables JSX:

import vladpuz from 'eslint-config-vladpuz'

export default vladpuz({
  jsx: false,
})

Additional

errorify(target)

Converts severity of rules warn/1 to error/2.

  • target (Linter.Config[] | Linter.Config | Linter.RulesRecord)

Return: Linter.Config[] | Linter.Config | Linter.RulesRecord

Intended for adding external configs while preserving the overall severity style (without warn):

import vladpuz, { errorify } from 'eslint-config-vladpuz'
import x from 'eslint-plugin-x'

export default [...vladpuz(), errorify(x.configs.recommended)]

getCompilerOptions(parserOptions?, force?)

Gets compiler options from tsconfig.json.

  • parserOptions (ParserOptions = {}) - Parser options for searching tsconfig.json.
  • force (boolean = false) - Disables cache.

Return: CompilerOptions

Intended for dynamic management of rules depending on compiler options from tsconfig.json:

import { getCompilerOptions } from 'eslint-config-vladpuz'

const compilerOptions = getCompilerOptions()

console.log(compilerOptions.strict)
console.log(compilerOptions.noEmit)

testPluginConfig(pluginName, pluginRules, config)

Tests plugin config via node:test.

  • pluginName (string | null) - Plugin name.
  • pluginRules (Record<string, Rule.RuleModule>) - Plugin rules.
  • config (Linter.Config) - Tested config.

Return: void

Intended for testing plugin configs inside eslint-config-vladpuz and extended configs (e.g. eslint-config-vladpuz-react/src/configs.test.ts):

import { testPluginConfig } from 'eslint-config-vladpuz'
import tseslint from 'typescript-eslint'

testPluginConfig('@typescript-eslint', tseslint.plugin.rules, {
  name: 'vladpuz/typescript',
  files: [],
  plugins: {
    '@typescript-eslint': tseslint.plugin,
  },
  rules: {},
})

FAQ

Prettier?

Why I don't use Prettier

Why no warn severity?

ESLint Warnings Are an Anti-Pattern

Where is the list of rules?

src/configs

Versioning Policy

This project follows Semantic Versioning. However, since this is just a configuration requiring opinions and many changeable components, we don't consider rule changes critical.

See Also