UNPKG

@antfu/eslint-define-config

Version:

Provide a defineConfig function for .eslintrc.js files

50 lines (45 loc) 923 B
import type { RuleConfig } from '../rule-config'; /** * Option. */ export type SemiOption = | [] | ['never'] | [ 'never', { beforeStatementContinuationChars?: 'always' | 'any' | 'never'; }, ] | [] | ['always'] | [ 'always', { omitLastInOneLineBlock?: boolean; omitLastInOneLineClassBody?: boolean; }, ]; /** * Options. */ export type SemiOptions = SemiOption; /** * Require or disallow semicolons instead of ASI. * * @see [semi](https://eslint.org/docs/latest/rules/semi) */ export type SemiRuleConfig = RuleConfig<SemiOptions>; /** * Require or disallow semicolons instead of ASI. * * @see [semi](https://eslint.org/docs/latest/rules/semi) */ export interface SemiRule { /** * Require or disallow semicolons instead of ASI. * * @see [semi](https://eslint.org/docs/latest/rules/semi) */ semi: SemiRuleConfig; }