@antfu/eslint-define-config
Version:
Provide a defineConfig function for .eslintrc.js files
34 lines (29 loc) • 918 B
TypeScript
import type { RuleConfig } from '../rule-config';
/**
* Option.
*/
export type OperatorAssignmentOption = 'always' | 'never';
/**
* Options.
*/
export type OperatorAssignmentOptions = [OperatorAssignmentOption?];
/**
* Require or disallow assignment operator shorthand where possible.
*
* @see [operator-assignment](https://eslint.org/docs/latest/rules/operator-assignment)
*/
export type OperatorAssignmentRuleConfig =
RuleConfig<OperatorAssignmentOptions>;
/**
* Require or disallow assignment operator shorthand where possible.
*
* @see [operator-assignment](https://eslint.org/docs/latest/rules/operator-assignment)
*/
export interface OperatorAssignmentRule {
/**
* Require or disallow assignment operator shorthand where possible.
*
* @see [operator-assignment](https://eslint.org/docs/latest/rules/operator-assignment)
*/
'operator-assignment': OperatorAssignmentRuleConfig;
}