🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@eslint/config-helpers

Package Overview
Dependencies
Maintainers
2
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@eslint/config-helpers

Helper utilities for creating ESLint configuration

0.3.0
latest
Source
npm
Version published
Weekly downloads
12M
-2.41%
Maintainers
2
Weekly downloads
 
Created
Source

@eslint/config-helpers

Description

Helper utilities for creating ESLint configuration.

Installation

For Node.js and compatible runtimes:

npm install @eslint/config-helpers
# or
yarn add @eslint/config-helpers
# or
pnpm install @eslint/config-helpers
# or
bun add @eslint/config-helpers

For Deno:

deno add @eslint/config-helpers

Usage

defineConfig()

The defineConfig() function allows you to specify an ESLint configuration with full type checking and additional capabilities, such as extends. Here's an example:

// eslint.config.js
import { defineConfig } from "@eslint/config-helpers";
import js from "@eslint/js";

export default defineConfig([
	{
		files: ["src/**/*.js"],
		plugins: { js },
		extends: ["js/recommended"],
		rules: {
			semi: "error",
			"prefer-const": "error",
		},
	},
	{
		files: ["test/**/*.js"],
		rules: {
			"no-console": "off",
		},
	},
]);

globalIgnores()

The globalIgnores() function allows you to specify patterns for files and directories that should be globally ignored by ESLint. This is useful for excluding files that you don't want to lint, such as build directories or third-party libraries. Here's an example:

// eslint.config.js
import { defineConfig, globalIgnores } from "@eslint/config-helpers";

export default defineConfig([
	{
		files: ["src/**/*.js"],
		rules: {
			semi: "error",
			"prefer-const": "error",
		},
	},
	globalIgnores(["node_modules/", "dist/", "coverage/"]),
]);

License

Apache 2.0

Sponsors

The following companies, organizations, and individuals support ESLint's ongoing maintenance and development. Become a Sponsor to get your logo on our READMEs and website.

Diamond Sponsors

AG Grid

Platinum Sponsors

Automattic Airbnb

Gold Sponsors

Qlty Software trunk.io Shopify

Silver Sponsors

Vite Liftoff American Express StackBlitz

Bronze Sponsors

Sentry Syntax Cybozu Anagram Solver Icons8 Discord GitBook Neko Nx Mercedes-Benz Group HeroCoders LambdaTest

Technology Sponsors

Technology sponsors allow us to use their products and services for free as part of a contribution to the open source ecosystem and our work.

Netlify Algolia 1Password

Keywords

eslint

FAQs

Package last updated on 25 Jun 2025

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