Gathering detailed insights and metrics for @eslint/eslintrc
Gathering detailed insights and metrics for @eslint/eslintrc
Gathering detailed insights and metrics for @eslint/eslintrc
Gathering detailed insights and metrics for @eslint/eslintrc
@rushstack/eslint-patch
Enhance ESLint with better support for large scale monorepos
eslint-config-alloy
AlloyTeam ESLint 规则
@types/eslint__eslintrc
Stub TypeScript definitions entry for @eslint/eslintrc, which provides its own types definitions
types-eslintrc
Type checking for .eslintrc.json
The legacy ESLintRC config file format for ESLint
npm install @eslint/eslintrc
Typescript
Module System
Min. Node Version
Node Version
NPM Version
97.2
Supply Chain
99.2
Quality
83.4
Maintenance
100
Vulnerability
99.3
License
JavaScript (99.66%)
TypeScript (0.34%)
Total Downloads
5,328,124,252
Last Day
8,360,394
Last Week
46,665,203
Last Month
197,594,124
Last Year
1,923,961,724
MIT License
142 Stars
177 Commits
45 Forks
12 Watchers
3 Branches
30 Contributors
Updated on May 06, 2025
Minified
Minified + Gzipped
Latest Version
3.3.1
Package Id
@eslint/eslintrc@3.3.1
Unpacked Size
674.62 kB
Size
131.55 kB
File Count
31
NPM Version
10.9.2
Node Version
22.14.0
Published on
Mar 21, 2025
Cumulative downloads
Total Downloads
Last Day
42.9%
8,360,394
Compared to previous day
Last Week
6%
46,665,203
Compared to previous week
Last Month
-0.4%
197,594,124
Compared to previous month
Last Year
30.5%
1,923,961,724
Compared to previous year
This repository contains the legacy ESLintRC configuration file format for ESLint. This package is not intended for use outside of the ESLint ecosystem. It is ESLint-specific and not intended for use in other programs.
Note: This package is frozen except for critical bug fixes as ESLint moves to a new config system.
You can install the package as follows:
1npm install @eslint/eslintrc -D 2# or 3yarn add @eslint/eslintrc -D 4# or 5pnpm install @eslint/eslintrc -D 6# or 7bun install @eslint/eslintrc -D
The primary class in this package is FlatCompat
, which is a utility to translate ESLintRC-style configs into flat configs. Here's how you use it inside of your eslint.config.js
file:
1import { FlatCompat } from "@eslint/eslintrc"; 2import js from "@eslint/js"; 3import path from "path"; 4import { fileURLToPath } from "url"; 5 6// mimic CommonJS variables -- not needed if using CommonJS 7const __filename = fileURLToPath(import.meta.url); 8const __dirname = path.dirname(__filename); 9 10const compat = new FlatCompat({ 11 baseDirectory: __dirname, // optional; default: process.cwd() 12 resolvePluginsRelativeTo: __dirname, // optional 13 recommendedConfig: js.configs.recommended, // optional unless you're using "eslint:recommended" 14 allConfig: js.configs.all, // optional unless you're using "eslint:all" 15}); 16 17export default [ 18 19 // mimic ESLintRC-style extends 20 ...compat.extends("standard", "example", "plugin:react/recommended"), 21 22 // mimic environments 23 ...compat.env({ 24 es2020: true, 25 node: true 26 }), 27 28 // mimic plugins 29 ...compat.plugins("jsx-a11y", "react"), 30 31 // translate an entire config 32 ...compat.config({ 33 plugins: ["jsx-a11y", "react"], 34 extends: "standard", 35 env: { 36 es2020: true, 37 node: true 38 }, 39 rules: { 40 semi: "error" 41 } 42 }) 43];
Using FlatCompat
in CommonJS files is similar to ESM, but you'll use require()
and module.exports
instead of import
and export
. Here's how you use it inside of your eslint.config.js
CommonJS file:
1const { FlatCompat } = require("@eslint/eslintrc"); 2const js = require("@eslint/js"); 3 4const compat = new FlatCompat({ 5 baseDirectory: __dirname, // optional; default: process.cwd() 6 resolvePluginsRelativeTo: __dirname, // optional 7 recommendedConfig: js.configs.recommended, // optional unless using "eslint:recommended" 8 allConfig: js.configs.all, // optional unless using "eslint:all" 9}); 10 11module.exports = [ 12 13 // mimic ESLintRC-style extends 14 ...compat.extends("standard", "example", "plugin:react/recommended"), 15 16 // mimic environments 17 ...compat.env({ 18 es2020: true, 19 node: true 20 }), 21 22 // mimic plugins 23 ...compat.plugins("jsx-a11y", "react"), 24 25 // translate an entire config 26 ...compat.config({ 27 plugins: ["jsx-a11y", "react"], 28 extends: "standard", 29 env: { 30 es2020: true, 31 node: true 32 }, 33 rules: { 34 semi: "error" 35 } 36 }) 37];
TypeError: Missing parameter 'recommendedConfig' in FlatCompat constructor
The recommendedConfig
option is required when any config uses eslint:recommended
, including any config in an extends
clause. To fix this, follow the example above using @eslint/js
to provide the eslint:recommended
config.
TypeError: Missing parameter 'allConfig' in FlatCompat constructor
The allConfig
option is required when any config uses eslint:all
, including any config in an extends
clause. To fix this, follow the example above using @eslint/js
to provide the eslint:all
config.
MIT License
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
security policy file detected
Details
Reason
packaging workflow detected
Details
Reason
Found 20/21 approved changesets -- score normalized to 9
Reason
6 commit(s) and 2 issue activity found in the last 90 days -- score normalized to 6
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-05-05
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More