@codyswann/lisa 2.189.8 → 2.189.9
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/eslint-plugin-code-organization/__tests__/enforce-statement-order.test.js +98 -0
- package/eslint-plugin-code-organization/rules/enforce-statement-order.js +14 -2
- package/package.json +1 -1
- package/plugins/lisa/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-agy/plugin.json +1 -1
- package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-agy/plugin.json +1 -1
- package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-agy/plugin.json +1 -1
- package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-agy/plugin.json +1 -1
- package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-agy/plugin.json +1 -1
- package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-agy/plugin.json +1 -1
- package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-agy/plugin.json +1 -1
- package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-agy/plugin.json +1 -1
- package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-agy/plugin.json +1 -1
- package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
|
@@ -228,6 +228,20 @@ ruleTester.run("enforce-statement-order", rule, {
|
|
|
228
228
|
}
|
|
229
229
|
`,
|
|
230
230
|
},
|
|
231
|
+
|
|
232
|
+
// Compatibility mode preserves the legacy variable/function-declaration scan
|
|
233
|
+
{
|
|
234
|
+
code: `
|
|
235
|
+
class Processor {
|
|
236
|
+
run() {
|
|
237
|
+
initialize();
|
|
238
|
+
const config = getConfig();
|
|
239
|
+
return config;
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
`,
|
|
243
|
+
options: [{ checkAllFunctionBodies: false }],
|
|
244
|
+
},
|
|
231
245
|
],
|
|
232
246
|
|
|
233
247
|
invalid: [
|
|
@@ -486,6 +500,90 @@ ruleTester.run("enforce-statement-order", rule, {
|
|
|
486
500
|
},
|
|
487
501
|
],
|
|
488
502
|
},
|
|
503
|
+
|
|
504
|
+
// Class method with side effect before definition
|
|
505
|
+
{
|
|
506
|
+
code: `
|
|
507
|
+
class Processor {
|
|
508
|
+
run() {
|
|
509
|
+
initialize();
|
|
510
|
+
const config = getConfig();
|
|
511
|
+
return config;
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
`,
|
|
515
|
+
errors: [
|
|
516
|
+
{
|
|
517
|
+
messageId: "wrongOrder",
|
|
518
|
+
data: {
|
|
519
|
+
current: DEFINITIONS,
|
|
520
|
+
previous: SIDE_EFFECTS,
|
|
521
|
+
},
|
|
522
|
+
},
|
|
523
|
+
],
|
|
524
|
+
},
|
|
525
|
+
|
|
526
|
+
// Object method with side effect before definition
|
|
527
|
+
{
|
|
528
|
+
code: `
|
|
529
|
+
const processor = {
|
|
530
|
+
run() {
|
|
531
|
+
initialize();
|
|
532
|
+
const config = getConfig();
|
|
533
|
+
return config;
|
|
534
|
+
},
|
|
535
|
+
};
|
|
536
|
+
`,
|
|
537
|
+
errors: [
|
|
538
|
+
{
|
|
539
|
+
messageId: "wrongOrder",
|
|
540
|
+
data: {
|
|
541
|
+
current: DEFINITIONS,
|
|
542
|
+
previous: SIDE_EFFECTS,
|
|
543
|
+
},
|
|
544
|
+
},
|
|
545
|
+
],
|
|
546
|
+
},
|
|
547
|
+
|
|
548
|
+
// Callback body with side effect before definition
|
|
549
|
+
{
|
|
550
|
+
code: `
|
|
551
|
+
items.map(item => {
|
|
552
|
+
track(item);
|
|
553
|
+
const label = item.label;
|
|
554
|
+
return label;
|
|
555
|
+
});
|
|
556
|
+
`,
|
|
557
|
+
errors: [
|
|
558
|
+
{
|
|
559
|
+
messageId: "wrongOrder",
|
|
560
|
+
data: {
|
|
561
|
+
current: DEFINITIONS,
|
|
562
|
+
previous: SIDE_EFFECTS,
|
|
563
|
+
},
|
|
564
|
+
},
|
|
565
|
+
],
|
|
566
|
+
},
|
|
567
|
+
|
|
568
|
+
// Default-exported arrow function with side effect before definition
|
|
569
|
+
{
|
|
570
|
+
code: `
|
|
571
|
+
export default () => {
|
|
572
|
+
initialize();
|
|
573
|
+
const config = getConfig();
|
|
574
|
+
return config;
|
|
575
|
+
};
|
|
576
|
+
`,
|
|
577
|
+
errors: [
|
|
578
|
+
{
|
|
579
|
+
messageId: "wrongOrder",
|
|
580
|
+
data: {
|
|
581
|
+
current: DEFINITIONS,
|
|
582
|
+
previous: SIDE_EFFECTS,
|
|
583
|
+
},
|
|
584
|
+
},
|
|
585
|
+
],
|
|
586
|
+
},
|
|
489
587
|
],
|
|
490
588
|
});
|
|
491
589
|
|
|
@@ -31,6 +31,9 @@ module.exports = {
|
|
|
31
31
|
checkAwaitedCalls: {
|
|
32
32
|
type: "boolean",
|
|
33
33
|
},
|
|
34
|
+
checkAllFunctionBodies: {
|
|
35
|
+
type: "boolean",
|
|
36
|
+
},
|
|
34
37
|
},
|
|
35
38
|
additionalProperties: false,
|
|
36
39
|
},
|
|
@@ -55,6 +58,7 @@ module.exports = {
|
|
|
55
58
|
};
|
|
56
59
|
const options = context.options[0] || {};
|
|
57
60
|
const checkAwaitedCalls = options.checkAwaitedCalls !== false;
|
|
61
|
+
const checkAllFunctionBodies = options.checkAllFunctionBodies !== false;
|
|
58
62
|
|
|
59
63
|
/**
|
|
60
64
|
* Removes transparent wrappers around a candidate side-effect expression.
|
|
@@ -166,13 +170,21 @@ module.exports = {
|
|
|
166
170
|
});
|
|
167
171
|
}
|
|
168
172
|
|
|
173
|
+
if (checkAllFunctionBodies) {
|
|
174
|
+
return {
|
|
175
|
+
"FunctionDeclaration, FunctionExpression, ArrowFunctionExpression"(
|
|
176
|
+
node
|
|
177
|
+
) {
|
|
178
|
+
checkBodyOrder(node);
|
|
179
|
+
},
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
|
|
169
183
|
return {
|
|
170
|
-
// Check all function declarations
|
|
171
184
|
FunctionDeclaration(node) {
|
|
172
185
|
checkBodyOrder(node);
|
|
173
186
|
},
|
|
174
187
|
|
|
175
|
-
// Check all arrow functions and function expressions assigned to variables
|
|
176
188
|
VariableDeclarator(node) {
|
|
177
189
|
if (
|
|
178
190
|
node.init &&
|
package/package.json
CHANGED
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
"ws": ">=8.20.1"
|
|
95
95
|
},
|
|
96
96
|
"name": "@codyswann/lisa",
|
|
97
|
-
"version": "2.189.
|
|
97
|
+
"version": "2.189.9",
|
|
98
98
|
"description": "Claude Code governance framework that applies guardrails, guidance, and automated enforcement to projects",
|
|
99
99
|
"main": "dist/index.js",
|
|
100
100
|
"exports": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lisa-openclaw",
|
|
3
|
-
"version": "2.189.
|
|
3
|
+
"version": "2.189.9",
|
|
4
4
|
"description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, for Claude Code and Codex",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Cody Swann"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lisa-openclaw",
|
|
3
|
-
"version": "2.189.
|
|
3
|
+
"version": "2.189.9",
|
|
4
4
|
"description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, across Claude and Codex.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Cody Swann"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lisa-openclaw",
|
|
3
|
-
"version": "2.189.
|
|
3
|
+
"version": "2.189.9",
|
|
4
4
|
"description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, for Claude Code and Codex",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Cody Swann"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lisa-openclaw",
|
|
3
|
-
"version": "2.189.
|
|
3
|
+
"version": "2.189.9",
|
|
4
4
|
"description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, for Claude Code and Codex",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Cody Swann"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lisa-openclaw",
|
|
3
|
-
"version": "2.189.
|
|
3
|
+
"version": "2.189.9",
|
|
4
4
|
"description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, for Claude Code and Codex",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Cody Swann"
|