import { ESLintUtils } from '@typescript-eslint/utils'; import type { RuleWithMetaAndName } from '@typescript-eslint/utils/eslint-utils'; type BaseRuleConfig = Readonly>; type BaseRuleConfigMeta = Readonly['meta']>; type RuleConfigWithoutOptions = Omit< BaseRuleConfig, 'defaultOptions' | 'meta' > & { meta: Omit, 'schema'>; }; export const createRule = ESLintUtils.RuleCreator((name) => `@databricks/${name}`); export function createRuleWithoutOptions(config: RuleConfigWithoutOptions) { return createRule({ ...config, meta: { ...config.meta, schema: [] }, defaultOptions: [], }); }