import { ruleCreator } from "../_internal/rule-creator.js";
const selector = "Program[body.length>1]:has(ExportDefaultDeclaration)";
/**
 * Disallow additional exports when a default export exists.
 */
const rule = ruleCreator({
    create: (context) => ({
        [selector]: (node) => {
            context.report({
                messageId: "forbidden",
                node,
            });
        },
    }),
    defaultOptions: [],
    meta: {
        deprecated: false,
        docs: {
            deprecated: false,
            description: "disallow additional exports alongside a default export.",
            frozen: false,
            recommended: false,
            url: "https://nick2bad4u.github.io/eslint-plugin-etc-misc/docs/rules/prefer-only-export",
        },
        hasSuggestions: false,
        messages: {
            forbidden: "Export default should be only export.",
        },
        schema: [],
        type: "suggestion",
    },
    name: "prefer-only-export",
});
export default rule;
//# sourceMappingURL=prefer-only-export.js.map