@antfu/eslint-define-config
Version:
Provide a defineConfig function for .eslintrc.js files
35 lines (30 loc) • 976 B
TypeScript
import type { RuleConfig } from '../rule-config';
/**
* Option.
*/
export interface NoArrayReduceOption {
allowSimpleOperations?: boolean;
}
/**
* Options.
*/
export type NoArrayReduceOptions = [NoArrayReduceOption?];
/**
* Disallow `Array#reduce()` and `Array#reduceRight()`.
*
* @see [no-array-reduce](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-array-reduce.md)
*/
export type NoArrayReduceRuleConfig = RuleConfig<NoArrayReduceOptions>;
/**
* Disallow `Array#reduce()` and `Array#reduceRight()`.
*
* @see [no-array-reduce](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-array-reduce.md)
*/
export interface NoArrayReduceRule {
/**
* Disallow `Array#reduce()` and `Array#reduceRight()`.
*
* @see [no-array-reduce](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-array-reduce.md)
*/
'unicorn/no-array-reduce': NoArrayReduceRuleConfig;
}