import { DeepNonNullable, Tail } from "./helpers.js";
import { ESLintSchema } from "./eslint-schema.js";

//#region src/types/eslintRules.d.ts
/*** CoreRules & PluginRules ***/
type RuleNames = keyof ESLintSchema;
/*** RuleOptions ***/
type Rule<RuleName extends RuleNames> = DeepNonNullable<ESLintSchema>[RuleName];
type RuleConfigs<RuleName extends RuleNames> = Tail<Rule<RuleName>>;
type RuleOptions<RuleName extends RuleNames, Index extends (0 | 1 | 2) = 0> = NonNullable<RuleConfigs<RuleName>[Index]>;
//#endregion
export { type RuleOptions };