import { ruleCreator } from "../_internal/rule-creator.js";
const selector = "TSTypeReference > Identifier[name='Set']";
/**
 * Require ReadonlySet in place of Set type annotations.
 */
const rule = ruleCreator({
    create: (context) => ({
        [selector]: (node) => {
            if (node.type !== "Identifier") {
                return;
            }
            context.report({
                fix: (fixer) => fixer.replaceText(node, "ReadonlySet"),
                messageId: "forbidden",
                node,
            });
        },
    }),
    defaultOptions: [],
    meta: {
        deprecated: false,
        docs: {
            deprecated: false,
            description: "require ReadonlySet instead of Set in type annotations.",
            frozen: false,
            recommended: false,
            url: "https://nick2bad4u.github.io/eslint-plugin-etc-misc/docs/rules/typescript-prefer-readonly-set",
        },
        fixable: "code",
        hasSuggestions: false,
        messages: {
            forbidden: "Prefer readonly set types.",
        },
        schema: [],
        type: "suggestion",
    },
    name: "typescript/prefer-readonly-set",
});
export default rule;
//# sourceMappingURL=typescript-prefer-readonly-set.js.map