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