exadev-eslint-config 2.36.2 → 2.36.3

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.3";
489
489
  //#endregion
490
490
  //#region src/react.ts
491
491
  /**
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.3";
454
454
  //#endregion
455
455
  //#region src/react.ts
456
456
  /**
package/package.json CHANGED
@@ -1,7 +1,7 @@
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.3",
5
5
  "dependencies": {
6
6
  "@eslint/js": "^10.0.1",
7
7
  "@microsoft/tsdoc": "0.17.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",