exadev-eslint-config 2.36.2 → 2.36.4

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/README.md CHANGED
@@ -1533,7 +1533,7 @@ export default exadevConfig({
1533
1533
 
1534
1534
  ### Reading the shared layout from @exadev/config
1535
1535
 
1536
- A repository that describes its workspace once in [`@exadev/config`](https://github.com/ExaDev/config)'s `layout` section can feed the same description to these rules. The `layout` section's type is checked equal to `WorkspaceArchitectureOptions`, so the value `loadSection(layoutSection)` returns is passed to `workspaceArchitecture` as it is. In an ESM `eslint.config.ts`, read it with top-level `await`:
1536
+ A repository that describes its workspace once in [`@exadev/config`](https://github.com/ExaDev/config)'s `layout` section can feed the same description to these rules. The `layout` section's type is checked equal to `WorkspaceArchitectureOptions`, so the `value` of the result `loadSection(layoutSection)` returns is passed to `workspaceArchitecture` as it is (the result also names the `file` it was read from and its `shape`). In an ESM `eslint.config.ts`, read it with top-level `await`:
1537
1537
 
1538
1538
  ```ts
1539
1539
  // eslint.config.ts
@@ -1541,8 +1541,8 @@ import { layoutSection, loadSection } from '@exadev/config';
1541
1541
  import { exadevConfig } from '@exadev/eslint-config';
1542
1542
  import { defineConfig } from 'eslint/config';
1543
1543
 
1544
- const layout = await loadSection(layoutSection, { cwd: import.meta.dirname });
1545
- if (layout === undefined) throw new Error('exadev.config.ts defines no layout section');
1544
+ const loaded = await loadSection(layoutSection, { cwd: import.meta.dirname });
1545
+ if (loaded === undefined) throw new Error('exadev.config.ts defines no layout section');
1546
1546
 
1547
1547
  export default defineConfig(
1548
1548
  {
@@ -1550,13 +1550,13 @@ export default defineConfig(
1550
1550
  parserOptions: { project: './tsconfig.json', tsconfigRootDir: import.meta.dirname },
1551
1551
  },
1552
1552
  },
1553
- ...exadevConfig({ workspaceArchitecture: layout }),
1553
+ ...exadevConfig({ workspaceArchitecture: loaded.value }),
1554
1554
  );
1555
1555
  ```
1556
1556
 
1557
1557
  `loadSection` resolves to `undefined` when no `layout` section is defined, hence the check. `cwd` is the directory holding `exadev.config.ts` (or `exadev.layout.config.ts`). A layout that fails the section's schema throws when the config loads, with the path and the rule that failed.
1558
1558
 
1559
- The layout carries structure only: groups, ranks, slices, naming and isolated pairs. Policy stays here, so `allow`, `exemptTargetGroups`, `dependencyConstraints`, `requiredFiles`, `devOnly` and `requiredScripts` are not part of it; add them with a spread (`workspaceArchitecture: { ...layout, allow: [...] }`).
1559
+ The layout carries structure only: groups, ranks, slices, naming and isolated pairs. Policy stays here, so `allow`, `exemptTargetGroups`, `dependencyConstraints`, `requiredFiles`, `devOnly` and `requiredScripts` are not part of it; add them with a spread (`workspaceArchitecture: { ...loaded.value, allow: [...] }`).
1560
1560
 
1561
1561
  The ESLint config itself stays in `eslint.config.*`. Only the layout moves into `exadev.config.ts`: ESLint loads its own config file, and the unified file has no section for rules or plugins. Neither package depends on the other: install `@exadev/config` (and its `cosmiconfig` peer) in the repository, and `@exadev/eslint-config` takes the value structurally. This repository keeps `@exadev/config` as a dev dependency only, for the test that fails when either side's types drift apart.
1562
1562
 
package/dist/index.cjs CHANGED
@@ -485,7 +485,7 @@ function buildOptionalPluginConfig(preset, options = {}) {
485
485
  }
486
486
  //#endregion
487
487
  //#region package.json
488
- var version = "2.36.2";
488
+ var version = "2.36.4";
489
489
  //#endregion
490
490
  //#region src/react.ts
491
491
  /**
@@ -1457,7 +1457,7 @@ function readNonEmptyStrings(value, optionName, what) {
1457
1457
  */
1458
1458
  function compilePattern$1(pattern, optionName) {
1459
1459
  try {
1460
- new RegExp(pattern, "u");
1460
+ RegExp(pattern, "u");
1461
1461
  } catch (error) {
1462
1462
  assertIsError(error, regExpConstructorContext(pattern));
1463
1463
  throw new Error(`@exadev/eslint-config: "${optionName}" pattern "${pattern}" is not a valid regular expression: ${error.message}`, { cause: error });
@@ -1808,7 +1808,7 @@ function isRankRule(value) {
1808
1808
  }
1809
1809
  function validateRankRulePatterns(rankRules) {
1810
1810
  for (const rule of rankRules) try {
1811
- new RegExp(rule.pattern, "u");
1811
+ RegExp(rule.pattern, "u");
1812
1812
  } catch (error) {
1813
1813
  assertIsError(error, regExpConstructorContext(rule.pattern));
1814
1814
  throw new Error(`@exadev/eslint-config: "nameRanks" pattern "${rule.pattern}" is not a valid regular expression: ${error.message}`, { cause: error });
@@ -2401,24 +2401,26 @@ function createFilenamePatternRule(fs = realWorkspaceFs) {
2401
2401
  const lines = countLines(context.sourceCode.lines);
2402
2402
  for (const entry of entries) {
2403
2403
  if (entry.overLines !== void 0 && lines <= entry.overLines) continue;
2404
- if (entry.pattern !== void 0 && !entry.pattern.regexp.test(name)) if (entry.overLines === void 0) context.report({
2405
- node,
2406
- messageId: "nameMismatch",
2407
- data: {
2408
- name,
2409
- pattern: entry.pattern.source
2410
- }
2411
- });
2412
- else context.report({
2413
- node,
2414
- messageId: "oversizedNameMismatch",
2415
- data: {
2416
- name,
2417
- pattern: entry.pattern.source,
2418
- lines: String(lines),
2419
- limit: String(entry.overLines)
2420
- }
2421
- });
2404
+ if (entry.pattern !== void 0 && !entry.pattern.regexp.test(name)) {
2405
+ if (entry.overLines === void 0) context.report({
2406
+ node,
2407
+ messageId: "nameMismatch",
2408
+ data: {
2409
+ name,
2410
+ pattern: entry.pattern.source
2411
+ }
2412
+ });
2413
+ else context.report({
2414
+ node,
2415
+ messageId: "oversizedNameMismatch",
2416
+ data: {
2417
+ name,
2418
+ pattern: entry.pattern.source,
2419
+ lines: String(lines),
2420
+ limit: String(entry.overLines)
2421
+ }
2422
+ });
2423
+ }
2422
2424
  if (entry.siblings.length === 0) continue;
2423
2425
  const expected = entry.siblings.map((template) => template.replaceAll(SIBLING_NAME_PLACEHOLDER, stem(name)));
2424
2426
  if (!expected.some((sibling) => fs.existsSync((0, node_path.resolve)((0, node_path.dirname)(context.filename), sibling)))) context.report({
package/dist/index.d.cts CHANGED
@@ -35,7 +35,7 @@ interface AgentSkillsOptions {
35
35
  /**
36
36
  * Lints agent SKILL.md files and Claude Code plugin manifests, returning ESLint core's own `Config[]` so the result spreads directly into `defineConfig(...)`. Always on: it throws at call time for a malformed option or when `@eslint/markdown` or `@eslint/json` is not installed. See the README's "Agent skills and plugin marketplaces" section.
37
37
  */
38
- declare function agentSkillsConfig(options?: AgentSkillsOptions): PublicConfigArray;
38
+ export declare function agentSkillsConfig(options?: AgentSkillsOptions): PublicConfigArray;
39
39
  //#endregion
40
40
  //#region src/rules/markdown-required-heading.d.ts
41
41
  /**
@@ -63,7 +63,7 @@ interface MarkdownHeadingsOptions {
63
63
  /**
64
64
  * Requires the Markdown files `files` selects to contain each heading, returning ESLint core's own `Config[]` so the result spreads directly into `defineConfig(...)`. Throws at call time for a malformed option or when `@eslint/markdown` is not installed. See the README's "Required Markdown headings" section.
65
65
  */
66
- declare function markdownHeadingsConfig(options: MarkdownHeadingsOptions): PublicConfigArray;
66
+ export declare function markdownHeadingsConfig(options: MarkdownHeadingsOptions): PublicConfigArray;
67
67
  //#endregion
68
68
  //#region src/rules/pure-module-options.d.ts
69
69
  /**
@@ -84,7 +84,7 @@ interface PureModulesOptions extends PureModuleOptions {
84
84
  /**
85
85
  * Wires the pure-module bans onto `files`, returning ESLint core's own `Config[]` so the result spreads directly into `defineConfig(...)` (`...pureModulesConfig({ files: ['src/core/**'] })`). Throws at call time for a malformed option, including an `allowImports` entry that selects no banned module. See the README's "Pure modules" section.
86
86
  */
87
- declare function pureModulesConfig(options: PureModulesOptions): PublicConfigArray;
87
+ export declare function pureModulesConfig(options: PureModulesOptions): PublicConfigArray;
88
88
  //#endregion
89
89
  //#region src/test-hygiene.d.ts
90
90
  /**
@@ -99,7 +99,7 @@ interface TestHygieneOptions {
99
99
  /**
100
100
  * Wires guard and conformance test hygiene, returning ESLint core's own `Config[]` so the result spreads directly into `defineConfig(...)` (`...testHygieneConfig()`). Throws at call time for a malformed option or a missing plugin. See the README's "Guard and conformance test hygiene" section.
101
101
  */
102
- declare function testHygieneConfig(options?: TestHygieneOptions): PublicConfigArray;
102
+ export declare function testHygieneConfig(options?: TestHygieneOptions): PublicConfigArray;
103
103
  //#endregion
104
104
  //#region src/rules/file-reference.d.ts
105
105
  /**
@@ -253,7 +253,7 @@ interface ToolingWiringOptions {
253
253
  /**
254
254
  * Wires the tooling preset, returning ESLint core's own `Config[]` so the result spreads directly into `defineConfig(...)`. Throws at call time for a malformed option, and for a package.json section without the optional peer `@eslint/json`. See the README's "Tooling wiring" section.
255
255
  */
256
- declare function toolingWiringConfig(options?: ToolingWiringOptions): PublicConfigArray;
256
+ export declare function toolingWiringConfig(options?: ToolingWiringOptions): PublicConfigArray;
257
257
  //#endregion
258
258
  //#region src/rules/import-policy-options.d.ts
259
259
  interface ImportDenyBase {
@@ -438,7 +438,7 @@ interface ExadevConfigOptions {
438
438
  *
439
439
  * The tri-state per feature threads straight into each builder's own `enabled` option: true forces on (throwing if the underlying peer isn't resolvable), false forces off (skipping resolution entirely), undefined auto-detects (silently empty if unresolvable, or if an equivalent tool, syncpack for packageJsonKeyOrder, or a project's own .gitignore for gitignore, already does the job). One resolution pass per feature; no separate pre-check gate that would resolve twice.
440
440
  */
441
- declare function exadevConfig(options?: ExadevConfigOptions, ...userConfigs: readonly TSESLint.FlatConfig.Config[]): PublicConfigArray;
441
+ export declare function exadevConfig(options?: ExadevConfigOptions, ...userConfigs: readonly TSESLint.FlatConfig.Config[]): PublicConfigArray;
442
442
  /**
443
443
  * Evaluated once, eagerly, at module load -- exactly matching how recommendedTypeChecked itself is already eagerly built today. This is what lets src/index.ts re-export a plain, already-computed array under the name `default`: every existing consumer's `...exadev` spread sees the identical shape and timing as before this file existed, whether or not React/Next.js support resolves in their own project.
444
444
  */
@@ -448,7 +448,7 @@ declare const defaultConfig: PublicConfigArray;
448
448
  /**
449
449
  * Wires `exadev/import-policy` from a list of `ImportPolicy` objects, returning ESLint core's own `Config[]` so the result spreads directly into `defineConfig(...)` (`...importPolicyConfig(policies)`). Throws at call time for a malformed policy, including an exception edge that could never apply. See the README's "Import policy" section.
450
450
  */
451
- declare function importPolicyConfig(policies: readonly ImportPolicy[]): PublicConfigArray;
451
+ export declare function importPolicyConfig(policies: readonly ImportPolicy[]): PublicConfigArray;
452
452
  //#endregion
453
453
  //#region src/plugin.d.ts
454
454
  /**
@@ -462,7 +462,7 @@ declare const publicPlugin: PublicPlugin;
462
462
  *
463
463
  * Retyped at the same public boundary `workspaceArchitectureConfig` is, through `toPublicConfigArray`. Its parameter is `TurboOptions` rather than `TurboConfigOptions`, which keeps the `requireFn` test seam out of the published declarations.
464
464
  */
465
- declare function turboConfig(options?: TurboOptions): PublicConfigArray;
465
+ export declare function turboConfig(options?: TurboOptions): PublicConfigArray;
466
466
  //#endregion
467
467
  //#region src/verify-eslint.d.ts
468
468
  /**
@@ -512,17 +512,17 @@ type EslintViolation = FileViolation | RuleViolation;
512
512
  *
513
513
  * The required rules default to those the baseline (this package's default export) enables for the same file, at the severity it gives them, so `rules` and `except` list only the differences. Returns every violation, none when the configuration holds; a violation names the file and the rule.
514
514
  */
515
- declare function verifyEslintConfig(options: VerifyEslintOptions): Promise<readonly EslintViolation[]>;
515
+ export declare function verifyEslintConfig(options: VerifyEslintOptions): Promise<readonly EslintViolation[]>;
516
516
  /**
517
517
  * Runs `verifyEslintConfig` and throws one error listing every violation, one per line, so a vitest test is `await assertEslintConfig({ samples: [...] })`.
518
518
  */
519
- declare function assertEslintConfig(options: VerifyEslintOptions): Promise<void>;
519
+ export declare function assertEslintConfig(options: VerifyEslintOptions): Promise<void>;
520
520
  //#endregion
521
521
  //#region src/workspace-architecture.d.ts
522
522
  /**
523
523
  * Wires the workspace-architecture rules onto `**\/package.json` from one `WorkspaceArchitectureOptions` object (`no-uphill-dependency` and `no-dependency-cycle` always; `package-name-mirrors-path`, `package-has-files`, `dev-dependency-only` and `required-scripts` only when their own option is given), returning ESLint core's own `Config[]` so the result spreads directly into `defineConfig(...)` (`...workspaceArchitectureConfig(options)`, the README's own standalone usage) alongside a consumer's own configuration.
524
524
  */
525
- declare function workspaceArchitectureConfig(options: WorkspaceArchitectureOptions): PublicConfigArray;
525
+ export declare function workspaceArchitectureConfig(options: WorkspaceArchitectureOptions): PublicConfigArray;
526
526
  //#endregion
527
527
  //#region src/rules/filename-pattern.d.ts
528
528
  /**
@@ -554,4 +554,4 @@ interface RequiredImportsEntry {
554
554
  readonly call?: boolean;
555
555
  }
556
556
  //#endregion
557
- export { type AgentSkillsOptions, type AggregateTaskOptions, type AllowedBoundariesIgnore, type AllowedEdge, type BoundaryGroup, type ComputedSpecifierHandling, type DependencyConstraint, type EffectiveSeverity, type EslintSample, type EslintViolation, type EslintViolationKind, type ExemptTargetGroup, type FileRequirement, type FilenamePatternEntry, type GroupSpec, type ImportConfine, type ImportDeny, type ImportExceptEdge, type ImportPolicy, type MarkdownFrontmatter, type MarkdownHeadingsOptions, type NamingOptions, type PackageCondition, type PackageRequirement, type PackageRequirementsOptions, type PackageSelector, type PackageSelectorFields, type PlaywrightWiringOptions, type PublishWiringOptions, type PureModulesOptions, type RankRule, type RankSkipOptions, type RequiredExportsEntry, type RequiredFiles, type RequiredHeading, type RequiredImportsEntry, type RequiredScripts, type RequiredSeverity, type RootTool, type RootWiringOptions, type ScriptContent, type ScriptRequirement, type SliceSpec, type StrykerWiringOptions, type TaskGraphRequirement, type TestHygieneOptions, type ToolConfigsWiringOptions, type ToolingWiringOptions, type TurboBoundariesOptions, type TurboDelegate, type TurboHygieneOptions, type TurboOptions, type VerifyEslintOptions, type VitestWiringOptions, type WorkspaceArchitectureOptions, agentSkillsConfig, assertEslintConfig, defaultConfig as default, exadevConfig, importPolicyConfig, markdownHeadingsConfig, publicPlugin as plugin, pureModulesConfig, testHygieneConfig, toolingWiringConfig, turboConfig, verifyEslintConfig, workspaceArchitectureConfig };
557
+ export { type AgentSkillsOptions, type AggregateTaskOptions, type AllowedBoundariesIgnore, type AllowedEdge, type BoundaryGroup, type ComputedSpecifierHandling, type DependencyConstraint, type EffectiveSeverity, type EslintSample, type EslintViolation, type EslintViolationKind, type ExemptTargetGroup, type FileRequirement, type FilenamePatternEntry, type GroupSpec, type ImportConfine, type ImportDeny, type ImportExceptEdge, type ImportPolicy, type MarkdownFrontmatter, type MarkdownHeadingsOptions, type NamingOptions, type PackageCondition, type PackageRequirement, type PackageRequirementsOptions, type PackageSelector, type PackageSelectorFields, type PlaywrightWiringOptions, type PublishWiringOptions, type PureModulesOptions, type RankRule, type RankSkipOptions, type RequiredExportsEntry, type RequiredFiles, type RequiredHeading, type RequiredImportsEntry, type RequiredScripts, type RequiredSeverity, type RootTool, type RootWiringOptions, type ScriptContent, type ScriptRequirement, type SliceSpec, type StrykerWiringOptions, type TaskGraphRequirement, type TestHygieneOptions, type ToolConfigsWiringOptions, type ToolingWiringOptions, type TurboBoundariesOptions, type TurboDelegate, type TurboHygieneOptions, type TurboOptions, type VerifyEslintOptions, type VitestWiringOptions, type WorkspaceArchitectureOptions, defaultConfig as default, publicPlugin as plugin };
package/dist/index.d.ts CHANGED
@@ -35,7 +35,7 @@ interface AgentSkillsOptions {
35
35
  /**
36
36
  * Lints agent SKILL.md files and Claude Code plugin manifests, returning ESLint core's own `Config[]` so the result spreads directly into `defineConfig(...)`. Always on: it throws at call time for a malformed option or when `@eslint/markdown` or `@eslint/json` is not installed. See the README's "Agent skills and plugin marketplaces" section.
37
37
  */
38
- declare function agentSkillsConfig(options?: AgentSkillsOptions): PublicConfigArray;
38
+ export declare function agentSkillsConfig(options?: AgentSkillsOptions): PublicConfigArray;
39
39
  //#endregion
40
40
  //#region src/rules/markdown-required-heading.d.ts
41
41
  /**
@@ -63,7 +63,7 @@ interface MarkdownHeadingsOptions {
63
63
  /**
64
64
  * Requires the Markdown files `files` selects to contain each heading, returning ESLint core's own `Config[]` so the result spreads directly into `defineConfig(...)`. Throws at call time for a malformed option or when `@eslint/markdown` is not installed. See the README's "Required Markdown headings" section.
65
65
  */
66
- declare function markdownHeadingsConfig(options: MarkdownHeadingsOptions): PublicConfigArray;
66
+ export declare function markdownHeadingsConfig(options: MarkdownHeadingsOptions): PublicConfigArray;
67
67
  //#endregion
68
68
  //#region src/rules/pure-module-options.d.ts
69
69
  /**
@@ -84,7 +84,7 @@ interface PureModulesOptions extends PureModuleOptions {
84
84
  /**
85
85
  * Wires the pure-module bans onto `files`, returning ESLint core's own `Config[]` so the result spreads directly into `defineConfig(...)` (`...pureModulesConfig({ files: ['src/core/**'] })`). Throws at call time for a malformed option, including an `allowImports` entry that selects no banned module. See the README's "Pure modules" section.
86
86
  */
87
- declare function pureModulesConfig(options: PureModulesOptions): PublicConfigArray;
87
+ export declare function pureModulesConfig(options: PureModulesOptions): PublicConfigArray;
88
88
  //#endregion
89
89
  //#region src/test-hygiene.d.ts
90
90
  /**
@@ -99,7 +99,7 @@ interface TestHygieneOptions {
99
99
  /**
100
100
  * Wires guard and conformance test hygiene, returning ESLint core's own `Config[]` so the result spreads directly into `defineConfig(...)` (`...testHygieneConfig()`). Throws at call time for a malformed option or a missing plugin. See the README's "Guard and conformance test hygiene" section.
101
101
  */
102
- declare function testHygieneConfig(options?: TestHygieneOptions): PublicConfigArray;
102
+ export declare function testHygieneConfig(options?: TestHygieneOptions): PublicConfigArray;
103
103
  //#endregion
104
104
  //#region src/rules/file-reference.d.ts
105
105
  /**
@@ -253,7 +253,7 @@ interface ToolingWiringOptions {
253
253
  /**
254
254
  * Wires the tooling preset, returning ESLint core's own `Config[]` so the result spreads directly into `defineConfig(...)`. Throws at call time for a malformed option, and for a package.json section without the optional peer `@eslint/json`. See the README's "Tooling wiring" section.
255
255
  */
256
- declare function toolingWiringConfig(options?: ToolingWiringOptions): PublicConfigArray;
256
+ export declare function toolingWiringConfig(options?: ToolingWiringOptions): PublicConfigArray;
257
257
  //#endregion
258
258
  //#region src/rules/import-policy-options.d.ts
259
259
  interface ImportDenyBase {
@@ -438,7 +438,7 @@ interface ExadevConfigOptions {
438
438
  *
439
439
  * The tri-state per feature threads straight into each builder's own `enabled` option: true forces on (throwing if the underlying peer isn't resolvable), false forces off (skipping resolution entirely), undefined auto-detects (silently empty if unresolvable, or if an equivalent tool, syncpack for packageJsonKeyOrder, or a project's own .gitignore for gitignore, already does the job). One resolution pass per feature; no separate pre-check gate that would resolve twice.
440
440
  */
441
- declare function exadevConfig(options?: ExadevConfigOptions, ...userConfigs: readonly TSESLint.FlatConfig.Config[]): PublicConfigArray;
441
+ export declare function exadevConfig(options?: ExadevConfigOptions, ...userConfigs: readonly TSESLint.FlatConfig.Config[]): PublicConfigArray;
442
442
  /**
443
443
  * Evaluated once, eagerly, at module load -- exactly matching how recommendedTypeChecked itself is already eagerly built today. This is what lets src/index.ts re-export a plain, already-computed array under the name `default`: every existing consumer's `...exadev` spread sees the identical shape and timing as before this file existed, whether or not React/Next.js support resolves in their own project.
444
444
  */
@@ -448,7 +448,7 @@ declare const defaultConfig: PublicConfigArray;
448
448
  /**
449
449
  * Wires `exadev/import-policy` from a list of `ImportPolicy` objects, returning ESLint core's own `Config[]` so the result spreads directly into `defineConfig(...)` (`...importPolicyConfig(policies)`). Throws at call time for a malformed policy, including an exception edge that could never apply. See the README's "Import policy" section.
450
450
  */
451
- declare function importPolicyConfig(policies: readonly ImportPolicy[]): PublicConfigArray;
451
+ export declare function importPolicyConfig(policies: readonly ImportPolicy[]): PublicConfigArray;
452
452
  //#endregion
453
453
  //#region src/plugin.d.ts
454
454
  /**
@@ -462,7 +462,7 @@ declare const publicPlugin: PublicPlugin;
462
462
  *
463
463
  * Retyped at the same public boundary `workspaceArchitectureConfig` is, through `toPublicConfigArray`. Its parameter is `TurboOptions` rather than `TurboConfigOptions`, which keeps the `requireFn` test seam out of the published declarations.
464
464
  */
465
- declare function turboConfig(options?: TurboOptions): PublicConfigArray;
465
+ export declare function turboConfig(options?: TurboOptions): PublicConfigArray;
466
466
  //#endregion
467
467
  //#region src/verify-eslint.d.ts
468
468
  /**
@@ -512,17 +512,17 @@ type EslintViolation = FileViolation | RuleViolation;
512
512
  *
513
513
  * The required rules default to those the baseline (this package's default export) enables for the same file, at the severity it gives them, so `rules` and `except` list only the differences. Returns every violation, none when the configuration holds; a violation names the file and the rule.
514
514
  */
515
- declare function verifyEslintConfig(options: VerifyEslintOptions): Promise<readonly EslintViolation[]>;
515
+ export declare function verifyEslintConfig(options: VerifyEslintOptions): Promise<readonly EslintViolation[]>;
516
516
  /**
517
517
  * Runs `verifyEslintConfig` and throws one error listing every violation, one per line, so a vitest test is `await assertEslintConfig({ samples: [...] })`.
518
518
  */
519
- declare function assertEslintConfig(options: VerifyEslintOptions): Promise<void>;
519
+ export declare function assertEslintConfig(options: VerifyEslintOptions): Promise<void>;
520
520
  //#endregion
521
521
  //#region src/workspace-architecture.d.ts
522
522
  /**
523
523
  * Wires the workspace-architecture rules onto `**\/package.json` from one `WorkspaceArchitectureOptions` object (`no-uphill-dependency` and `no-dependency-cycle` always; `package-name-mirrors-path`, `package-has-files`, `dev-dependency-only` and `required-scripts` only when their own option is given), returning ESLint core's own `Config[]` so the result spreads directly into `defineConfig(...)` (`...workspaceArchitectureConfig(options)`, the README's own standalone usage) alongside a consumer's own configuration.
524
524
  */
525
- declare function workspaceArchitectureConfig(options: WorkspaceArchitectureOptions): PublicConfigArray;
525
+ export declare function workspaceArchitectureConfig(options: WorkspaceArchitectureOptions): PublicConfigArray;
526
526
  //#endregion
527
527
  //#region src/rules/filename-pattern.d.ts
528
528
  /**
@@ -554,4 +554,4 @@ interface RequiredImportsEntry {
554
554
  readonly call?: boolean;
555
555
  }
556
556
  //#endregion
557
- export { type AgentSkillsOptions, type AggregateTaskOptions, type AllowedBoundariesIgnore, type AllowedEdge, type BoundaryGroup, type ComputedSpecifierHandling, type DependencyConstraint, type EffectiveSeverity, type EslintSample, type EslintViolation, type EslintViolationKind, type ExemptTargetGroup, type FileRequirement, type FilenamePatternEntry, type GroupSpec, type ImportConfine, type ImportDeny, type ImportExceptEdge, type ImportPolicy, type MarkdownFrontmatter, type MarkdownHeadingsOptions, type NamingOptions, type PackageCondition, type PackageRequirement, type PackageRequirementsOptions, type PackageSelector, type PackageSelectorFields, type PlaywrightWiringOptions, type PublishWiringOptions, type PureModulesOptions, type RankRule, type RankSkipOptions, type RequiredExportsEntry, type RequiredFiles, type RequiredHeading, type RequiredImportsEntry, type RequiredScripts, type RequiredSeverity, type RootTool, type RootWiringOptions, type ScriptContent, type ScriptRequirement, type SliceSpec, type StrykerWiringOptions, type TaskGraphRequirement, type TestHygieneOptions, type ToolConfigsWiringOptions, type ToolingWiringOptions, type TurboBoundariesOptions, type TurboDelegate, type TurboHygieneOptions, type TurboOptions, type VerifyEslintOptions, type VitestWiringOptions, type WorkspaceArchitectureOptions, agentSkillsConfig, assertEslintConfig, defaultConfig as default, exadevConfig, importPolicyConfig, markdownHeadingsConfig, publicPlugin as plugin, pureModulesConfig, testHygieneConfig, toolingWiringConfig, turboConfig, verifyEslintConfig, workspaceArchitectureConfig };
557
+ export { type AgentSkillsOptions, type AggregateTaskOptions, type AllowedBoundariesIgnore, type AllowedEdge, type BoundaryGroup, type ComputedSpecifierHandling, type DependencyConstraint, type EffectiveSeverity, type EslintSample, type EslintViolation, type EslintViolationKind, type ExemptTargetGroup, type FileRequirement, type FilenamePatternEntry, type GroupSpec, type ImportConfine, type ImportDeny, type ImportExceptEdge, type ImportPolicy, type MarkdownFrontmatter, type MarkdownHeadingsOptions, type NamingOptions, type PackageCondition, type PackageRequirement, type PackageRequirementsOptions, type PackageSelector, type PackageSelectorFields, type PlaywrightWiringOptions, type PublishWiringOptions, type PureModulesOptions, type RankRule, type RankSkipOptions, type RequiredExportsEntry, type RequiredFiles, type RequiredHeading, type RequiredImportsEntry, type RequiredScripts, type RequiredSeverity, type RootTool, type RootWiringOptions, type ScriptContent, type ScriptRequirement, type SliceSpec, type StrykerWiringOptions, type TaskGraphRequirement, type TestHygieneOptions, type ToolConfigsWiringOptions, type ToolingWiringOptions, type TurboBoundariesOptions, type TurboDelegate, type TurboHygieneOptions, type TurboOptions, type VerifyEslintOptions, type VitestWiringOptions, type WorkspaceArchitectureOptions, defaultConfig as default, publicPlugin as plugin };
package/dist/index.js CHANGED
@@ -450,7 +450,7 @@ function buildOptionalPluginConfig(preset, options = {}) {
450
450
  }
451
451
  //#endregion
452
452
  //#region package.json
453
- var version = "2.36.2";
453
+ var version = "2.36.4";
454
454
  //#endregion
455
455
  //#region src/react.ts
456
456
  /**
@@ -1422,7 +1422,7 @@ function readNonEmptyStrings(value, optionName, what) {
1422
1422
  */
1423
1423
  function compilePattern$1(pattern, optionName) {
1424
1424
  try {
1425
- new RegExp(pattern, "u");
1425
+ RegExp(pattern, "u");
1426
1426
  } catch (error) {
1427
1427
  assertIsError(error, regExpConstructorContext(pattern));
1428
1428
  throw new Error(`@exadev/eslint-config: "${optionName}" pattern "${pattern}" is not a valid regular expression: ${error.message}`, { cause: error });
@@ -1773,7 +1773,7 @@ function isRankRule(value) {
1773
1773
  }
1774
1774
  function validateRankRulePatterns(rankRules) {
1775
1775
  for (const rule of rankRules) try {
1776
- new RegExp(rule.pattern, "u");
1776
+ RegExp(rule.pattern, "u");
1777
1777
  } catch (error) {
1778
1778
  assertIsError(error, regExpConstructorContext(rule.pattern));
1779
1779
  throw new Error(`@exadev/eslint-config: "nameRanks" pattern "${rule.pattern}" is not a valid regular expression: ${error.message}`, { cause: error });
@@ -2366,24 +2366,26 @@ function createFilenamePatternRule(fs = realWorkspaceFs) {
2366
2366
  const lines = countLines(context.sourceCode.lines);
2367
2367
  for (const entry of entries) {
2368
2368
  if (entry.overLines !== void 0 && lines <= entry.overLines) continue;
2369
- if (entry.pattern !== void 0 && !entry.pattern.regexp.test(name)) if (entry.overLines === void 0) context.report({
2370
- node,
2371
- messageId: "nameMismatch",
2372
- data: {
2373
- name,
2374
- pattern: entry.pattern.source
2375
- }
2376
- });
2377
- else context.report({
2378
- node,
2379
- messageId: "oversizedNameMismatch",
2380
- data: {
2381
- name,
2382
- pattern: entry.pattern.source,
2383
- lines: String(lines),
2384
- limit: String(entry.overLines)
2385
- }
2386
- });
2369
+ if (entry.pattern !== void 0 && !entry.pattern.regexp.test(name)) {
2370
+ if (entry.overLines === void 0) context.report({
2371
+ node,
2372
+ messageId: "nameMismatch",
2373
+ data: {
2374
+ name,
2375
+ pattern: entry.pattern.source
2376
+ }
2377
+ });
2378
+ else context.report({
2379
+ node,
2380
+ messageId: "oversizedNameMismatch",
2381
+ data: {
2382
+ name,
2383
+ pattern: entry.pattern.source,
2384
+ lines: String(lines),
2385
+ limit: String(entry.overLines)
2386
+ }
2387
+ });
2388
+ }
2387
2389
  if (entry.siblings.length === 0) continue;
2388
2390
  const expected = entry.siblings.map((template) => template.replaceAll(SIBLING_NAME_PLACEHOLDER, stem(name)));
2389
2391
  if (!expected.some((sibling) => fs.existsSync(resolve(dirname(context.filename), sibling)))) context.report({
package/package.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "exadev-eslint-config",
3
3
  "description": "Shared custom ESLint rules and plugin for ExaDev projects",
4
- "version": "2.36.2",
4
+ "version": "2.36.4",
5
5
  "dependencies": {
6
6
  "@eslint/js": "^10.0.1",
7
- "@microsoft/tsdoc": "0.17.0",
7
+ "@microsoft/tsdoc": "0.17.1",
8
8
  "@stylistic/eslint-plugin": "6.0.0-beta.6",
9
- "@typescript-eslint/typescript-estree": "8.67.0",
10
- "@typescript-eslint/utils": "8.67.0",
9
+ "@typescript-eslint/typescript-estree": "8.71.0",
10
+ "@typescript-eslint/utils": "8.71.0",
11
11
  "eslint-plugin-jsdoc": "64.3.6",
12
- "eslint-plugin-json-canonical": "2.1.0",
12
+ "eslint-plugin-json-canonical": "2.1.3",
13
13
  "eslint-plugin-tsdoc": "^0.5.2",
14
14
  "minimatch": "10.2.6",
15
15
  "ts-api-utils": "^2.5.0",
@@ -22,7 +22,7 @@
22
22
  "@eslint/config-helpers": "0.7.0",
23
23
  "@eslint/json": "2.1.0",
24
24
  "@eslint/markdown": "8.0.3",
25
- "@exadev/config": "1.1.3",
25
+ "@exadev/config": "2.1.2",
26
26
  "@humanwhocodes/momoa": "^3.3.13",
27
27
  "@next/eslint-plugin-next": "^16.3.2",
28
28
  "@semantic-release/changelog": "^7.0.0",
@@ -41,12 +41,12 @@
41
41
  "eslint-plugin-jsx-a11y": "^6.10.2",
42
42
  "eslint-plugin-react": "^7.37.5",
43
43
  "eslint-plugin-react-hooks": "^7.1.1",
44
- "eslint-plugin-turbo": "2.11.4",
44
+ "eslint-plugin-turbo": "2.11.7",
45
45
  "husky": "^9.1.7",
46
46
  "lint-staged": "^17.2.0",
47
47
  "publint": "^0.3.21",
48
48
  "semantic-release": "^25.0.8",
49
- "tsdown": "^0.22.13",
49
+ "tsdown": "^0.23.0",
50
50
  "turbo": "^2.11.5",
51
51
  "typescript": "^6.0.3",
52
52
  "typescript-eslint": "^8.67.0",