Skip to content

ruleCreationMethods

Reports plugin rules created directly with language instead of through RuleCreator.

✅ This rule is included in the flint logical presets.

Plugin rules should be created through RuleCreator instead of calling language.createRule() directly. Direct language creation bypasses the standardized rule metadata and documentation provided by RuleCreator, which adds the docs property and ensures consistent rule structure across plugins.

import { typescriptLanguage } from "@flint.fyi/typescript-language";
export default typescriptLanguage.createRule({
about: {
description: "My rule",
id: "myRule",
presets: ["logical"],
},
setup(context) {
return { visitors: {} };
},
});

This rule is not configurable.

If you are developing plugins that are only intended for internal use or tooling that will need to call language.createRule() directly, you can safely disable this rule.

Made with ❤️‍🔥 around the world by the Flint team and contributors.