import { ESLintUtils } from '@typescript-eslint/experimental-utils' ; import { ReportDescriptor , RuleContext as UtilRuleContext , RuleListener , RuleMetaData as UtilRuleMetaData , RuleMetaDataDocs as UtilRuleMetaDataDocs , RuleModule , } from '@typescript-eslint/experimental-utils/dist/ts-eslint' ; export type BaseOptions = readonly unknown [ ] ; export type RuleMetaDataDocs = Omit < UtilRuleMetaDataDocs , 'url' > ; export type RuleMetaData < MessageIds extends string > = { readonly docs : RuleMetaDataDocs ; } & Omit < UtilRuleMetaData < MessageIds > , 'docs' > ; export type RuleResult < MessageIds extends string , Options extends BaseOptions > = { readonly context : UtilRuleContext < MessageIds , Options > ; readonly descriptors : readonly ReportDescriptor < MessageIds > [ ] ; } ; type Mutable < T > = { - readonly [ P in keyof T ] : T [ P ] ; } ; /**
 * Create a rule.
 */ export function createRule < MessageIds extends string , Options extends BaseOptions > ( data ) { return ESLintUtils . RuleCreator ( name => `https://github.com/infctr/eslint-plugin-typescript-sort-keys/blob/master/docs/rules/${ name }.md` ) ( data ) ; }