Launch Week Day 1: Socket for Jira Is Now Available.Learn More
Socket
Book a DemoSign in
Socket

@yoast/eslint-config

Package Overview
Dependencies
Maintainers
8
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@yoast/eslint-config

ESLint configuration for Yoast projects

latest
Source
npmnpm
Version
8.2.0
Version published
Weekly downloads
501
25.88%
Maintainers
8
Weekly downloads
 
Created
Source

@Yoast/eslint-config

A shared ESLint configuration used across a variety of Yoast projects. Anyone is welcome to use this configuration, but it is primarily intended for internal use.

Presets

This configuration contains three presets:

PresetDescriptionUsage
yoast/recommendedThe base config. This should almost always be used. It's based on the @eslint/js/recommended and eslint-plugin-import config and contains stylistic configuration for all Yoast JavaScript.import yoastConfig from @yoast/eslint-config"
yoast/reactAn extension for the base config, adding the React plugin and React/JSX-specific rules.import { reactConfig } from @yoast/eslint-config"
yoast/nodeAn extension for the base config, adding the Node plugin adding some rules that are relevant when working with Node.JS.import { nodeConfig } from @yoast/eslint-config"

Example usage

// eslint.config.mjs
import globals from "globals";
import yoastConfig, { reactConfig } from "@yoast/eslint-config";

/** @type {import('eslint').Linter.Config[]} */
export default [
	{ ignores: [ "build" ] },
	...yoastConfig,
	...reactConfig,
	{
		languageOptions: {
			ecmaVersion: "latest",
			globals: {
				...globals.browser,
			},
		},
		rules: {
			// Deviate from the Yoast config to allow for not using the error that is caught.
			"no-unused-vars": [ "error", { caughtErrors: "none" } ],
		},
	}
];

Keywords

eslint

FAQs

Package last updated on 07 Jan 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts