@santi020k/eslint-config-basic 1.5.0 → 2.0.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,176 @@
1
1
  # @santi020k/eslint-config-basic
2
2
 
3
+ ## 2.0.0-beta.0
4
+
5
+ ### Major Changes
6
+
7
+ - [#87](https://github.com/santi020k/eslint-config-basic/pull/87) [`2ee503b`](https://github.com/santi020k/eslint-config-basic/commit/2ee503be55f5484624ee2e873fe59f348709eadc) Thanks [@santi020k](https://github.com/santi020k)! - **Breaking**: require ESLint 10. All packages now declare `"eslint": "^10.0.0"` as peer dependency (previously `^9.0.0 || ^10.0.0`), and `@santi020k/eslint-config-core` depends on `@eslint/js` v10.
8
+
9
+ ESLint v9.x reaches end-of-life on 2026-08-06; targeting v10 only lets the configs rely on v10 behavior:
10
+
11
+ - per-file config lookup (`eslint.config.*` resolved from each linted file's directory) — workspace packages can now ship their own config files alongside or instead of the root `projects` option
12
+ - JSX reference tracking — correct scope analysis for JSX without plugin workarounds
13
+ - the updated `eslint:recommended` baseline from `@eslint/js` v10
14
+
15
+ If you are still on ESLint 9, stay on the v1.x line of these packages.
16
+
17
+ - [#87](https://github.com/santi020k/eslint-config-basic/pull/87) [`2ee503b`](https://github.com/santi020k/eslint-config-basic/commit/2ee503be55f5484624ee2e873fe59f348709eadc) Thanks [@santi020k](https://github.com/santi020k)! - Lazy framework loading and normalized framework export naming.
18
+
19
+ **Lazy loading**: framework packages (angular-eslint, vue-eslint-parser, eslint-plugin-svelte, …) are now imported dynamically and only when their framework is enabled. Projects that enable none or few frameworks no longer pay the startup cost of loading every bundled framework plugin when `eslintConfig()` / `defineConfig()` runs.
20
+
21
+ **Breaking — normalized naming**: framework exports from `@santi020k/eslint-config-basic` now use bare framework names, and all of them are async factories returning `Promise<FlatConfigArray>`:
22
+
23
+ `angular`, `astro`, `expo`, `hono`, `lit`, `nest`, `next`, `nuxt`, `qwik`, `react`, `reactRouter`, `slidev`, `solid`, `svelte`, `tanstackStart`, `vite`, `vue` (plus deprecated `remix`).
24
+
25
+ The previous mixed-style names (`angularConfig`, `expoConfig`, `nestConfig`, `nextConfig`, `reactConfig`, `solidConfig`, `svelteConfig`, `vueConfig`) remain available as deprecated aliases of the same factories, but they are no longer plain config arrays — call them (and `await` the result) when composing manually:
26
+
27
+ ```js
28
+ // before (v1)
29
+ import { reactConfig } from "@santi020k/eslint-config-basic";
30
+
31
+ export default [...reactConfig];
32
+ ```
33
+
34
+ ```js
35
+ // after (v2)
36
+ import { react } from "@santi020k/eslint-config-basic";
37
+
38
+ export default [...(await react())];
39
+ ```
40
+
41
+ Most users are unaffected: `frameworks: { react: true }` and auto-detection behave exactly as before.
42
+
43
+ `@santi020k/eslint-config-core`: the `ImportedFramework` type now also accepts async factories (`(options?) => Promise<FlatConfigArray>`), so lazy factories can be passed directly as framework option values.
44
+
45
+ - [#87](https://github.com/santi020k/eslint-config-basic/pull/87) [`2ee503b`](https://github.com/santi020k/eslint-config-basic/commit/2ee503be55f5484624ee2e873fe59f348709eadc) Thanks [@santi020k](https://github.com/santi020k)! - Release v2 with a single public application install through `@santi020k/eslint-config-basic`.
46
+
47
+ Application projects no longer need to install or import separate framework config packages. Framework integrations are bundled behind the main package and can be enabled with booleans such as `frameworks.react: true`, `frameworks.next: true`, or by relying on auto-detection from `eslintConfig()`.
48
+
49
+ Detected framework configs are now enabled by default, while an explicit `frameworks: {}` remains the opt-out path. Next.js, Expo, and Remix automatically include React rules when enabled.
50
+
51
+ The documentation site now keeps the previous v1 docs under `/v1/`, updates the root docs for v2, and includes a v1 to v2 migration guide.
52
+
53
+ - [#87](https://github.com/santi020k/eslint-config-basic/pull/87) [`2ee503b`](https://github.com/santi020k/eslint-config-basic/commit/2ee503be55f5484624ee2e873fe59f348709eadc) Thanks [@santi020k](https://github.com/santi020k)! - Modernize the React stack and rename Remix:
54
+
55
+ - **BREAKING**: `@santi020k/eslint-config-react` now uses `@eslint-react/eslint-plugin` instead of `eslint-plugin-react` + `eslint-plugin-react-hooks`. Rule names change from `react/*` and `react-hooks/*` to `@eslint-react/*` (e.g. `react-hooks/exhaustive-deps` → `@eslint-react/exhaustive-deps`). This removes the `fixupConfigRules` compatibility shim, is ESLint 10-native, and includes the hooks rules. `react-compiler` and `react-refresh` plugins are unchanged.
56
+ - **BREAKING**: `@santi020k/eslint-config-remix` is now a deprecated alias that re-exports `@santi020k/eslint-config-react-router` (Remix merged into React Router v7). The `frameworks.remix` key still works but is deprecated — use `frameworks['react-router']`. The alias will be removed in the next major.
57
+ - The toolchain now builds with TypeScript 6.
58
+
59
+ ### Minor Changes
60
+
61
+ - [#87](https://github.com/santi020k/eslint-config-basic/pull/87) [`2ee503b`](https://github.com/santi020k/eslint-config-basic/commit/2ee503be55f5484624ee2e873fe59f348709eadc) Thanks [@santi020k](https://github.com/santi020k)! - Add first-class support for Preact.
62
+
63
+ - [#87](https://github.com/santi020k/eslint-config-basic/pull/87) [`2ee503b`](https://github.com/santi020k/eslint-config-basic/commit/2ee503be55f5484624ee2e873fe59f348709eadc) Thanks [@santi020k](https://github.com/santi020k)! - AI tooling workflow improvements:
64
+
65
+ - **Default ignores for AI artifacts**: the composed config now ignores AI coding-assistant folders (`.agent`, `.agents`, `.aider*`, `.claude`, `.clinerules`, `.codex`, `.copilot`, `.cursor`, `.gemini`, `.kiro`, `.opencode`, `.roo`, `.windsurf`) so generated agent rules are never linted as source code. Disable via `settings: [Setting.NoDefaultIgnores]`.
66
+ - **`generate-skill --check`**: CI mode that compares existing agent skill files (and guarded `AGENTS.md` / copilot-instructions sections) against freshly generated content without writing, and exits with code 1 when anything is stale or missing.
67
+ - **`generate-skill --create`**: scaffolds a root `AGENTS.md` with the guarded ESLint-standards section when the project has none.
68
+ - **`doctor` duplicate-ESLint detection**: warns when the project and the config packages resolve two different ESLint versions (e.g. an ESLint 9 project pulling in the config's ESLint 10 dependency). Both majors remain supported; the warning helps avoid editor/CLI rule-behavior drift.
69
+
70
+ - [#87](https://github.com/santi020k/eslint-config-basic/pull/87) [`2ee503b`](https://github.com/santi020k/eslint-config-basic/commit/2ee503be55f5484624ee2e873fe59f348709eadc) Thanks [@santi020k](https://github.com/santi020k)! - Add broader AI tooling support:
71
+
72
+ - **New agent skill targets** in `generate-skill`: Gemini (`.gemini/styleguide.md`), Cline (`.clinerules/`), Roo Code (`.roo/rules/`), and Kiro (`.kiro/steering/` with `inclusion: always` front-matter). The generator also maintains a guarded ESLint-standards section in an existing root `AGENTS.md` (the open standard read by Codex CLI, OpenCode, Jules, Amp, and others), mirroring the `.github/copilot-instructions.md` behavior.
73
+ - **New library integrations**: `Library.Langchain` and `Library.LlamaIndex` add import safety rules for LangChain.js (`langchain`, `@langchain/*`) and LlamaIndex.TS (`llamaindex`, `@llamaindex/*`) projects, with auto-detection from `package.json` dependencies.
74
+ - Generated agent skills now report AI SDK, MCP, Mastra, OpenAI Agents, LangChain, and LlamaIndex integrations in the feature summary.
75
+
76
+ - [#87](https://github.com/santi020k/eslint-config-basic/pull/87) [`2ee503b`](https://github.com/santi020k/eslint-config-basic/commit/2ee503be55f5484624ee2e873fe59f348709eadc) Thanks [@santi020k](https://github.com/santi020k)! - Add optional `ignores` to `eslintConfig()` / `EslintConfigOptions` for extra global ignore globs, documented in the configuration guide.
77
+
78
+ - [#87](https://github.com/santi020k/eslint-config-basic/pull/87) [`2ee503b`](https://github.com/santi020k/eslint-config-basic/commit/2ee503be55f5484624ee2e873fe59f348709eadc) Thanks [@santi020k](https://github.com/santi020k)! - Add `defineConfig` as a named alias for `eslintConfig`, keep implicit framework expansion from mutating caller-provided options, declare ESLint as a peer dependency of the umbrella package, and mark the package as side-effect free for bundlers.
79
+
80
+ - [#87](https://github.com/santi020k/eslint-config-basic/pull/87) [`2ee503b`](https://github.com/santi020k/eslint-config-basic/commit/2ee503be55f5484624ee2e873fe59f348709eadc) Thanks [@santi020k](https://github.com/santi020k)! - Fix `optionMergeStrategy: 'merge'` so explicitly passed options (`tools`, `testing`, `formats`, `libraries`, `extensions`, `frameworks`) are actually unioned with detected and preset values, as documented. Previously, providing any of these options silently replaced detected/preset values regardless of strategy. To fully opt out of detected frameworks, use `autoFrameworks: false` or `optionMergeStrategy: 'replace'` (an explicit `frameworks: {}` no longer opts out under the default merge strategy).
81
+
82
+ Other fixes:
83
+
84
+ - `detection: false` now also disables the default detected extensions (Unicorn, Perfectionist, Security); a new granular `detection: { extensions: false }` control is available.
85
+ - Negated glob patterns (`!pattern`) in `projects` sub-configs are now scoped correctly instead of producing invalid `path/!glob` patterns.
86
+ - Deprecate the unused `TsOptions` interface (`typescript: { project }` was ignored since v2) and correct stale doc comments on `ImportedFramework` and the no-op `Setting.Gitignore` / `Setting.DefaultIgnores` values.
87
+
88
+ - [#87](https://github.com/santi020k/eslint-config-basic/pull/87) [`2ee503b`](https://github.com/santi020k/eslint-config-basic/commit/2ee503be55f5484624ee2e873fe59f348709eadc) Thanks [@santi020k](https://github.com/santi020k)! - Disable context-sensitive framework rules that produce false positives in lint-staged and monorepo layouts: Nest's provider reference rule and Next's Pages Router link rule.
89
+
90
+ - [#87](https://github.com/santi020k/eslint-config-basic/pull/87) [`2ee503b`](https://github.com/santi020k/eslint-config-basic/commit/2ee503be55f5484624ee2e873fe59f348709eadc) Thanks [@santi020k](https://github.com/santi020k)! - Add new framework and integration support:
91
+
92
+ - **New framework packages**: Nuxt (`@nuxt/eslint-plugin` on top of the Vue config), Lit (`eslint-plugin-lit` + `eslint-plugin-wc`), React Router v7 (successor to Remix), and TanStack Start (bundles TanStack Router + Query rules). All are wired into `eslintConfig()` framework keys, bundled resolvers, auto-detection (`nuxt`, `lit`, `@react-router/dev`, `@tanstack/react-start`, `@tanstack/solid-start`), the CLI, and the agent-skill generator.
93
+ - **New formats**: `Format.Css` (official `@eslint/css` plugin) and `Format.Html` (`@html-eslint`).
94
+ - **New extensions**: `Extension.Node` (`eslint-plugin-n`, with TS-aware module-resolution overrides), `Extension.Compat` (browserslist compatibility), `Extension.DeMorgan`, `Extension.Depend`, and `Extension.Oxlint` (disables rules covered by Oxlint for hybrid setups, applied last like Biome).
95
+ - **New tool**: `Tool.Pnpm` (`eslint-plugin-pnpm`) enforcing pnpm catalogs and workspace settings in `package.json` and `pnpm-workspace.yaml`.
96
+
97
+ ### Patch Changes
98
+
99
+ - [#87](https://github.com/santi020k/eslint-config-basic/pull/87) [`2ee503b`](https://github.com/santi020k/eslint-config-basic/commit/2ee503be55f5484624ee2e873fe59f348709eadc) Thanks [@santi020k](https://github.com/santi020k)! - Refresh all external dependencies to their latest versions across the monorepo (58 bumps), including majors: TypeScript 6.0, Vite 8, Angular 22, MikroORM 7, and TypeORM 1.0. ESLint moves to 10.5, the `vite` and `eslint` pnpm overrides are updated to match, and the Angular and NestJS playgrounds now declare `rxjs@^7.8.2` explicitly so framework peer dependencies no longer resolve against a stale transitive rxjs 6.
100
+
101
+ - [#87](https://github.com/santi020k/eslint-config-basic/pull/87) [`2ee503b`](https://github.com/santi020k/eslint-config-basic/commit/2ee503be55f5484624ee2e873fe59f348709eadc) Thanks [@santi020k](https://github.com/santi020k)! - Add `@santi020k/eslint-config-lite` as an optional composer package for projects that want to install framework and integration config packages manually. The full `@santi020k/eslint-config-basic` package remains the recommended default install.
102
+
103
+ Expose integration composition helpers from `@santi020k/eslint-config-integrations` so the lite package can lazy-load integration configs only when selected.
104
+
105
+ Teach `basic-eslint doctor` to recognize lite configs and warn when detected frameworks or integrations are missing their manually installed config packages.
106
+
107
+ Add `basic-eslint doctor --lite-install` to print the detected package-manager install command for switching a project to the lite package, including framework config packages, integrations, ESLint, and TypeScript when needed.
108
+
109
+ Document package-choice metrics, a Basic-to-Lite migration recipe, and a lite-specific `Preset.All` warning.
110
+
111
+ - Updated dependencies [[`2ee503b`](https://github.com/santi020k/eslint-config-basic/commit/2ee503be55f5484624ee2e873fe59f348709eadc), [`2ee503b`](https://github.com/santi020k/eslint-config-basic/commit/2ee503be55f5484624ee2e873fe59f348709eadc), [`2ee503b`](https://github.com/santi020k/eslint-config-basic/commit/2ee503be55f5484624ee2e873fe59f348709eadc), [`2ee503b`](https://github.com/santi020k/eslint-config-basic/commit/2ee503be55f5484624ee2e873fe59f348709eadc), [`2ee503b`](https://github.com/santi020k/eslint-config-basic/commit/2ee503be55f5484624ee2e873fe59f348709eadc), [`2ee503b`](https://github.com/santi020k/eslint-config-basic/commit/2ee503be55f5484624ee2e873fe59f348709eadc), [`2ee503b`](https://github.com/santi020k/eslint-config-basic/commit/2ee503be55f5484624ee2e873fe59f348709eadc), [`2ee503b`](https://github.com/santi020k/eslint-config-basic/commit/2ee503be55f5484624ee2e873fe59f348709eadc), [`2ee503b`](https://github.com/santi020k/eslint-config-basic/commit/2ee503be55f5484624ee2e873fe59f348709eadc), [`2ee503b`](https://github.com/santi020k/eslint-config-basic/commit/2ee503be55f5484624ee2e873fe59f348709eadc), [`2ee503b`](https://github.com/santi020k/eslint-config-basic/commit/2ee503be55f5484624ee2e873fe59f348709eadc), [`2ee503b`](https://github.com/santi020k/eslint-config-basic/commit/2ee503be55f5484624ee2e873fe59f348709eadc), [`2ee503b`](https://github.com/santi020k/eslint-config-basic/commit/2ee503be55f5484624ee2e873fe59f348709eadc), [`2ee503b`](https://github.com/santi020k/eslint-config-basic/commit/2ee503be55f5484624ee2e873fe59f348709eadc)]:
112
+ - @santi020k/eslint-config-preact@2.0.0-beta.0
113
+ - @santi020k/eslint-config-core@2.0.0-beta.0
114
+ - @santi020k/eslint-config-integrations@2.0.0-beta.0
115
+ - @santi020k/eslint-config-angular@2.0.0-beta.0
116
+ - @santi020k/eslint-config-astro@2.0.0-beta.0
117
+ - @santi020k/eslint-config-expo@2.0.0-beta.0
118
+ - @santi020k/eslint-config-hono@2.0.0-beta.0
119
+ - @santi020k/eslint-config-lit@2.0.0-beta.0
120
+ - @santi020k/eslint-config-nest@2.0.0-beta.0
121
+ - @santi020k/eslint-config-next@2.0.0-beta.0
122
+ - @santi020k/eslint-config-nuxt@2.0.0-beta.0
123
+ - @santi020k/eslint-config-qwik@2.0.0-beta.0
124
+ - @santi020k/eslint-config-react@2.0.0-beta.0
125
+ - @santi020k/eslint-config-react-router@2.0.0-beta.0
126
+ - @santi020k/eslint-config-remix@2.0.0-beta.0
127
+ - @santi020k/eslint-config-slidev@2.0.0-beta.0
128
+ - @santi020k/eslint-config-solid@2.0.0-beta.0
129
+ - @santi020k/eslint-config-svelte@2.0.0-beta.0
130
+ - @santi020k/eslint-config-tanstack-start@2.0.0-beta.0
131
+ - @santi020k/eslint-config-typescript@2.0.0-beta.0
132
+ - @santi020k/eslint-config-vite@2.0.0-beta.0
133
+ - @santi020k/eslint-config-vue@2.0.0-beta.0
134
+
135
+ ## 1.6.0
136
+
137
+ ### Minor Changes
138
+
139
+ - [#85](https://github.com/santi020k/eslint-config-basic/pull/85) [`664693e`](https://github.com/santi020k/eslint-config-basic/commit/664693ef8edeb51239bf4dc2c75148203bcf41a6) Thanks [@santi020k](https://github.com/santi020k)! - Add `basic-eslint generate-skill` CLI command and `generateAgentSkills()` API.
140
+
141
+ The new command scans a project for AI coding-assistant agent folders (`.agent`, `.agents`, `.claude`, `.cursor`, `.windsurf`, `.copilot`, `.aider`) and writes a tailored ESLint standards skill file into each one. The generated file describes the active configuration (TypeScript, frameworks, testing, tools, etc.) and instructs the agent to follow the project's lint conventions automatically.
142
+
143
+ A companion GitHub Actions workflow (`.github/workflows/agent-skills.yml`) is included so projects can auto-regenerate skill files whenever the ESLint config changes.
144
+
145
+ **Usage:**
146
+
147
+ ```bash
148
+ npx basic-eslint generate-skill # write skill files (skip existing)
149
+ npx basic-eslint generate-skill --force # overwrite all skill files
150
+ ```
151
+
152
+ **Programmatic API:**
153
+
154
+ ```ts
155
+ import { generateAgentSkills } from "@santi020k/eslint-config-basic";
156
+
157
+ const { skipped, written } = generateAgentSkills({
158
+ cwd: process.cwd(),
159
+ force: true,
160
+ });
161
+ ```
162
+
163
+ ### Patch Changes
164
+
165
+ - [#85](https://github.com/santi020k/eslint-config-basic/pull/85) [`664693e`](https://github.com/santi020k/eslint-config-basic/commit/664693ef8edeb51239bf4dc2c75148203bcf41a6) Thanks [@santi020k](https://github.com/santi020k)! - Load optional integrations lazily so projects can import the base config without installing unrelated integration peers such as Storybook, GraphQL, Stencil, Cypress, or Testing Library.
166
+
167
+ Also include the generated agent-skill API entry in the basic package build output so published packages do not reference a missing `agent-skill-generator.js` file.
168
+
169
+ - Updated dependencies [[`664693e`](https://github.com/santi020k/eslint-config-basic/commit/664693ef8edeb51239bf4dc2c75148203bcf41a6)]:
170
+ - @santi020k/eslint-config-optionals@1.6.0
171
+ - @santi020k/eslint-config-core@1.6.0
172
+ - @santi020k/eslint-config-typescript@1.6.0
173
+
3
174
  ## 1.5.0
4
175
 
5
176
  ### Minor Changes
package/README.md CHANGED
@@ -1,29 +1,11 @@
1
1
  # @santi020k/eslint-config-basic
2
2
 
3
- [![CI](https://github.com/santi020k/eslint-config-basic/actions/workflows/build.yml/badge.svg)](https://github.com/santi020k/eslint-config-basic/actions/workflows/build.yml)
4
- [![npm version](https://img.shields.io/npm/v/@santi020k/eslint-config-basic.svg)](https://www.npmjs.com/package/@santi020k/eslint-config-basic)
5
- [![npm downloads](https://img.shields.io/npm/dm/@santi020k/eslint-config-basic.svg)](https://www.npmjs.com/package/@santi020k/eslint-config-basic)
6
- [![license](https://img.shields.io/npm/l/@santi020k/eslint-config-basic.svg)](https://github.com/santi020k/eslint-config-basic/blob/main/LICENSE)
3
+ The primary entry point that composes all feature-specific configurations.
7
4
 
8
- Composable ESLint 10+ flat-config for JavaScript, TypeScript, and all major frameworks.
5
+ This package is part of the [`@santi020k/eslint-config-basic`](https://github.com/santi020k/eslint-config-basic) monorepo.
9
6
 
10
- This is the main entry point of the [`@santi020k/eslint-config-basic`](https://github.com/santi020k/eslint-config-basic) monorepo.
11
-
12
- - Docs: [eslint.santi020k.com](https://eslint.santi020k.com/)
7
+ - Docs: [Main package](https://eslint.santi020k.com/packages/basic.html)
13
8
  - Repository: [santi020k/eslint-config-basic](https://github.com/santi020k/eslint-config-basic)
14
9
  - Author: [santi020k](https://santi020k.com)
15
10
 
16
- ## Quick start
17
-
18
- ```bash
19
- npm install -D eslint @santi020k/eslint-config-basic
20
- ```
21
-
22
- ```js
23
- // eslint.config.js
24
- import { eslintConfig } from '@santi020k/eslint-config-basic'
25
-
26
- export default eslintConfig()
27
- ```
28
-
29
- Auto-detects TypeScript, frameworks, and common tools from your `package.json`. See the [full docs](https://eslint.santi020k.com/) for all options.
11
+ The canonical documentation lives on the Starlight site, so this README intentionally stays short to avoid duplication.
@@ -0,0 +1,108 @@
1
+ interface AgentTarget {
2
+ /** Format variant used when generating content */
3
+ format: 'cursor' | 'frontmatter' | 'kiro' | 'plain';
4
+ /** Human-readable label for logging */
5
+ label: string;
6
+ /** Folder that must exist in cwd to be considered "present" */
7
+ markerFolder: string;
8
+ /** File name for the generated skill */
9
+ skillFile: string;
10
+ /** Subdirectory inside the agent folder where the skill file is placed */
11
+ skillSubdir: string;
12
+ }
13
+ /**
14
+ * Features extracted from the project's actual `eslint.config.js`.
15
+ * All arrays hold display-friendly labels (e.g. `'TypeScript'`, `'React'`).
16
+ */
17
+ interface EslintConfigFeatures {
18
+ /** Path to the config file that was loaded, or null when falling back to detection */
19
+ configFile: null | string;
20
+ extensions: string[];
21
+ formats: string[];
22
+ frameworks: string[];
23
+ libraries: string[];
24
+ /** The lint command found in the project's package.json scripts, or a sensible default */
25
+ lintCommand: string;
26
+ /** Whether features came from the real config file or from package.json detection */
27
+ source: 'config-file' | 'detection-fallback';
28
+ testing: string[];
29
+ tools: string[];
30
+ typescript: boolean;
31
+ }
32
+ interface GenerateSkillOptions {
33
+ /**
34
+ * Check mode — compare existing skill files against freshly generated
35
+ * content without writing anything. Stale or missing files are reported
36
+ * in {@link GenerateSkillResult.stale}.
37
+ * @default false
38
+ */
39
+ check?: boolean;
40
+ /**
41
+ * Create a root `AGENTS.md` when it does not exist yet, instead of only
42
+ * updating an existing one.
43
+ * @default false
44
+ */
45
+ createAgentsMd?: boolean;
46
+ /** Working directory — defaults to process.cwd() */
47
+ cwd?: string;
48
+ /**
49
+ * Overwrite files that already exist.
50
+ * @default false
51
+ */
52
+ force?: boolean;
53
+ }
54
+ interface GenerateSkillResult {
55
+ skipped: string[];
56
+ /** Files that are out of date (or missing) — only populated in check mode */
57
+ stale: string[];
58
+ written: string[];
59
+ }
60
+ /**
61
+ * All AI coding-assistant agent folders that are probed for.
62
+ * Add new entries here as new agents emerge — the generator picks them up
63
+ * automatically on the next run.
64
+ */
65
+ declare const AGENT_TARGETS: AgentTarget[];
66
+ /**
67
+ * Loads the user's `eslint.config.js` (or `.mjs` / `.cjs`) via dynamic
68
+ * `import()` and derives features from the resulting flat-config array.
69
+ *
70
+ * Returns `null` when no config file is found or it cannot be imported.
71
+ */
72
+ declare const analyzeEslintConfig: (cwd: string) => Promise<EslintConfigFeatures | null>;
73
+ /**
74
+ * Builds the skill document body from the project's {@link EslintConfigFeatures}.
75
+ * Four format variants are produced:
76
+ *
77
+ * - `frontmatter` — YAML front-matter + Markdown (`.agent`, `.agents`, `.windsurf`)
78
+ * - `cursor` — Cursor MDC front-matter + Markdown
79
+ * - `kiro` — Kiro steering front-matter (`inclusion: always`) + Markdown
80
+ * - `plain` — pure Markdown, no front-matter (Claude Code, Copilot, Aider, Gemini, Cline, Roo Code)
81
+ */
82
+ declare const generateSkillContent: (features: EslintConfigFeatures, format: AgentTarget["format"]) => string;
83
+ /**
84
+ * Detects which AI agent folders exist in the project, reads the actual
85
+ * `eslint.config.js` to understand what is configured, and writes a tailored
86
+ * ESLint standards skill file into each found folder.
87
+ *
88
+ * Falls back to package.json auto-detection when the config file cannot be
89
+ * dynamically imported (e.g. when running outside a built environment).
90
+ *
91
+ * @example
92
+ * ```ts
93
+ * import { generateAgentSkills } from '@santi020k/eslint-config-basic'
94
+ *
95
+ * const result = await generateAgentSkills({ cwd: process.cwd() })
96
+ * process.stdout.write(`Written to: ${result.written}\n`)
97
+ * ```
98
+ */
99
+ declare const generateAgentSkills: (opts?: GenerateSkillOptions) => Promise<GenerateSkillResult>;
100
+ interface HandleGenerateSkillFlags {
101
+ /** Check mode — report stale files and set a non-zero exit code, write nothing */
102
+ check?: boolean;
103
+ /** Create a root `AGENTS.md` when it does not exist */
104
+ createAgentsMd?: boolean;
105
+ }
106
+ declare const handleGenerateSkill: (cwd?: string, force?: boolean, flags?: HandleGenerateSkillFlags) => Promise<void>;
107
+
108
+ export { AGENT_TARGETS, type AgentTarget, type EslintConfigFeatures, type GenerateSkillOptions, type GenerateSkillResult, type HandleGenerateSkillFlags, analyzeEslintConfig, generateAgentSkills, generateSkillContent, handleGenerateSkill };