@sayoriqwq/effect-harness 0.2.0 → 0.2.1
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 +11 -0
- package/artifact-assets/effect/managed/docs/diagnostic-layers.md +10 -9
- package/artifact-assets/effect/managed/docs/diagnostics.md +3 -2
- package/artifact-assets/effect/managed/docs/effect-code.md +3 -4
- package/artifact-assets/effect/managed/docs/package-config.md +4 -1
- package/dist/eslint.d.ts +1 -1
- package/dist/eslint.js +8 -85
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,6 +7,11 @@ import effectHarnessEslintConfig from '@sayoriqwq/effect-harness/eslint'
|
|
|
7
7
|
import { harnessModule } from '@sayoriqwq/effect-harness/prelude'
|
|
8
8
|
```
|
|
9
9
|
|
|
10
|
+
The ESLint export contributes only two composable boundaries: application code
|
|
11
|
+
must not import delivered `repos/effect/**` or `repos/tsgo/**` reference trees.
|
|
12
|
+
tsgo is the sole authority for Effect and TypeScript semantics; Target owners
|
|
13
|
+
choose all other ESLint rules in their own flat config.
|
|
14
|
+
|
|
10
15
|
`harnessModule` plans a complete Integration-scoped managed knowledge tree,
|
|
11
16
|
reference-only pinned source diagnostics, a bounded Control Root routing block,
|
|
12
17
|
package-scoped TypeScript policy for each approved Package Root, editor
|
|
@@ -19,3 +24,9 @@ files in the Artifact with immutable provenance; they
|
|
|
19
24
|
are agent references, never application dependencies. The delivered Target Adaptation skill decides repository-specific
|
|
20
25
|
package and TypeScript topology with the Target, then hands ongoing ownership
|
|
21
26
|
back to that Target.
|
|
27
|
+
|
|
28
|
+
The reference publication authority chain is [Prelude Contract's normative
|
|
29
|
+
archive protocol](https://github.com/yume-infra/prelude/blob/main/packages/harness-contract/README.md#canonical-tree-archive-protocol)
|
|
30
|
+
→ [Partita production](https://github.com/sayoriqwq/partita#pins) → Effect
|
|
31
|
+
Harness composition → [Prelude validation and
|
|
32
|
+
materialization](https://github.com/yume-infra/prelude/blob/main/docs/v2-harness-convergence-contract.md#pinned-reference-trees).
|
|
@@ -5,15 +5,16 @@ Each feedback layer has one job:
|
|
|
5
5
|
- tsgo owns TypeScript and Effect semantics, including error/context/layer
|
|
6
6
|
channels, generators, Schema behavior, v4 API drift, and Effect-native fixes.
|
|
7
7
|
- tests own behavioral regression.
|
|
8
|
-
- ESLint owns
|
|
9
|
-
|
|
8
|
+
- Harness ESLint owns only two architectural import boundaries: application
|
|
9
|
+
code must not import `repos/effect/**` or `repos/tsgo/**`.
|
|
10
|
+
- Target owners compose every other ESLint rule, including package, test,
|
|
11
|
+
syntax, style, and project-specific policy.
|
|
10
12
|
- Harness verification owns policy equality, source provenance, route
|
|
11
13
|
reachability, suppression rejection, and packed Artifact completeness.
|
|
12
14
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
composition differ.
|
|
15
|
+
The public Target adapter and Effect Harness's repository self adapter consume
|
|
16
|
+
the same two canonical boundaries; only delivery and surrounding configuration
|
|
17
|
+
differ. Harness ESLint does not express Effect API, Schema, test-entry, package
|
|
18
|
+
migration, semantic, or style rules. If tsgo does not yet express an Effect or
|
|
19
|
+
TypeScript constraint, the Harness leaves it unenforced until tsgo does; it does
|
|
20
|
+
not add a syntax-only substitute.
|
|
@@ -15,5 +15,6 @@ severity all matter to completion.
|
|
|
15
15
|
5. Re-run the package-scoped Check that failed.
|
|
16
16
|
|
|
17
17
|
Do not use Effect diagnostic suppression comments, local severity overrides, or
|
|
18
|
-
weaker compiler settings to make the gate green.
|
|
19
|
-
|
|
18
|
+
weaker compiler settings to make the gate green. tsgo is the sole Harness
|
|
19
|
+
authority for Effect and TypeScript semantics; Harness ESLint only protects the
|
|
20
|
+
two delivered pinned-reference import boundaries.
|
|
@@ -25,10 +25,9 @@ and placement; it does not change these accepted versions or roles.
|
|
|
25
25
|
make a signature easier.
|
|
26
26
|
- Use Effect resource and Scope operators instead of ad hoc cleanup.
|
|
27
27
|
- Use `NodeRuntime.runMain` for Node entry points.
|
|
28
|
-
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
contradict them with syntax-only lint rules.
|
|
28
|
+
- Let tsgo own type-aware Effect idioms and quick fixes. Harness ESLint does not
|
|
29
|
+
duplicate them with syntax-only rules; Target owners choose any additional
|
|
30
|
+
package, test, syntax, or style lint policy.
|
|
32
31
|
|
|
33
32
|
For an unfamiliar API or behavior, follow [effect-source.md](./effect-source.md)
|
|
34
33
|
instead of guessing from memory.
|
|
@@ -27,4 +27,7 @@ export default antfu().append(...effectHarness)
|
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
Antfu v9 returns a `FlatConfigComposer`; do not spread `antfu()` into an array.
|
|
30
|
-
|
|
30
|
+
Append the Harness export so later host or test overlays cannot replace its two
|
|
31
|
+
pinned-reference import boundaries. Those two boundaries are the complete
|
|
32
|
+
Harness-owned ESLint policy. tsgo owns Effect and TypeScript semantics; the
|
|
33
|
+
Target owns and customizes every other ESLint rule.
|
package/dist/eslint.d.ts
CHANGED
|
@@ -2701,7 +2701,7 @@ declare namespace ESLint {
|
|
|
2701
2701
|
//#endregion
|
|
2702
2702
|
//#region src/eslint.d.ts
|
|
2703
2703
|
/**
|
|
2704
|
-
* Composable
|
|
2704
|
+
* Composable pinned-reference boundaries for a target-owned ESLint flat config.
|
|
2705
2705
|
*
|
|
2706
2706
|
* Targets import this value from `@sayoriqwq/effect-harness/eslint`; Prelude
|
|
2707
2707
|
* intentionally never rewrites executable config files.
|
package/dist/eslint.js
CHANGED
|
@@ -1,97 +1,20 @@
|
|
|
1
|
-
const effectHarnessEslintPlugin = { rules: { "no-disable-validation": {
|
|
2
|
-
meta: {
|
|
3
|
-
type: "problem",
|
|
4
|
-
docs: { description: "Disallow disabling Effect Schema validation." },
|
|
5
|
-
messages: { noDisableValidation: "Do not use { disableValidation: true }. Fix the data or schema instead of disabling validation." },
|
|
6
|
-
schema: []
|
|
7
|
-
},
|
|
8
|
-
create(context) {
|
|
9
|
-
return { Property(node) {
|
|
10
|
-
if ((node.key.type === "Identifier" && node.key.name === "disableValidation" || node.key.type === "Literal" && node.key.value === "disableValidation") && node.value.type === "Literal" && node.value.value === true) context.report({
|
|
11
|
-
node,
|
|
12
|
-
messageId: "noDisableValidation"
|
|
13
|
-
});
|
|
14
|
-
} };
|
|
15
|
-
}
|
|
16
|
-
} } };
|
|
17
|
-
const sharedEffectEslintPolicy = {
|
|
18
|
-
rules: { "effect-harness/no-disable-validation": "error" },
|
|
19
|
-
restrictedImports: {
|
|
20
|
-
paths: [{
|
|
21
|
-
name: "node:test",
|
|
22
|
-
message: "Use @effect/vitest for Effect test entries."
|
|
23
|
-
}, {
|
|
24
|
-
name: "@effect/cli",
|
|
25
|
-
message: "Use effect/unstable/cli for Effect v4 beta."
|
|
26
|
-
}],
|
|
27
|
-
patterns: [
|
|
28
|
-
{
|
|
29
|
-
group: ["@effect/cli/*"],
|
|
30
|
-
message: "Use effect/unstable/cli for Effect v4 beta."
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
group: ["repos/effect/**", "**/repos/effect/**"],
|
|
34
|
-
message: "Import installed packages, never pinned source trees."
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
group: ["repos/tsgo/**", "**/repos/tsgo/**"],
|
|
38
|
-
message: "Use tsgo through its installed package."
|
|
39
|
-
}
|
|
40
|
-
]
|
|
41
|
-
},
|
|
42
|
-
restrictedSyntax: [{
|
|
43
|
-
selector: "MemberExpression[object.name=\"Context\"][property.name=\"Tag\"]",
|
|
44
|
-
message: "Use Context.Service for Effect v4 services."
|
|
45
|
-
}, {
|
|
46
|
-
selector: "MemberExpression[object.name=\"Effect\"][property.name=/^(catchAllCause|serviceOption)$/]",
|
|
47
|
-
message: "Use the Effect-native safer pattern."
|
|
48
|
-
}]
|
|
49
|
-
};
|
|
50
|
-
const effectTestEslintPolicy = {
|
|
51
|
-
restrictedImportPaths: [{
|
|
52
|
-
name: "vitest",
|
|
53
|
-
importNames: [
|
|
54
|
-
"describe",
|
|
55
|
-
"it",
|
|
56
|
-
"test"
|
|
57
|
-
],
|
|
58
|
-
message: "Use @effect/vitest Effect entries."
|
|
59
|
-
}],
|
|
60
|
-
restrictedSyntax: [{
|
|
61
|
-
selector: "CallExpression[callee.name=\"it\"]",
|
|
62
|
-
message: "Use it.effect, it.live, or layer from @effect/vitest."
|
|
63
|
-
}]
|
|
64
|
-
};
|
|
65
1
|
//#endregion
|
|
66
2
|
//#region src/eslint.ts
|
|
67
3
|
/**
|
|
68
|
-
* Composable
|
|
4
|
+
* Composable pinned-reference boundaries for a target-owned ESLint flat config.
|
|
69
5
|
*
|
|
70
6
|
* Targets import this value from `@sayoriqwq/effect-harness/eslint`; Prelude
|
|
71
7
|
* intentionally never rewrites executable config files.
|
|
72
8
|
*/
|
|
73
9
|
const effectHarnessEslintConfig = [{
|
|
74
10
|
name: "effect-harness/guardrails",
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}
|
|
82
|
-
name: "effect-harness/tests",
|
|
83
|
-
files: ["tests/**/*.test.{js,mjs,ts}"],
|
|
84
|
-
rules: {
|
|
85
|
-
"no-restricted-imports": ["error", {
|
|
86
|
-
paths: [...sharedEffectEslintPolicy.restrictedImports.paths, ...effectTestEslintPolicy.restrictedImportPaths],
|
|
87
|
-
patterns: sharedEffectEslintPolicy.restrictedImports.patterns
|
|
88
|
-
}],
|
|
89
|
-
"no-restricted-syntax": [
|
|
90
|
-
"error",
|
|
91
|
-
...sharedEffectEslintPolicy.restrictedSyntax,
|
|
92
|
-
...effectTestEslintPolicy.restrictedSyntax
|
|
93
|
-
]
|
|
94
|
-
}
|
|
11
|
+
rules: { "no-restricted-imports": ["error", { restrictedImports: { patterns: [{
|
|
12
|
+
group: ["repos/effect/**", "**/repos/effect/**"],
|
|
13
|
+
message: "Import installed packages, never pinned Effect reference trees."
|
|
14
|
+
}, {
|
|
15
|
+
group: ["repos/tsgo/**", "**/repos/tsgo/**"],
|
|
16
|
+
message: "Use tsgo through its installed package, never its pinned reference tree."
|
|
17
|
+
}] } }.restrictedImports] }
|
|
95
18
|
}];
|
|
96
19
|
//#endregion
|
|
97
20
|
export { effectHarnessEslintConfig as default };
|