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

@cassidydc/eslint-plugin-wordpress

v1.2.2

Published

ESLint plugin for using a modern flat config in WordPress development.

Downloads

26

Readme

ESLint Plugin WordPress

This ESLint plugin adapts the @wordpress/eslint-plugin for use with the modern ESLint v9+ flat config format. It enables you to configure ESLint using an eslint.config.js file, replacing the legacy .eslintrc approach for a more streamlined and flexible setup.

Installation

Install the module

npm install @cassidydc/eslint-plugin-wordpress --save-dev

Additional Suggested Packages

WP Prettier

A fork of Prettier that introduces the --paren-spacing option, enabling formatting that aligns with WordPress Coding Standards.

Install the module

npm install prettier@npm:wp-prettier@latest --save-dev

WordPress Overrides

WordPress's packages are often slow to update dependencies due to their interconnected monorepo and the need for backward compatibility. As a result, some packages used by this plugin, such as @wordpress/babel-preset-default and @wordpress/prettier-config, may include outdated dependencies that could have known security vulnerabilities.

If you encounter an outdated or vulnerable dependency in a WordPress package, you can use the overrides field in your project's root package.json to specify a patched version.

For example, at the time of writing, @wordpress/babel-preset-default depended on an older version of @babel/runtime (v7.25.7) that contains a security issue. To ensure your project uses a secure version, add an override such as this:

{
	"overrides": {
		"@wordpress/babel-preset-default": {
			"@babel/runtime": "^7.28.2"
		}
	}
}

Usage

The following example files should be placed in your project's root directory.

Example package.json file

{
	"name": "example-wordpress-project",
	"version": "1.0.0",
	"type": "module",
	"devDependencies": {
		"@cassidydc/eslint-plugin-wordpress": "^1.0.7",
		"prettier": "npm:wp-prettier@^3.0.3"
	},
	"overrides": {
		"@wordpress/babel-preset-default": {
			"@babel/runtime": "^7.28.2"
		}
	},
	"scripts": {
		"format": "npx prettier . --write",
		"lint:scripts": "npx eslint",
		"lint:scripts:fix": "npx eslint --fix"
	}
}

Example eslint.config.js file

/**
 * ESLint configuration.
 * @see https://eslint.org/docs/latest/use/configure/configuration-files
 * @type {import("eslint").Linter.Config[]}
 */

'use strict';

import globals from 'globals';
import js from '@eslint/js';
import tseslint from 'typescript-eslint';
import wordpress from '@cassidydc/eslint-plugin-wordpress';
import { defineConfig, globalIgnores } from 'eslint/config';
import { importX } from 'eslint-plugin-import-x';

export default defineConfig( [
	globalIgnores( [
		'**/.dev-assets/',
		'**/build/',
		'**/vendor/',
		'**/*.min.js',
	] ),
	{
		plugins: {
			'import-x': importX,
			js,
			tseslint,
			wordpress,
		},
		extends: [
			'import-x/recommended',
			'js/recommended',
			'tseslint/recommended',
			'wordpress/recommended',
		],
		files: [ '**/*.{js,mjs,cjs,ts,mts,cts,jsx,tsx}' ],
		languageOptions: {
			globals: {
				...globals.browser,
			},
		},
		linterOptions: {
			reportUnusedInlineConfigs: 'warn',
		},
		rules: {
			'@typescript-eslint/no-require-imports': 'warn',
			'no-unused-vars': 'warn',
			yoda: [ 'warn', 'never' ],
		},
	},
] );

Example prettier.config.js file

/**
 * Prettier configuration.
 * @see https://prettier.io/docs/configuration
 * @type {import("prettier").Config}
 */

'use strict';

import wpConfig from '@wordpress/prettier-config';

const config = {
	...wpConfig,
	plugins: [ 'prettier-plugin-multiline-arrays' ],
	overrides: [
		...wpConfig.overrides,
		{
			files: '*.{css,sass,scss}',
			options: {
				printWidth: 600, // To not break long selector combinations
			},
		},
		{
			files: [ '*.json', '*.jsonc' ],
			options: {
				multilineArraysWrapThreshold: 0,
			},
		},
	],
};

export default config;

Scripts

You can then use the following scripts from your command line:

| Command | Action | | ------------------------- | ---------------------------------------------------------------------- | | npm run format | Formats files with Prettier | | npm run lint:script | Lists all problems found by ESLint | | npm run lint:script:fix | Auto-fixes problems found by ESLint (not all issues can be auto-fixed) |

Found an Issue?

If you come across any issues, please report them on GitHub.