import { Context, __export, defaultOptions, localImport, plugin, schema } from "./chunk-IWHYDEIT.js"; // src/no-root-import.ts var no_root_import_exports = {}; __export(no_root_import_exports, { RULE: () => RULE, rule: () => rule }); import { ESLintUtils } from "@typescript-eslint/utils"; var RULE = "no-root-import"; var rule = ESLintUtils.RuleCreator.withoutDocs({ meta: { messages: { [RULE]: 'Cant import files at root of "{{ src }}" in "{{ modForChild }}"' }, schema, type: "problem" }, defaultOptions: [defaultOptions], create(context) { const ctx = new Context(context, plugin, RULE, defaultOptions); if (ctx.isTest() || ctx.isRoot()) return {}; return localImport((node, filename) => { const ictx = ctx.import(filename); if (ictx.isRoot()) { context.report({ messageId: RULE, node, data: ictx.data() }); } }); } }); export { RULE, rule, no_root_import_exports };