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

v4.12.0

Published

Provides Webpack's eslint rules as an extensible shared config

Readme

npm test discussions

eslint-config-webpack

Install

npm i -D eslint-config-webpack

Usage

Webpack's eslint config contains all of our ESLint rules.

In your eslint.config.js add ...

import { defineConfig } from "eslint/config";
import config from "eslint-config-webpack";

export default defineConfig([
	{
		extends: [config],
	},
]);

Webpack-specific configs

Three opt-in configs cover conventions only webpack's own repositories need. They are not part of recommended — extend them explicitly:

import { defineConfig } from "eslint/config";
import config from "eslint-config-webpack";
import configs from "eslint-config-webpack/configs.js";

export default defineConfig([
	{
		extends: [
			config,
			configs["webpack/special"],
			configs["webpack/schemas"],
			configs["webpack/types"],
		],
	},
]);

| Config | Files | What it checks | | ----------------- | ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | webpack/special | source files | webpack/require-license-comment — every file opens with the MIT license header. | | webpack/schemas | **/schemas/**/*.json | webpack/valid-schema — the JSON schema conventions webpack's declaration and validator generators rely on. webpack/format-schema — key order, and definitions kept in sync with the base schema (autofixable). | | webpack/types | **/lib/**/*.{js,mjs,cjs} | webpack/inherit-jsdoc — an overriding method carries the JSDoc of the method it overrides (autofixable). |

webpack/valid-schema accepts options for which keywords a schema may use. keywords replaces the default set — webpack's own — outright, allow adds to it and disallow removes from it:

export default defineConfig([
	{
		extends: [configs["webpack/schemas"]],
		rules: {
			"webpack/valid-schema": [
				"error",
				{ allow: ["x-generator"], disallow: ["cli"] },
			],
		},
	},
]);

Every other check is unconditional. The rule reports a schema that uses a keyword outside that set, puts anything next to a $ref, gives type more than one value, uses instanceof without tsType, absolutePath off a string or properties off a non-object, describes properties without additionalProperties, nests or mis-sizes oneOf/anyOf/allOf, or leaves a property without a description starting in uppercase and ending in a single dot.

webpack/inherit-jsdoc needs type information, so webpack/types sets up @typescript-eslint/parser with projectService — the project therefore needs a tsconfig.json covering the linted files, and typescript installed. The rule copies the base class method's JSDoc onto every override that is missing it or has drifted from it, dropping @abstract. stripTags chooses which tags are dropped:

export default defineConfig([
	{
		extends: [configs["webpack/types"]],
		rules: {
			"webpack/inherit-jsdoc": ["error", { stripTags: ["abstract", "virtual"] }],
		},
	},
]);

Getters, setters, static methods and methods overriding a declaration file (so Object.toString or Set.add) are left alone. Inheritance is resolved through the whole chain, so restoring a JSDoc that several classes deep an override inherits takes more than one --fix run — repeat it until the tree stops changing.