@antfu/eslint-define-config
Version:
Provide a defineConfig function for .eslintrc.js files
35 lines (30 loc) • 909 B
TypeScript
import type { RuleConfig } from '../rule-config';
/**
* Option.
*/
export interface NoUnneededTernaryOption {
defaultAssignment?: boolean;
}
/**
* Options.
*/
export type NoUnneededTernaryOptions = [NoUnneededTernaryOption?];
/**
* Disallow ternary operators when simpler alternatives exist.
*
* @see [no-unneeded-ternary](https://eslint.org/docs/latest/rules/no-unneeded-ternary)
*/
export type NoUnneededTernaryRuleConfig = RuleConfig<NoUnneededTernaryOptions>;
/**
* Disallow ternary operators when simpler alternatives exist.
*
* @see [no-unneeded-ternary](https://eslint.org/docs/latest/rules/no-unneeded-ternary)
*/
export interface NoUnneededTernaryRule {
/**
* Disallow ternary operators when simpler alternatives exist.
*
* @see [no-unneeded-ternary](https://eslint.org/docs/latest/rules/no-unneeded-ternary)
*/
'no-unneeded-ternary': NoUnneededTernaryRuleConfig;
}