@aiready/consistency 0.3.5 → 0.5.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/dist/cli.js CHANGED
@@ -89,6 +89,13 @@ var COMMON_SHORT_WORDS = /* @__PURE__ */ new Set([
89
89
  "tmp",
90
90
  "ext",
91
91
  "sep",
92
+ // Prepositions and conjunctions
93
+ "and",
94
+ "from",
95
+ "how",
96
+ "pad",
97
+ "bar",
98
+ "non",
92
99
  // Additional full words commonly flagged
93
100
  "tax",
94
101
  "cat",
@@ -335,6 +342,17 @@ var ACCEPTABLE_ABBREVIATIONS = /* @__PURE__ */ new Set([
335
342
  "alb",
336
343
  "nlb",
337
344
  "aws",
345
+ "ses",
346
+ "gst",
347
+ "cdk",
348
+ "btn",
349
+ "buf",
350
+ "agg",
351
+ "ocr",
352
+ "ai",
353
+ "cf",
354
+ "cfn",
355
+ "ga",
338
356
  // Metrics/Performance
339
357
  "fcp",
340
358
  "lcp",
@@ -346,12 +364,14 @@ var ACCEPTABLE_ABBREVIATIONS = /* @__PURE__ */ new Set([
346
364
  "qps",
347
365
  "rps",
348
366
  "tps",
367
+ "wpm",
349
368
  // Testing & i18n
350
369
  "po",
351
370
  "e2e",
352
371
  "a11y",
353
372
  "i18n",
354
373
  "l10n",
374
+ "spy",
355
375
  // Domain-specific abbreviations (context-aware)
356
376
  "sk",
357
377
  "fy",
@@ -361,6 +381,16 @@ var ACCEPTABLE_ABBREVIATIONS = /* @__PURE__ */ new Set([
361
381
  "cta",
362
382
  "roi",
363
383
  "kpi",
384
+ "ttl",
385
+ "pct",
386
+ // Technical abbreviations
387
+ "mac",
388
+ "hex",
389
+ "esm",
390
+ "git",
391
+ "rec",
392
+ "loc",
393
+ "dup",
364
394
  // Boolean helpers (these are intentional short names)
365
395
  "is",
366
396
  "has",
@@ -371,7 +401,18 @@ var ACCEPTABLE_ABBREVIATIONS = /* @__PURE__ */ new Set([
371
401
  // Date/Time context (when in date contexts)
372
402
  "d",
373
403
  "t",
374
- "dt"
404
+ "dt",
405
+ // Coverage metrics (industry standard: statements/branches/functions/lines)
406
+ "s",
407
+ "b",
408
+ "f",
409
+ "l",
410
+ // Common media/content abbreviations
411
+ "vid",
412
+ "pic",
413
+ "img",
414
+ "doc",
415
+ "msg"
375
416
  ]);
376
417
  async function analyzeNaming(files) {
377
418
  const issues = [];
@@ -419,6 +460,10 @@ function analyzeFileNaming(file, content, customAbbreviations, customShortWords,
419
460
  const singleLetterMatches = line.matchAll(/\b(?:const|let|var)\s+([a-hm-z])\s*=/gi);
420
461
  for (const match of singleLetterMatches) {
421
462
  const letter = match[1].toLowerCase();
463
+ const isCoverageContext = /coverage|summary|metrics|pct|percent/i.test(line) || /\.(?:statements|branches|functions|lines)\.pct/i.test(line);
464
+ if (isCoverageContext && ["s", "b", "f", "l"].includes(letter)) {
465
+ continue;
466
+ }
422
467
  const isInLoopContext = line.includes("for") || /\.(map|filter|forEach|reduce|find|some|every)\s*\(/.test(line) || line.includes("=>") || // Arrow function
423
468
  /\w+\s*=>\s*/.test(line);
424
469
  const isI18nContext = line.includes("useTranslation") || line.includes("i18n.t") || /\bt\s*\(['"]/.test(line);
@@ -523,14 +568,18 @@ function analyzeFileNaming(file, content, customAbbreviations, customShortWords,
523
568
  if (isEntryPoint) {
524
569
  continue;
525
570
  }
526
- const isFactoryPattern = name.match(/(Factory|Builder|Creator|Generator)$/);
571
+ const isFactoryPattern = name.match(/(Factory|Builder|Creator|Generator|Provider|Adapter|Mock)$/);
527
572
  const isEventHandler = name.match(/^on[A-Z]/);
528
573
  const isDescriptiveLong = name.length > 15;
529
- const isDescriptivePattern = name.match(/^(default|total|count|sum|avg|max|min|initial|current|previous|next)\w+/) || name.match(/\w+(Count|Total|Sum|Average|List|Map|Set|Config|Settings|Options|Props)$/);
574
+ const isReactHook = name.match(/^use[A-Z]/);
575
+ const isDescriptivePattern = name.match(/^(default|total|count|sum|avg|max|min|initial|current|previous|next)\w+/) || name.match(/\w+(Count|Total|Sum|Average|List|Map|Set|Config|Settings|Options|Props|Data|Info|Details|State|Status|Response|Result)$/);
576
+ const isHelperPattern = name.match(/^(to|from|with|without|for|as|into)\w+/) || // toMetadata, withLogger, forPath
577
+ name.match(/^\w+(To|From|With|Without|For|As|Into)\w*$/);
578
+ const isUtilityName = ["cn", "proxy", "sitemap", "robots", "gtag"].includes(name);
530
579
  const capitalCount = (name.match(/[A-Z]/g) || []).length;
531
580
  const isCompoundWord = capitalCount >= 3;
532
- const hasActionVerb = name.match(/^(get|set|is|has|can|should|create|update|delete|fetch|load|save|process|handle|validate|check|find|search|filter|map|reduce|make|do|run|start|stop|build|parse|format|render|calculate|compute|generate|transform|convert|normalize|sanitize|encode|decode|compress|extract|merge|split|join|sort|compare|test|verify|ensure|apply|execute|invoke|call|emit|dispatch|trigger|listen|subscribe|unsubscribe|add|remove|clear|reset|toggle|enable|disable|open|close|connect|disconnect|send|receive|read|write|import|export|register|unregister|mount|unmount)/);
533
- if (!hasActionVerb && !isFactoryPattern && !isEventHandler && !isDescriptiveLong && !isDescriptivePattern && !isCompoundWord) {
581
+ const hasActionVerb = name.match(/^(get|set|is|has|can|should|create|update|delete|fetch|load|save|process|handle|validate|check|find|search|filter|map|reduce|make|do|run|start|stop|build|parse|format|render|calculate|compute|generate|transform|convert|normalize|sanitize|encode|decode|compress|extract|merge|split|join|sort|compare|test|verify|ensure|apply|execute|invoke|call|emit|dispatch|trigger|listen|subscribe|unsubscribe|add|remove|clear|reset|toggle|enable|disable|open|close|connect|disconnect|send|receive|read|write|import|export|register|unregister|mount|unmount|track|store|persist|upsert|derive|classify|combine|discover|activate|require|assert|expect|mask|escape|sign|put|list|complete|page|safe|mock|pick|pluralize|text)/);
582
+ if (!hasActionVerb && !isFactoryPattern && !isEventHandler && !isDescriptiveLong && !isDescriptivePattern && !isCompoundWord && !isHelperPattern && !isUtilityName && !isReactHook) {
534
583
  issues.push({
535
584
  file,
536
585
  line: lineNumber,
package/dist/cli.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  analyzeConsistency
4
- } from "./chunk-2BTBNG6X.mjs";
4
+ } from "./chunk-TXHPUU7A.mjs";
5
5
 
6
6
  // src/cli.ts
7
7
  import { Command } from "commander";
package/dist/index.js CHANGED
@@ -90,6 +90,13 @@ var COMMON_SHORT_WORDS = /* @__PURE__ */ new Set([
90
90
  "tmp",
91
91
  "ext",
92
92
  "sep",
93
+ // Prepositions and conjunctions
94
+ "and",
95
+ "from",
96
+ "how",
97
+ "pad",
98
+ "bar",
99
+ "non",
93
100
  // Additional full words commonly flagged
94
101
  "tax",
95
102
  "cat",
@@ -336,6 +343,17 @@ var ACCEPTABLE_ABBREVIATIONS = /* @__PURE__ */ new Set([
336
343
  "alb",
337
344
  "nlb",
338
345
  "aws",
346
+ "ses",
347
+ "gst",
348
+ "cdk",
349
+ "btn",
350
+ "buf",
351
+ "agg",
352
+ "ocr",
353
+ "ai",
354
+ "cf",
355
+ "cfn",
356
+ "ga",
339
357
  // Metrics/Performance
340
358
  "fcp",
341
359
  "lcp",
@@ -347,12 +365,14 @@ var ACCEPTABLE_ABBREVIATIONS = /* @__PURE__ */ new Set([
347
365
  "qps",
348
366
  "rps",
349
367
  "tps",
368
+ "wpm",
350
369
  // Testing & i18n
351
370
  "po",
352
371
  "e2e",
353
372
  "a11y",
354
373
  "i18n",
355
374
  "l10n",
375
+ "spy",
356
376
  // Domain-specific abbreviations (context-aware)
357
377
  "sk",
358
378
  "fy",
@@ -362,6 +382,16 @@ var ACCEPTABLE_ABBREVIATIONS = /* @__PURE__ */ new Set([
362
382
  "cta",
363
383
  "roi",
364
384
  "kpi",
385
+ "ttl",
386
+ "pct",
387
+ // Technical abbreviations
388
+ "mac",
389
+ "hex",
390
+ "esm",
391
+ "git",
392
+ "rec",
393
+ "loc",
394
+ "dup",
365
395
  // Boolean helpers (these are intentional short names)
366
396
  "is",
367
397
  "has",
@@ -372,7 +402,18 @@ var ACCEPTABLE_ABBREVIATIONS = /* @__PURE__ */ new Set([
372
402
  // Date/Time context (when in date contexts)
373
403
  "d",
374
404
  "t",
375
- "dt"
405
+ "dt",
406
+ // Coverage metrics (industry standard: statements/branches/functions/lines)
407
+ "s",
408
+ "b",
409
+ "f",
410
+ "l",
411
+ // Common media/content abbreviations
412
+ "vid",
413
+ "pic",
414
+ "img",
415
+ "doc",
416
+ "msg"
376
417
  ]);
377
418
  async function analyzeNaming(files) {
378
419
  const issues = [];
@@ -420,6 +461,10 @@ function analyzeFileNaming(file, content, customAbbreviations, customShortWords,
420
461
  const singleLetterMatches = line.matchAll(/\b(?:const|let|var)\s+([a-hm-z])\s*=/gi);
421
462
  for (const match of singleLetterMatches) {
422
463
  const letter = match[1].toLowerCase();
464
+ const isCoverageContext = /coverage|summary|metrics|pct|percent/i.test(line) || /\.(?:statements|branches|functions|lines)\.pct/i.test(line);
465
+ if (isCoverageContext && ["s", "b", "f", "l"].includes(letter)) {
466
+ continue;
467
+ }
423
468
  const isInLoopContext = line.includes("for") || /\.(map|filter|forEach|reduce|find|some|every)\s*\(/.test(line) || line.includes("=>") || // Arrow function
424
469
  /\w+\s*=>\s*/.test(line);
425
470
  const isI18nContext = line.includes("useTranslation") || line.includes("i18n.t") || /\bt\s*\(['"]/.test(line);
@@ -524,14 +569,18 @@ function analyzeFileNaming(file, content, customAbbreviations, customShortWords,
524
569
  if (isEntryPoint) {
525
570
  continue;
526
571
  }
527
- const isFactoryPattern = name.match(/(Factory|Builder|Creator|Generator)$/);
572
+ const isFactoryPattern = name.match(/(Factory|Builder|Creator|Generator|Provider|Adapter|Mock)$/);
528
573
  const isEventHandler = name.match(/^on[A-Z]/);
529
574
  const isDescriptiveLong = name.length > 15;
530
- const isDescriptivePattern = name.match(/^(default|total|count|sum|avg|max|min|initial|current|previous|next)\w+/) || name.match(/\w+(Count|Total|Sum|Average|List|Map|Set|Config|Settings|Options|Props)$/);
575
+ const isReactHook = name.match(/^use[A-Z]/);
576
+ const isDescriptivePattern = name.match(/^(default|total|count|sum|avg|max|min|initial|current|previous|next)\w+/) || name.match(/\w+(Count|Total|Sum|Average|List|Map|Set|Config|Settings|Options|Props|Data|Info|Details|State|Status|Response|Result)$/);
577
+ const isHelperPattern = name.match(/^(to|from|with|without|for|as|into)\w+/) || // toMetadata, withLogger, forPath
578
+ name.match(/^\w+(To|From|With|Without|For|As|Into)\w*$/);
579
+ const isUtilityName = ["cn", "proxy", "sitemap", "robots", "gtag"].includes(name);
531
580
  const capitalCount = (name.match(/[A-Z]/g) || []).length;
532
581
  const isCompoundWord = capitalCount >= 3;
533
- const hasActionVerb = name.match(/^(get|set|is|has|can|should|create|update|delete|fetch|load|save|process|handle|validate|check|find|search|filter|map|reduce|make|do|run|start|stop|build|parse|format|render|calculate|compute|generate|transform|convert|normalize|sanitize|encode|decode|compress|extract|merge|split|join|sort|compare|test|verify|ensure|apply|execute|invoke|call|emit|dispatch|trigger|listen|subscribe|unsubscribe|add|remove|clear|reset|toggle|enable|disable|open|close|connect|disconnect|send|receive|read|write|import|export|register|unregister|mount|unmount)/);
534
- if (!hasActionVerb && !isFactoryPattern && !isEventHandler && !isDescriptiveLong && !isDescriptivePattern && !isCompoundWord) {
582
+ const hasActionVerb = name.match(/^(get|set|is|has|can|should|create|update|delete|fetch|load|save|process|handle|validate|check|find|search|filter|map|reduce|make|do|run|start|stop|build|parse|format|render|calculate|compute|generate|transform|convert|normalize|sanitize|encode|decode|compress|extract|merge|split|join|sort|compare|test|verify|ensure|apply|execute|invoke|call|emit|dispatch|trigger|listen|subscribe|unsubscribe|add|remove|clear|reset|toggle|enable|disable|open|close|connect|disconnect|send|receive|read|write|import|export|register|unregister|mount|unmount|track|store|persist|upsert|derive|classify|combine|discover|activate|require|assert|expect|mask|escape|sign|put|list|complete|page|safe|mock|pick|pluralize|text)/);
583
+ if (!hasActionVerb && !isFactoryPattern && !isEventHandler && !isDescriptiveLong && !isDescriptivePattern && !isCompoundWord && !isHelperPattern && !isUtilityName && !isReactHook) {
535
584
  issues.push({
536
585
  file,
537
586
  line: lineNumber,
package/dist/index.mjs CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  analyzeNaming,
4
4
  analyzePatterns,
5
5
  detectNamingConventions
6
- } from "./chunk-2BTBNG6X.mjs";
6
+ } from "./chunk-TXHPUU7A.mjs";
7
7
  export {
8
8
  analyzeConsistency,
9
9
  analyzeNaming,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiready/consistency",
3
- "version": "0.3.5",
3
+ "version": "0.5.0",
4
4
  "description": "Detects consistency issues in naming, patterns, and architecture that confuse AI models",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -15,6 +15,15 @@
15
15
  "import": "./dist/index.mjs"
16
16
  }
17
17
  },
18
+ "scripts": {
19
+ "build": "tsup src/index.ts src/cli.ts --format cjs,esm --dts",
20
+ "dev": "tsup src/index.ts src/cli.ts --format cjs,esm --dts --watch",
21
+ "test": "vitest run",
22
+ "lint": "eslint src",
23
+ "clean": "rm -rf dist",
24
+ "prepublishOnly": "pnpm build",
25
+ "release": "pnpm build && pnpm publish --no-git-checks"
26
+ },
18
27
  "keywords": [
19
28
  "aiready",
20
29
  "consistency",
@@ -39,9 +48,9 @@
39
48
  },
40
49
  "homepage": "https://github.com/caopengau/aiready-consistency",
41
50
  "dependencies": {
51
+ "@aiready/core": "workspace:*",
42
52
  "chalk": "^5.3.0",
43
- "commander": "^12.1.0",
44
- "@aiready/core": "0.7.1"
53
+ "commander": "^12.1.0"
45
54
  },
46
55
  "devDependencies": {
47
56
  "@types/node": "^22.10.5",
@@ -51,13 +60,5 @@
51
60
  },
52
61
  "engines": {
53
62
  "node": ">=18.0.0"
54
- },
55
- "scripts": {
56
- "build": "tsup src/index.ts src/cli.ts --format cjs,esm --dts",
57
- "dev": "tsup src/index.ts src/cli.ts --format cjs,esm --dts --watch",
58
- "test": "vitest run",
59
- "lint": "eslint src",
60
- "clean": "rm -rf dist",
61
- "release": "pnpm build && pnpm publish --no-git-checks"
62
63
  }
63
- }
64
+ }
@@ -9,8 +9,8 @@ const COMMON_SHORT_WORDS = new Set([
9
9
  'run', 'try', 'use', 'get', 'set', 'add', 'put', 'map', 'log', 'row', 'col',
10
10
  'tab', 'box', 'div', 'nav', 'tag', 'any', 'all', 'one', 'two', 'out', 'off',
11
11
  'on', 'yes', 'no', 'now', 'max', 'min', 'sum', 'avg', 'ref', 'src', 'dst',
12
- 'raw', 'def', 'sub', 'pub', 'pre', 'mid', 'alt', 'opt', 'tmp', 'ext', 'sep',
13
- // Additional full words commonly flagged
12
+ 'raw', 'def', 'sub', 'pub', 'pre', 'mid', 'alt', 'opt', 'tmp', 'ext', 'sep', // Prepositions and conjunctions
13
+ 'and', 'from', 'how', 'pad', 'bar', 'non', // Additional full words commonly flagged
14
14
  'tax', 'cat', 'dog', 'car', 'bus', 'web', 'app', 'war', 'law', 'pay', 'buy',
15
15
  'win', 'cut', 'hit', 'hot', 'pop', 'job', 'age', 'act', 'let', 'lot', 'bad',
16
16
  'big', 'far', 'few', 'own', 'per', 'red', 'low', 'see', 'six', 'ten', 'way',
@@ -55,16 +55,23 @@ const ACCEPTABLE_ABBREVIATIONS = new Set([
55
55
  'ts', 'js', 'jsx', 'tsx', 'py', 'rb', 'vue', 're', 'fn', 'fns', 'mod', 'opts', 'dev',
56
56
  // Cloud/Infrastructure
57
57
  's3', 'ec2', 'sqs', 'sns', 'vpc', 'ami', 'iam', 'acl', 'elb', 'alb', 'nlb', 'aws',
58
+ 'ses', 'gst', 'cdk', 'btn', 'buf', 'agg', 'ocr', 'ai', 'cf', 'cfn', 'ga',
58
59
  // Metrics/Performance
59
- 'fcp', 'lcp', 'cls', 'ttfb', 'tti', 'fid', 'fps', 'qps', 'rps', 'tps',
60
+ 'fcp', 'lcp', 'cls', 'ttfb', 'tti', 'fid', 'fps', 'qps', 'rps', 'tps', 'wpm',
60
61
  // Testing & i18n
61
- 'po', 'e2e', 'a11y', 'i18n', 'l10n',
62
+ 'po', 'e2e', 'a11y', 'i18n', 'l10n', 'spy',
62
63
  // Domain-specific abbreviations (context-aware)
63
- 'sk', 'fy', 'faq', 'og', 'seo', 'cta', 'roi', 'kpi',
64
+ 'sk', 'fy', 'faq', 'og', 'seo', 'cta', 'roi', 'kpi', 'ttl', 'pct',
65
+ // Technical abbreviations
66
+ 'mac', 'hex', 'esm', 'git', 'rec', 'loc', 'dup',
64
67
  // Boolean helpers (these are intentional short names)
65
68
  'is', 'has', 'can', 'did', 'was', 'are',
66
69
  // Date/Time context (when in date contexts)
67
- 'd', 't', 'dt'
70
+ 'd', 't', 'dt',
71
+ // Coverage metrics (industry standard: statements/branches/functions/lines)
72
+ 's', 'b', 'f', 'l',
73
+ // Common media/content abbreviations
74
+ 'vid', 'pic', 'img', 'doc', 'msg'
68
75
  ]);
69
76
 
70
77
  /**
@@ -153,6 +160,13 @@ function analyzeFileNaming(
153
160
  for (const match of singleLetterMatches) {
154
161
  const letter = match[1].toLowerCase();
155
162
 
163
+ // Coverage metrics context (s/b/f/l are standard for statements/branches/functions/lines)
164
+ const isCoverageContext = /coverage|summary|metrics|pct|percent/i.test(line) ||
165
+ /\.(?:statements|branches|functions|lines)\.pct/i.test(line);
166
+ if (isCoverageContext && ['s', 'b', 'f', 'l'].includes(letter)) {
167
+ continue;
168
+ }
169
+
156
170
  // Enhanced loop/iterator context detection
157
171
  const isInLoopContext =
158
172
  line.includes('for') ||
@@ -309,22 +323,32 @@ function analyzeFileNaming(
309
323
  // 4. Descriptive aggregate/collection patterns
310
324
  // 5. Very long descriptive names (>15 chars)
311
325
  // 6. Compound words with 3+ capitals
326
+ // 7. Helper/utility functions (common patterns)
327
+ // 8. React hooks (useX pattern)
312
328
 
313
- const isFactoryPattern = name.match(/(Factory|Builder|Creator|Generator)$/);
329
+ const isFactoryPattern = name.match(/(Factory|Builder|Creator|Generator|Provider|Adapter|Mock)$/);
314
330
  const isEventHandler = name.match(/^on[A-Z]/);
315
331
  const isDescriptiveLong = name.length > 15; // Reduced from 20 to 15
332
+ const isReactHook = name.match(/^use[A-Z]/); // React hooks
316
333
 
317
334
  // Check for descriptive patterns
318
335
  const isDescriptivePattern = name.match(/^(default|total|count|sum|avg|max|min|initial|current|previous|next)\w+/) ||
319
- name.match(/\w+(Count|Total|Sum|Average|List|Map|Set|Config|Settings|Options|Props)$/);
336
+ name.match(/\w+(Count|Total|Sum|Average|List|Map|Set|Config|Settings|Options|Props|Data|Info|Details|State|Status|Response|Result)$/);
337
+
338
+ // Helper/utility function patterns
339
+ const isHelperPattern = name.match(/^(to|from|with|without|for|as|into)\w+/) || // toMetadata, withLogger, forPath
340
+ name.match(/^\w+(To|From|With|Without|For|As|Into)\w*$/); // metadataTo, pathFrom
341
+
342
+ // Common utility names that are descriptive
343
+ const isUtilityName = ['cn', 'proxy', 'sitemap', 'robots', 'gtag'].includes(name);
320
344
 
321
345
  // Count capital letters for compound detection
322
346
  const capitalCount = (name.match(/[A-Z]/g) || []).length;
323
347
  const isCompoundWord = capitalCount >= 3; // daysSinceLastCommit has 4 capitals
324
348
 
325
- const hasActionVerb = name.match(/^(get|set|is|has|can|should|create|update|delete|fetch|load|save|process|handle|validate|check|find|search|filter|map|reduce|make|do|run|start|stop|build|parse|format|render|calculate|compute|generate|transform|convert|normalize|sanitize|encode|decode|compress|extract|merge|split|join|sort|compare|test|verify|ensure|apply|execute|invoke|call|emit|dispatch|trigger|listen|subscribe|unsubscribe|add|remove|clear|reset|toggle|enable|disable|open|close|connect|disconnect|send|receive|read|write|import|export|register|unregister|mount|unmount)/);
349
+ const hasActionVerb = name.match(/^(get|set|is|has|can|should|create|update|delete|fetch|load|save|process|handle|validate|check|find|search|filter|map|reduce|make|do|run|start|stop|build|parse|format|render|calculate|compute|generate|transform|convert|normalize|sanitize|encode|decode|compress|extract|merge|split|join|sort|compare|test|verify|ensure|apply|execute|invoke|call|emit|dispatch|trigger|listen|subscribe|unsubscribe|add|remove|clear|reset|toggle|enable|disable|open|close|connect|disconnect|send|receive|read|write|import|export|register|unregister|mount|unmount|track|store|persist|upsert|derive|classify|combine|discover|activate|require|assert|expect|mask|escape|sign|put|list|complete|page|safe|mock|pick|pluralize|text)/);
326
350
 
327
- if (!hasActionVerb && !isFactoryPattern && !isEventHandler && !isDescriptiveLong && !isDescriptivePattern && !isCompoundWord) {
351
+ if (!hasActionVerb && !isFactoryPattern && !isEventHandler && !isDescriptiveLong && !isDescriptivePattern && !isCompoundWord && !isHelperPattern && !isUtilityName && !isReactHook) {
328
352
  issues.push({
329
353
  file,
330
354
  line: lineNumber,
@@ -1,24 +0,0 @@
1
-
2
- 
3
- > @aiready/consistency@0.3.5 build /Users/pengcao/projects/aiready/packages/consistency
4
- > tsup src/index.ts src/cli.ts --format cjs,esm --dts
5
-
6
- CLI Building entry: src/cli.ts, src/index.ts
7
- CLI Using tsconfig: tsconfig.json
8
- CLI tsup v8.5.1
9
- CLI Target: es2020
10
- CJS Build start
11
- ESM Build start
12
- ESM dist/cli.mjs 8.54 KB
13
- ESM dist/index.mjs 220.00 B
14
- ESM dist/chunk-2BTBNG6X.mjs 21.88 KB
15
- ESM ⚡️ Build success in 70ms
16
- CJS dist/cli.js 32.02 KB
17
- CJS dist/index.js 23.13 KB
18
- CJS ⚡️ Build success in 71ms
19
- DTS Build start
20
- DTS ⚡️ Build success in 683ms
21
- DTS dist/cli.d.ts 20.00 B
22
- DTS dist/index.d.ts 2.60 KB
23
- DTS dist/cli.d.mts 20.00 B
24
- DTS dist/index.d.mts 2.60 KB
@@ -1,81 +0,0 @@
1
-
2
- 
3
- > @aiready/consistency@0.3.5 test /Users/pengcao/projects/aiready/packages/consistency
4
- > vitest run
5
-
6
-
7
-  RUN  v2.1.9 /Users/pengcao/projects/aiready/packages/consistency
8
-
9
- [?25l · should detect minimum severity filtering
10
- · analyzeNaming (8)
11
- · should detect single letter variables
12
- · should NOT flag acceptable abbreviations
13
- · should NOT flag common short English words
14
- · should detect snake_case in TypeScript files
15
- · should detect unclear boolean names
16
- · should allow common abbreviations
17
- · should NOT flag multi-line arrow function parameters (Phase 3)
18
- · should NOT flag short-lived comparison variables (Phase 3)
19
- · analyzePatterns (3)
20
- · should detect mixed error handling
21
- · should detect mixed async patterns
22
- · should detect mixed import styles
23
- · consistency scoring (2)
24
- · should calculate consistency score correctly
25
- · should weight critical issues more than info
26
- · recommendations (3)
27
- · should generate relevant recommendations
28
- · should suggest standardizing error handling
29
- · should suggest using async/await consistently
30
- [?25l ✓ should detect minimum severity filtering
31
- ✓ analyzeNaming (8)
32
- ✓ should detect single letter variables
33
- ✓ should NOT flag acceptable abbreviations
34
- ✓ should NOT flag common short English words
35
- ✓ should detect snake_case in TypeScript files
36
- ✓ should detect unclear boolean names
37
- ✓ should allow common abbreviations
38
- ✓ should NOT flag multi-line arrow function parameters (Phase 3)
39
- ✓ should NOT flag short-lived comparison variables (Phase 3)
40
- ✓ analyzePatterns (3)
41
- ✓ should detect mixed error handling
42
- ✓ should detect mixed async patterns
43
- ✓ should detect mixed import styles
44
- ✓ consistency scoring (2)
45
- ✓ should calculate consistency score correctly
46
- ✓ should weight critical issues more than info
47
- ✓ recommendations (3)
48
- ✓ should generate relevant recommendations
49
- ✓ should suggest standardizing error handling
50
- ✓ should suggest using async/await consistently
51
-  ✓ src/__tests__/analyzer.test.ts (18)
52
- ✓ analyzeConsistency (2)
53
- ✓ should analyze naming issues
54
- ✓ should detect minimum severity filtering
55
- ✓ analyzeNaming (8)
56
- ✓ should detect single letter variables
57
- ✓ should NOT flag acceptable abbreviations
58
- ✓ should NOT flag common short English words
59
- ✓ should detect snake_case in TypeScript files
60
- ✓ should detect unclear boolean names
61
- ✓ should allow common abbreviations
62
- ✓ should NOT flag multi-line arrow function parameters (Phase 3)
63
- ✓ should NOT flag short-lived comparison variables (Phase 3)
64
- ✓ analyzePatterns (3)
65
- ✓ should detect mixed error handling
66
- ✓ should detect mixed async patterns
67
- ✓ should detect mixed import styles
68
- ✓ consistency scoring (2)
69
- ✓ should calculate consistency score correctly
70
- ✓ should weight critical issues more than info
71
- ✓ recommendations (3)
72
- ✓ should generate relevant recommendations
73
- ✓ should suggest standardizing error handling
74
- ✓ should suggest using async/await consistently
75
-
76
-  Test Files  1 passed (1)
77
-  Tests  18 passed (18)
78
-  Start at  18:28:56
79
-  Duration  729ms (transform 144ms, setup 0ms, collect 339ms, tests 28ms, environment 0ms, prepare 61ms)
80
-
81
- [?25h[?25h