import { Context, __export, defaultOptions, plugin, schema } from "./chunk-IWHYDEIT.js"; // src/enforce-has-index.ts var enforce_has_index_exports = {}; __export(enforce_has_index_exports, { RULE: () => RULE, rule: () => rule }); import { ESLintUtils } from "@typescript-eslint/utils"; var RULE = "enforce-has-index"; var cache; var rule = ESLintUtils.RuleCreator.withoutDocs({ meta: { messages: { [RULE]: `"{{ modForChild }}" in "{{ src }}" should have an "{{ indexFile }}" or move it to "{{ utils }}"` }, schema, type: "problem" }, defaultOptions: [defaultOptions], create(context) { const ctx = new Context(context, plugin, RULE, defaultOptions); if (!cache) { cache = ctx.projectFiles(); } if (!ctx.isModuleUtil()) return {}; return { Program(node) { const path = cache?.isMissingIndex(context.filename); if (path) { context.report({ node, messageId: RULE, data: path.data() }); } } }; } }); export { RULE, rule, enforce_has_index_exports };