import { Linter } from "eslint"; //#region bundles/library.d.ts interface LibraryOptions { /** * Package (or path) globs whose code runs in the browser, not Node — * `n/no-unsupported-features/node-builtins` false-positives on browser * APIs (`navigator`, `sessionStorage`, `KeyboardEvent`, …) it doesn't * recognize. Each entry gets a `/**` files match with the rule * turned off. Rare — most repos need nothing here (`theholocron/utils` * is the one org repo that does, for its browser-targeted packages). */ browserPackages?: string[]; } /** * Every 5-of-6 org repos' `eslint.config.ts` already reduces to `...library()` * with no further composition once `base()`'s gitignore/docs-src absorption * (#460) is in place — the sixth (`holocron` itself) only differs by also * spreading `vitest()` at its root, which is safe to bake in unconditionally * here: {@link vitest}'s config is glob-scoped to test/setup files, so it's a * no-op anywhere it doesn't match, same reasoning as `docsSrcConfig`. Once * every repo drops its now-redundant local composition (#680, the migration * pass), `library()` alone — resolved via `eslint --config`, zero committed * file — covers every repo but the `browserPackages` outlier, which keeps a * tiny `export default library({ browserPackages: [...] })` (config-resolution * workstream, #676 in theholocron/holocron). * * `docsSrcConfig` is re-asserted after `node()` below — `node()`'s own * `recommended-module` preset sets `n/no-extraneous-import: "error"` with no * `files` restriction, which otherwise clobbers `base()`'s earlier, more * specific `docs/src/**` exemption (flat config merges in array order, later * entries win per rule per matching file). Found live: `theholocron/clients` * still needed its own local override for this despite `base()` already * covering it in isolation. */ declare function library(options?: LibraryOptions): Linter.Config[]; /** * Ready-to-use config for packages that need no customisation — matches * `@theholocron/vitest-config`'s and `@theholocron/tsdown-config`'s existing * `export default ()` pattern. `eslint --config ` loads a * file's *default* export as the flat config directly; a named-export-only * file throws `ConfigError: Unexpected key "library" found` (ESLint treats * the whole module namespace as the config when there's no default) — * required for the resolver (config-resolution workstream, #676 in * theholocron/holocron) to point `--config` straight at this file with zero * committed local content. * * The explicit `Linter.Config[]` binding (rather than `export default * library();` directly) works around TS2742 — declaration-emit can't * portably name library()'s inferred return type without a reference to * @eslint/core's internal types; an explicitly-typed intermediate avoids * needing to re-infer it. */ declare const resolvedLibrary: Linter.Config[]; //#endregion export { LibraryOptions, resolvedLibrary as default, library };