Skip to main content

Function: createRuleCreator()

function createRuleCreator<PluginDocs>(
urlCreator: (ruleName: string) => string
): RuleCreatorWithLanguages<PluginDocs>;

Defined in: internal/create-rule.ts:48

Create a typed rule factory that includes ESLint 10 language metadata.

@typescript-eslint/utils does not yet expose meta.languages in its rule creator types, even though ESLint 10 supports and recommends the field. Keeping the compatibility boundary here avoids casts in every rule module.

Type Parameters​

PluginDocs​

PluginDocs

Parameters​

urlCreator​

(ruleName: string) => string

Produces the documentation URL for a rule name.

Returns​

RuleCreatorWithLanguages<PluginDocs>

Rule creator accepting ESLint 10 language metadata.