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.
Examples
Section titled “Examples”import { typescriptLanguage } from "@flint.fyi/typescript-language";
export default typescriptLanguage.createRule({ about: { description: "My rule", id: "myRule", presets: ["logical"], }, setup(context) { return { visitors: {} }; },});import { typescriptLanguage } from "@flint.fyi/typescript-language";import { RuleCreator } from "@flint.fyi/core";
const ruleCreator = new RuleCreator({ presets: ["logical"] });
export default ruleCreator.createRule(typescriptLanguage, { about: { description: "My rule", id: "myRule", presets: ["logical"], }, setup(context) { return { visitors: {} }; },});Options
Section titled “Options”This rule is not configurable.
When Not To Use It
Section titled “When Not To Use It”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.