@eslint/eslintrc
's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.Name | Version | Size | License | Type | Vulnerabilities |
---|---|---|---|---|---|
ajv | 6.12.6 | 197.63 kB | MIT | prod | |
debug | 4.3.4 | 12.94 kB | MIT | prod | |
espree | 9.6.1 | 15.95 kB | BSD-2-Clause | prod | |
globals | 13.24.0 | 9.35 kB | MIT | prod | |
ignore | 5.3.1 | 14.1 kB | MIT | prod | |
import-fresh | 3.3.0 | 2.28 kB | MIT | prod | |
js-yaml | 4.1.0 | 99.96 kB | MIT | prod | |
minimatch | 3.1.2 | 11.66 kB | ISC | prod | |
strip-json-comments | 3.1.1 | 2.78 kB | MIT | prod |
The "@eslint/eslintrc" is a JavaScript library designed to manage the legacy ESLintRC configuration file format specific to ESLint. This package provides a utility to translate ESLintRC-style configs into flat configs for enabling and managing ESLint rules, where ESLint is a tool to find and fix problems in your JavaScript code. It's important to note that this package is primarily intended for use within the ESLint ecosystem and isn't designed for use in other programs.
Using "@eslint/eslintrc" requires installation through npm or yarn, then importation into your eslint.config.js
file where it can be utilized. The primary class provided by the library is FlatCompat
.
Installation can be done using npm:
npm install @eslint/eslintrc --save-dev
Or using yarn:
yarn add @eslint/eslintrc -D
Usage in an eslint.config.js file might look like:
import { FlatCompat } from "@eslint/eslintrc";
import js from "@eslint/js";
import path from "path";
import { fileURLToPath } from "url";
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
resolvePluginsRelativeTo: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all,
});
export default [
...compat.extends("standard", "example"),
...compat.env({ es2020: true, node: true }),
...compat.plugins("airbnb", "react"),
...compat.config({
plugins: ["airbnb", "react"],
extends: "standard",
env: { es2020: true, node: true },
rules: { semi: "error" }
})
];
Documentation for "@eslint/eslintrc" is not explicitly mentioned in the README of the package. However, you can refer to the source code and related documentation on the GitHub repository at https://github.com/eslint/eslintrc.git. Keep in mind that the package is frozen and open only for critical bug fixes as ESLint moves to a new config system. Thus, extensive documentation might not be available or maintained.