@luna-park/plugin 1.6.0 → 1.7.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.
@@ -0,0 +1,21 @@
1
+ //#region src/eslint/index.d.ts
2
+ export declare const objectKeysOptions: {
3
+ orderedKeys: string[];
4
+ selectors: {
5
+ target: {
6
+ name: string;
7
+ type: "function" | "property";
8
+ };
9
+ mode: "direct" | "recursive";
10
+ orderedKeys?: Array<string>;
11
+ sorting?: "asc" | "desc" | "none";
12
+ }[];
13
+ };
14
+ declare const _default: {
15
+ name: string;
16
+ rules: {
17
+ "sort-keys-custom-order/object-keys": ["error", typeof objectKeysOptions];
18
+ };
19
+ };
20
+ //#endregion
21
+ export { _default as default };
@@ -0,0 +1,73 @@
1
+ //#region src/eslint/index.ts
2
+ function selector(name, type, options) {
3
+ return {
4
+ mode: "direct",
5
+ ...options,
6
+ target: {
7
+ name,
8
+ type
9
+ }
10
+ };
11
+ }
12
+ const objectKeysOptions = {
13
+ orderedKeys: ["id", "name"],
14
+ selectors: [
15
+ selector("makePlugin", "function", { orderedKeys: [
16
+ "id",
17
+ "name",
18
+ "description",
19
+ "icon",
20
+ "color",
21
+ "llm",
22
+ "config",
23
+ "internals",
24
+ "settings",
25
+ "lifecycle",
26
+ "editor",
27
+ "hooks",
28
+ "windows",
29
+ "inject",
30
+ "build"
31
+ ] }),
32
+ selector("lifecycle", "property", { orderedKeys: [
33
+ "mount",
34
+ "update",
35
+ "unmount"
36
+ ] }),
37
+ selector("editor", "property", { orderedKeys: [
38
+ "components",
39
+ "nodes",
40
+ "tokens",
41
+ "panel",
42
+ "inputs",
43
+ "interfaces",
44
+ "guards",
45
+ "templates",
46
+ "wrapper"
47
+ ] }),
48
+ selector("documentation", "property", { orderedKeys: ["short", "description"] }),
49
+ selector("schema", "property", {
50
+ mode: "recursive",
51
+ sorting: "none"
52
+ }),
53
+ selector("makeLogicNode", "function", { orderedKeys: [
54
+ "name",
55
+ "inputs",
56
+ "outputs",
57
+ "config",
58
+ "methods",
59
+ "display",
60
+ "documentation",
61
+ "build"
62
+ ] }),
63
+ selector("inputs", "property", { sorting: "none" }),
64
+ selector("outputs", "property", { sorting: "none" }),
65
+ selector("methods", "property", { sorting: "none" })
66
+ ]
67
+ };
68
+ var eslint_default = {
69
+ name: "@luna-park/plugin/eslint",
70
+ rules: { "sort-keys-custom-order/object-keys": ["error", objectKeysOptions] }
71
+ };
72
+ //#endregion
73
+ export { eslint_default as default, objectKeysOptions };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luna-park/plugin",
3
- "version": "1.6.0",
3
+ "version": "1.7.0",
4
4
  "private": false,
5
5
  "description": "Plugin helper for Luna Park.",
6
6
  "homepage": "https://luna-park.app",
@@ -18,6 +18,10 @@
18
18
  "types": "./dist/index.d.mts",
19
19
  "import": "./dist/index.mjs"
20
20
  },
21
+ "./eslint": {
22
+ "types": "./dist/eslint.d.mts",
23
+ "import": "./dist/eslint.mjs"
24
+ },
21
25
  "./extractor": {
22
26
  "types": "./dist/extractor.d.mts",
23
27
  "import": "./dist/extractor.mjs"