@types/eslint__eslintrc
TypeScript icon, indicating that this package has built-in type declarations

2.1.1 • Public • Published

Installation

npm install --save @types/eslint__eslintrc

Summary

This package contains type definitions for @eslint/eslintrc (https://github.com/eslint/eslintrc#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/eslint__eslintrc.

index.d.ts

import type { Linter } from "eslint";

/**
 * A compatibility class for working with configs.
 */
export class FlatCompat {
    constructor({
        baseDirectory,
        resolvePluginsRelativeTo,
        recommendedConfig,
        allConfig,
    }?: {
        /**
         * default: process.cwd()
         */
        baseDirectory?: string;
        resolvePluginsRelativeTo?: string;
        recommendedConfig?: Linter.Config;
        allConfig?: Linter.Config;
    });

    /**
     * Translates an ESLintRC-style config into a flag-config-style config.
     * @param eslintrcConfig The ESLintRC-style config object.
     * @returns A flag-config-style config object.
     */
    config(eslintrcConfig: Linter.Config): Linter.FlatConfig[];

    /**
     * Translates the `env` section of an ESLintRC-style config.
     * @param envConfig The `env` section of an ESLintRC config.
     * @returns An array of flag-config objects representing the environments.
     */
    env(envConfig: { [name: string]: boolean }): Linter.FlatConfig[];

    /**
     * Translates the `extends` section of an ESLintRC-style config.
     * @param configsToExtend The names of the configs to load.
     * @returns An array of flag-config objects representing the config.
     */
    extends(...configsToExtend: string[]): Linter.FlatConfig[];

    /**
     * Translates the `plugins` section of an ESLintRC-style config.
     * @param plugins The names of the plugins to load.
     * @returns An array of flag-config objects representing the plugins.
     */
    plugins(...plugins: string[]): Linter.FlatConfig[];
}

Additional Details

  • Last updated: Mon, 06 Nov 2023 22:41:05 GMT
  • Dependencies: @types/eslint

Credits

These definitions were written by Gordon Ou.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/eslint__eslintrc

Weekly Downloads

30,026

Version

2.1.1

License

MIT

Unpacked Size

5.89 kB

Total Files

5

Last publish

Collaborators

  • types