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

@dubium/eslint-config

v1.0.15

Published

Flat ESLint config for Dubium projects using TypeScript, React, and accessibility best practices.

Readme

@dubium/eslint-config

Flat ESLint config for Dubium projects — modular, extensible, and strictly structured. Supports TypeScript, React, and accessibility (a11y) best practices.

Русская версия


📦 Installation

Install the config and the required peer dependencies according to your needs.

🔹 Base configuration (base)

npm install -D eslint @eslint/js globals @dubium/eslint-config
# or
yarn add -D eslint @eslint/js globals @dubium/eslint-config

It is also recommended to install globals if you use global variables in your ESLint config.


🔹 TypeScript (typescript)

npm install -D typescript-eslint @typescript-eslint/parser @typescript-eslint/eslint-plugin
# or
yarn add -D typescript-eslint @typescript-eslint/parser @typescript-eslint/eslint-plugin

🔹 React (react)

npm install -D eslint-plugin-react eslint-plugin-react-hooks eslint-plugin-react-refresh
# or
yarn add -D eslint-plugin-react eslint-plugin-react-hooks eslint-plugin-react-refresh

🔹 Accessibility (jsxA11y)

npm install -D eslint-plugin-jsx-a11y
# or
yarn add -D eslint-plugin-jsx-a11y

🔹 Prettier

npm install -D prettier eslint-config-prettier eslint-plugin-prettier
# or
yarn add -D prettier eslint-config-prettier eslint-plugin-prettier

⚙️ Usage

Create an eslint.config.cjs file:

import { defineConfig } from "eslint/config"
import { base } from "@dubium/eslint-config/base"
import { typescript } from "@dubium/eslint-config/typescript"
import { react } from "@dubium/eslint-config/react"
import globals from "globals"
import prettier from "eslint-config-prettier"
import eslintPluginPrettier from "eslint-plugin-prettier"

// Модифицируем typescript конфиг для поддержки type-aware правил
const enhancedTypescript = {
  ...typescript,
  languageOptions: {
    ...typescript.languageOptions,
    parserOptions: {
      ...( typescript.languageOptions?.parserOptions || {} ),
      project: "./tsconfig.json",
      tsconfigRootDir: process.cwd(),
      // Для поддержки path aliases (@/*)
      EXPERIMENTAL_useProjectService: true,
    },
  },
}

export default defineConfig( [
  base,
  enhancedTypescript,
  react,
  {
    plugins: {
      prettier: eslintPluginPrettier,
    },
    rules: {
      "prettier/prettier": "error",
    },
    languageOptions: {
      globals: {
        ...globals.node,
        ...globals.browser,
      },
    },
  },
  prettier,
  {
    files: [ "**/*.schema.ts" ],
    rules: {
      "@typescript-eslint/no-unsafe-call": "off",
      "@typescript-eslint/no-unsafe-assignment": "off"
    }
  }
] )

Or Example for Nestjs

import { defineConfig } from "eslint/config"
import { base } from "@dubium/eslint-config/base"
import { typescript } from "@dubium/eslint-config/typescript"
import globals from "globals"
import prettier from "eslint-config-prettier"
import eslintPluginPrettier from "eslint-plugin-prettier"

// Модифицируем typescript конфиг для поддержки type-aware правил
const enhancedTypescript = {
	...typescript,
	languageOptions: {
		...typescript.languageOptions,
		parserOptions: {
			...(typescript.languageOptions?.parserOptions || {}),
			project: "./tsconfig.json",
			tsconfigRootDir: process.cwd(),
			// Для поддержки path aliases (@/*)
			EXPERIMENTAL_useProjectService: true,
		},
	},
}

export default defineConfig([
	base,
	enhancedTypescript,
	{
		plugins: {
			prettier: eslintPluginPrettier,
		},
		rules: {
			"prettier/prettier": "error",
		},
		languageOptions: {
			globals: {
				...globals.node,
				...globals.jest,
			},
		},
	},
	prettier,
	{
		rules: {
			"@typescript-eslint/no-unsafe-call": "off",
			"@typescript-eslint/no-unsafe-assignment": "off",
			"new-cap": [
				"error",
				{
					capIsNew: false,
					newIsCap: false,
					properties: true,
				},
			],
			"class-methods-use-this": "off",
		},
	},
])

You can also use only the configs you need:

export default defineConfig([
  base,
  typescript,
]);

If your project uses global variables (e.g. window, process, jest, etc.), we recommend installing the globals package and adding them to your ESLint configuration:

import globals from "globals";

export default defineConfig({
  languageOptions: {
    globals: {
      ...globals.browser,
      ...globals.node,
      ...globals.jest,
    },
  },
  // other settings
});

🧩 Available configs

| Config | Import from | Description | | ------------ | ---------------------------------- | ------------------------------------ | | base | @dubium/eslint-config/base | Basic JS/TS setup + globals | | typescript | @dubium/eslint-config/typescript | TypeScript support | | react | @dubium/eslint-config/react | React, hooks, and React Refresh | | jsxA11y | @dubium/eslint-config/jsx-a11y | Accessibility (a11y) recommendations |


🔍 Inspect final config

npx eslint --print-config src/index.ts

Or, if you have the script added:

npm run lint:inspect

🔧 Requirements

  • Node.js >=18
  • ESLint ^9.0.0 (Flat Config)
  • Your project must use "type": "module"

📝 License

MIT © Dubium