@antfu/eslint-define-config
Version:
Provide a defineConfig function for .eslintrc.js files
37 lines (32 loc) • 926 B
TypeScript
import type { RuleConfig } from '../rule-config';
/**
* Option.
*/
export interface PreferArrowCallbackOption {
allowNamedFunctions?: boolean;
allowUnboundThis?: boolean;
}
/**
* Options.
*/
export type PreferArrowCallbackOptions = [PreferArrowCallbackOption?];
/**
* Require using arrow functions for callbacks.
*
* @see [prefer-arrow-callback](https://eslint.org/docs/latest/rules/prefer-arrow-callback)
*/
export type PreferArrowCallbackRuleConfig =
RuleConfig<PreferArrowCallbackOptions>;
/**
* Require using arrow functions for callbacks.
*
* @see [prefer-arrow-callback](https://eslint.org/docs/latest/rules/prefer-arrow-callback)
*/
export interface PreferArrowCallbackRule {
/**
* Require using arrow functions for callbacks.
*
* @see [prefer-arrow-callback](https://eslint.org/docs/latest/rules/prefer-arrow-callback)
*/
'prefer-arrow-callback': PreferArrowCallbackRuleConfig;
}