@elaraai/eslint-plugin-east 1.0.79 → 1.0.81
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 +23 -0
- package/dist/src/index.d.ts +7 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +8 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/rule.d.ts.map +1 -1
- package/dist/src/rule.js +1 -0
- package/dist/src/rule.js.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -60,6 +60,29 @@ Or extend the bundled config: `export default [east.configs.recommended];`
|
|
|
60
60
|
}]
|
|
61
61
|
```
|
|
62
62
|
|
|
63
|
+
`only` runs just the rules it names — every other rule is off, and `disabled`
|
|
64
|
+
still applies. The plugin exports `hostValueRules`: the rules over host code
|
|
65
|
+
that holds decoded East values — how it prints, reads, compares, collects,
|
|
66
|
+
types and builds them. A package that authors East IR by design (a UI factory
|
|
67
|
+
library, a test's program helpers) runs those alone:
|
|
68
|
+
|
|
69
|
+
```js
|
|
70
|
+
import east, { hostValueRules } from "@elaraai/eslint-plugin-east";
|
|
71
|
+
|
|
72
|
+
export default [
|
|
73
|
+
{
|
|
74
|
+
files: ["src/**/*.ts", "test/**/*.ts"],
|
|
75
|
+
languageOptions: { parser: tsParser, parserOptions: { projectService: true } },
|
|
76
|
+
plugins: { east },
|
|
77
|
+
rules: { "east/east-rules": ["error", { only: hostValueRules }] },
|
|
78
|
+
},
|
|
79
|
+
];
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
The rules read type information, so a file linted with none (a snippet a
|
|
83
|
+
test lints with `project: false`) turns `east/east-rules` off rather than
|
|
84
|
+
leaving it to throw.
|
|
85
|
+
|
|
63
86
|
## Claude Code plugin
|
|
64
87
|
|
|
65
88
|
The East ecosystem also ships a [Claude Code](https://claude.com/claude-code) plugin — East language skills, example search, and preemptive diagnostics for East code — installed separately from the `elaraai` marketplace:
|
package/dist/src/index.d.ts
CHANGED
|
@@ -3,6 +3,13 @@
|
|
|
3
3
|
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
4
4
|
*/
|
|
5
5
|
import type { ESLint } from "eslint";
|
|
6
|
+
/**
|
|
7
|
+
* The rules over host code that builds or holds decoded East values — pass as
|
|
8
|
+
* `"east/east-rules": ["error", { only: hostValueRules }]` where the IR-authoring
|
|
9
|
+
* rules do not apply (a UI library's source and tests, whose factories and handle
|
|
10
|
+
* builders build East programs rather than being ones).
|
|
11
|
+
*/
|
|
12
|
+
export declare const hostValueRules: readonly string[];
|
|
6
13
|
declare const plugin: ESLint.Plugin;
|
|
7
14
|
export default plugin;
|
|
8
15
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,MAAM,EAAgB,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,MAAM,EAAgB,MAAM,QAAQ,CAAC;AAInD;;;;;GAKG;AACH,eAAO,MAAM,cAAc,EAAE,SAAS,MAAM,EAAuB,CAAC;AAQpE,QAAA,MAAM,MAAM,EAAE,MAAM,CAAC,MAGpB,CAAC;AASF,eAAe,MAAM,CAAC"}
|
package/dist/src/index.js
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
|
+
import { hostValueRuleNames } from "@elaraai/east-diagnostics";
|
|
1
2
|
import { eastRules } from "./rule.js";
|
|
3
|
+
/**
|
|
4
|
+
* The rules over host code that builds or holds decoded East values — pass as
|
|
5
|
+
* `"east/east-rules": ["error", { only: hostValueRules }]` where the IR-authoring
|
|
6
|
+
* rules do not apply (a UI library's source and tests, whose factories and handle
|
|
7
|
+
* builders build East programs rather than being ones).
|
|
8
|
+
*/
|
|
9
|
+
export const hostValueRules = hostValueRuleNames;
|
|
2
10
|
// typescript-eslint's RuleModule is structurally an ESLint rule; the cast bridges
|
|
3
11
|
// the two slightly different RuleModule types.
|
|
4
12
|
const rules = {
|
package/dist/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,kFAAkF;AAClF,+CAA+C;AAC/C,MAAM,KAAK,GAAoC;IAC7C,YAAY,EAAE,SAAuC;CACtD,CAAC;AAEF,MAAM,MAAM,GAAkB;IAC5B,IAAI,EAAE,EAAE,IAAI,EAAE,6BAA6B,EAAE,OAAO,EAAE,OAAO,EAAE;IAC/D,KAAK;CACN,CAAC;AAEF,MAAM,CAAC,OAAO,GAAG;IACf,WAAW,EAAE;QACX,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;QACzB,KAAK,EAAE,EAAE,iBAAiB,EAAE,MAAM,EAAE;KACb;CAC1B,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,cAAc,GAAsB,kBAAkB,CAAC;AAEpE,kFAAkF;AAClF,+CAA+C;AAC/C,MAAM,KAAK,GAAoC;IAC7C,YAAY,EAAE,SAAuC;CACtD,CAAC;AAEF,MAAM,MAAM,GAAkB;IAC5B,IAAI,EAAE,EAAE,IAAI,EAAE,6BAA6B,EAAE,OAAO,EAAE,OAAO,EAAE;IAC/D,KAAK;CACN,CAAC;AAEF,MAAM,CAAC,OAAO,GAAG;IACf,WAAW,EAAE;QACX,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;QACzB,KAAK,EAAE,EAAE,iBAAiB,EAAE,MAAM,EAAE;KACb;CAC1B,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
package/dist/src/rule.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rule.d.ts","sourceRoot":"","sources":["../../src/rule.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAgB,KAAK,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAEhF,MAAM,MAAM,OAAO,GAAG,CAAC,gBAAgB,CAAC,CAAC;AACzC,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC;AAShC,eAAO,MAAM,SAAS;;
|
|
1
|
+
{"version":3,"file":"rule.d.ts","sourceRoot":"","sources":["../../src/rule.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAgB,KAAK,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAEhF,MAAM,MAAM,OAAO,GAAG,CAAC,gBAAgB,CAAC,CAAC;AACzC,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC;AAShC,eAAO,MAAM,SAAS;;CAkDpB,CAAC"}
|
package/dist/src/rule.js
CHANGED
|
@@ -22,6 +22,7 @@ export const eastRules = createRule({
|
|
|
22
22
|
type: "object",
|
|
23
23
|
properties: {
|
|
24
24
|
disabled: { type: "array", items: { type: "string" } },
|
|
25
|
+
only: { type: "array", items: { type: "string" } },
|
|
25
26
|
preferExplicitEastType: {
|
|
26
27
|
type: "object",
|
|
27
28
|
properties: { mode: { type: "string", enum: ["under-determined", "all-raw-values"] } },
|
package/dist/src/rule.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rule.js","sourceRoot":"","sources":["../../src/rule.ts"],"names":[],"m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EAAE,OAAO,CAAC,cAAc,EAAE,EAAE,OAAO,CAAC,CAAC;gBAC7F,KAAK,MAAM,CAAC,IAAI,WAAW,EAAE,CAAC;oBAC5B,MAAM,KAAK,GAAG,UAAU,CAAC,6BAA6B,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;oBAChE,MAAM,GAAG,GAAG,UAAU,CAAC,6BAA6B,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC;oBACzE,OAAO,CAAC,MAAM,CAAC;wBACb,GAAG,EAAE;4BACH,KAAK,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,GAAG,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,SAAS,EAAE;4BACxD,GAAG,EAAE,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,GAAG,CAAC,EAAE,MAAM,EAAE,GAAG,CAAC,SAAS,EAAE;yBACnD;wBACD,SAAS,EAAE,MAAM;wBACjB,IAAI,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,WAAW,EAAE,EAAE;qBACtD,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elaraai/eslint-plugin-east",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.81",
|
|
4
4
|
"license": "AGPL-3.0-or-later",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "ESLint plugin surfacing East-specific idiom diagnostics (the east-diagnostics rule set) in the editor and CI.",
|
|
@@ -40,14 +40,14 @@
|
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@typescript-eslint/utils": "^8.42.0",
|
|
43
|
-
"@elaraai/east-diagnostics": "1.0.
|
|
43
|
+
"@elaraai/east-diagnostics": "1.0.81"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@types/node": "^22.18.1",
|
|
47
47
|
"@typescript-eslint/parser": "^8.42.0",
|
|
48
48
|
"eslint": "^9.34.0",
|
|
49
49
|
"typescript": "~5.9.2",
|
|
50
|
-
"@elaraai/east": "1.0.
|
|
50
|
+
"@elaraai/east": "1.0.81"
|
|
51
51
|
},
|
|
52
52
|
"scripts": {
|
|
53
53
|
"build": "tsc",
|