@shayanthenerd/eslint-config
Version:
A modern, flexible ESLint configuration for enforcing best practices and maintaining a consistent coding style
42 lines • 1.13 kB
text/typescript
import { Options } from "./types/index.mjs";
import { Linter } from "eslint";
//#region src/index.d.ts
/** Valid argument combinations for `defineConfig`. */
type DefineConfigArguments = [] | [options: Options] | [configs: Linter.Config[]] | [options: Options, configs: Linter.Config[]];
/**
* Define your ESLint configuration based on the provided options and/or custom Flat Config Objects.
*
* @param {...DefineConfigArguments} args The configuration options and/or custom Flat Config objects.
* @returns {Linter.Config[]} The merged ESLint configuration array
*
* @example
* defineConfig();
* // or
* defineConfig({ autoDetectDeps: 'verbose' });
* // or
* defineConfig([
* {
* name: 'custom',
* rules: {
* 'no-console': 'error',
* },
* },
* { ... },
* ]);
* // or
* defineConfig(
* { autoDetectDeps: 'verbose' },
* [
* {
* name: 'custom',
* rules: {
* 'no-console': 'error',
* },
* },
* { ... },
* ],
* );
*/
declare function defineConfig(...args: DefineConfigArguments): Linter.Config[];
//#endregion
export { defineConfig };