import { Linter, ESLint } from 'eslint'; import { T as ThemeTokenOptions } from './shared/eslint-plugin-harlanzw.CQ4tJVQW.mjs'; /** * Overrides that were copy-pasted into every repo before this existed. * * Every rule here is set to `off`. Flat config ignores an `off` entry for a rule * whose plugin is not registered, so these blocks are safe without depending on * `@antfu/eslint-config` or any of the plugins it loads. */ interface BaseOptions { /** * `lib` also turns off `ts/explicit-function-return-type`. * * @default 'lib' */ type?: 'lib' | 'app'; /** * Paths to ignore on top of the shared ignore set. * * `false` drops the shared ignore block, leaving the repo to declare its own. * A global ignore cannot be undone by a later config, so this is the only way * to keep linting something the shared set covers, such as a playground. */ ignores?: string[] | false; /** * What to do with the prompts you wrote: `CLAUDE.md`, `AGENTS.md`, `.cursor`. * * `ignore` keeps them out of the lint run entirely, which is what most repos * did by hand. `lint` leaves them for the prompt configs to pick up. * * A global `ignores` block beats any `files`-scoped config, so ignoring these * here would silently stop the prompt rules from ever seeing them. * {@link harlanzw} passes `lint` whenever its prompt config is enabled. * * Agent content nobody authored is ignored either way, see * {@link GENERATED_AGENT_IGNORES}. * * @default 'ignore' */ agentFiles?: 'ignore' | 'lint'; } /** * Shared flat config blocks. * * Spread these after the preset whose rules they turn off. */ declare function base(options?: BaseOptions): Linter.Config[]; interface LinkRuleOptions { ignoreExternal?: boolean; exclude?: string[]; } interface ComponentStyleOptions { /** Nuxt UI primitive whose prop values this wrapper forwards. */ extends?: string; /** Props the wrapper intentionally removes from its public API. */ forbiddenProps?: string[]; /** Complete class-attribute patterns owned by this component. Does not limit ui slots or props. */ classPatterns?: string[]; /** Base utility patterns mapped to the prop that owns their style. */ classProps?: Record; /** Allowed base utilities or complete classes with variants. Replaces the default layout allowance. */ allow?: string[]; /** Allowed utilities for individual ui slots. Replaces the component allowance. */ slots?: Record; sizes?: string[]; /** Appearance prop exposed by a wrapper, such as purpose. */ appearanceProp?: string; variants?: string[]; colors?: string[]; message?: string; } interface NuxtUiDesignOptions { /** File named in repair guidance. This file is not executed or parsed. */ source?: string; /** Component names match both PascalCase and kebab-case. False disables a component. */ components?: Record; } interface ValidClassOptions { allow?: string[]; strict?: boolean; } declare const rules: Record<"link-ascii-only" | "link-lowercase" | "link-no-double-slashes" | "link-no-underscores" | "link-no-whitespace" | "link-require-descriptive-text" | "link-trailing-slash" | "ai-deslop-adverbs" | "ai-deslop-autolink" | "ai-deslop-buzzwords" | "ai-deslop-casing" | "ai-deslop-code-lang" | "ai-deslop-false-dichotomy" | "ai-deslop-false-sincerity" | "ai-deslop-filler" | "ai-deslop-frontmatter-spacing" | "ai-deslop-hedging" | "ai-deslop-no-em-dash" | "ai-deslop-no-exclamation" | "ai-deslop-passive-voice" | "ai-deslop-vue-ts-lang" | "ai-deslop-weak-opener" | "docs-reference-no-status" | "docs-retired-pointer" | "docs-root-allowlist" | "docs-work-brief-contract" | "link-require-href" | "no-silent-catch" | "no-test-file-reads" | "nuxt-await-navigate-to" | "nuxt-no-random" | "nuxt-no-redundant-component-imports" | "nuxt-no-redundant-import-meta" | "nuxt-no-self-layer-alias" | "nuxt-no-side-effects-in-async-data-handler" | "nuxt-no-side-effects-in-setup" | "nuxt-no-unsafe-date" | "nuxt-prefer-layer-alias" | "nuxt-prefer-navigate-to-over-router-push-replace" | "nuxt-prefer-nuxt-link-over-router-link" | "nuxt-ui-no-restyle" | "nuxt-ui-prefer-shorthand-css" | "pnpm-require-trust-policy" | "prefer-node-style-text" | "prefer-satisfies" | "prompt-ambiguous-quantifier" | "prompt-dangling-path" | "prompt-duplicate-heading" | "prompt-empty-section" | "prompt-empty-variable" | "prompt-example-mismatch" | "prompt-inefficient-token" | "prompt-instruction-dilution" | "prompt-large-prompt" | "prompt-missing-examples" | "prompt-no-trailing-spaces" | "prompt-redundant-instruction" | "prompt-skill-frontmatter-required" | "prompt-skill-frontmatter-schema" | "prompt-subsumed-constraint" | "prompt-unclosed-code-fence" | "prompt-unclosed-tag" | "prompt-undefined-variable" | "prompt-unresolved-reference" | "prompt-vague-term" | "prompt-weak-instruction" | "vue-no-async-lifecycle-hook" | "vue-no-dynamic-tailwind-classes" | "vue-no-faux-composables" | "vue-no-nested-reactivity" | "vue-no-passing-refs-as-props" | "vue-no-reactive-destructuring" | "vue-no-reactivity-after-await" | "vue-no-ref-access-in-templates" | "vue-no-resolve-component-in-composables" | "vue-no-torefs-on-props" | "vue-no-unresolvable-define-emits" | "vue-prefer-define-emits-object-syntax" | "vue-prefer-theme-tokens" | "vue-require-composable-prefix" | "vue-valid-tailwind-classes", unknown>; declare const plugin: ESLint.Plugin; declare const LINK_RULES_WITH_OPTIONS: readonly ["link-ascii-only", "link-lowercase", "link-no-double-slashes", "link-no-underscores", "link-no-whitespace", "link-require-descriptive-text", "link-trailing-slash"]; interface HarlanzwOptions { /** * Shared override blocks: ignores, node globals, test and markdown relaxations. * * Opt in with `true` for the defaults, or pass {@link BaseOptions}. * * @default false */ base?: boolean | BaseOptions; link?: boolean | LinkRuleOptions & { requireTrailingSlash?: boolean; }; /** Auto-enabled when the current package declares @nuxt/ui. False disables detection. */ nuxtUi?: boolean | NuxtUiDesignOptions; nuxt?: boolean; vue?: boolean; prompt?: boolean | 'recommended' | 'strict' | 'skill'; content?: boolean; pnpm?: boolean; /** Enable rules scoped to test files. Nuxt and Vue presets enable them by default. */ tests?: boolean; } declare function detectFramework(): { nuxt: boolean; nuxtUi: boolean; vue: boolean; prompt: boolean; content: boolean; pnpm: boolean; }; interface HarlanzwFactory { (options?: HarlanzwOptions, ...extraConfigs: Linter.Config[]): Linter.Config[]; detectFramework: typeof detectFramework; plugin: ESLint.Plugin; } declare const harlanzwWithPlugin: HarlanzwFactory; type RuleDefinitions = typeof rules; type RuleOptions = { [K in keyof RuleDefinitions]: K extends 'link-trailing-slash' ? [LinkRuleOptions & { requireTrailingSlash?: boolean; }] : K extends 'vue-prefer-theme-tokens' ? [ThemeTokenOptions?] : K extends 'vue-valid-tailwind-classes' ? [ValidClassOptions?] : K extends 'nuxt-ui-no-restyle' ? [NuxtUiDesignOptions?] : K extends typeof LINK_RULES_WITH_OPTIONS[number] ? [LinkRuleOptions] : []; }; type Rules = { [K in keyof RuleOptions]: Linter.RuleEntry; }; export { base, harlanzwWithPlugin as default, harlanzwWithPlugin as harlanzw, plugin }; export type { BaseOptions, ComponentStyleOptions, HarlanzwOptions, NuxtUiDesignOptions, RuleOptions, Rules };