@astralarium/repo-config-eslint 0.2.0 → 0.3.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/README.md CHANGED
@@ -8,15 +8,3 @@ import { config } from "@astralarium/repo-config-eslint";
8
8
 
9
9
  export default config({ react: true, router: true });
10
10
  ```
11
-
12
- ## Workspace guards
13
-
14
- `testWorkspace` checks a pnpm workspace:
15
-
16
- ```ts
17
- // workspace.test.ts
18
- import { testWorkspace } from "@astralarium/repo-config-eslint/testkit";
19
- import { workspaceRoot } from "@astralarium/repo-package-files";
20
-
21
- testWorkspace(workspaceRoot(import.meta.dirname)!);
22
- ```
@@ -1,4 +1,6 @@
1
1
  /** The `eslint.config.mjs` of each package of the workspace at `root`. */
2
2
  export declare function toolConfigs(root: string): string[];
3
- /** Registers every workspace guard over the pnpm workspace at `root`. */
4
- export declare function testWorkspace(root: string): void;
3
+ /** Registers the guard over the workspace at `root`: one ESLint run of
4
+ * `config()` parses every package's tool config without a fatal
5
+ * message. */
6
+ export declare function testToolConfigs(root: string): void;
@@ -1,10 +1,7 @@
1
- /** Workspace guards: a pnpm workspace's package manifests, tool configs
2
- * and l10n manifests. */
1
+ /** Workspace guard: the config parses every package's tool config. */
3
2
  import { existsSync } from "node:fs";
4
3
  import { join } from "node:path";
5
- import { testL10nManifests } from "@astralarium/repo-l10n-manifest/testkit";
6
4
  import { workspacePackageDirs } from "@astralarium/repo-package-files";
7
- import { testWorkspacePackages } from "@astralarium/repo-package-files/testkit";
8
5
  import { ESLint } from "eslint";
9
6
  import { expect, test } from "vitest";
10
7
  import { config } from "../config.js";
@@ -14,16 +11,10 @@ export function toolConfigs(root) {
14
11
  .map((dir) => join(dir, "eslint.config.mjs"))
15
12
  .filter((file) => existsSync(file));
16
13
  }
17
- /** Registers every workspace guard over the pnpm workspace at `root`. */
18
- export function testWorkspace(root) {
19
- testWorkspacePackages(root);
20
- testToolConfigs(root);
21
- testL10nManifests(root);
22
- }
23
- /** Registers the tool config guard over the workspace at `root`: one
24
- * ESLint run of `config()` parses every package's tool config without a
25
- * fatal message. */
26
- function testToolConfigs(root) {
14
+ /** Registers the guard over the workspace at `root`: one ESLint run of
15
+ * `config()` parses every package's tool config without a fatal
16
+ * message. */
17
+ export function testToolConfigs(root) {
27
18
  test("the config parses every tool config of the workspace in one run", async () => {
28
19
  const all = new ESLint({
29
20
  cwd: root,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astralarium/repo-config-eslint",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "license": "MIT",
5
5
  "homepage": "https://github.com/astralarium/repo/tree/main/packages/repo-config-eslint#readme",
6
6
  "repository": {