@aiready/consistency 0.21.14 → 0.21.16

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
@@ -541,6 +541,42 @@ var ACCEPTABLE_ABBREVIATIONS = /* @__PURE__ */ new Set([
541
541
  ]);
542
542
 
543
543
  // src/analyzers/naming-ast.ts
544
+ var KNOWN_FONT_FAMILIES = /* @__PURE__ */ new Set([
545
+ "Geist_Mono",
546
+ "Geist_Sans",
547
+ "JetBrains_Mono",
548
+ "Fira_Code",
549
+ "Source_Code_Pro",
550
+ "IBM_Plex_Mono",
551
+ "Space_Mono",
552
+ "Roboto_Mono",
553
+ "Ubuntu_Mono",
554
+ "Inconsolata",
555
+ "Cousine",
556
+ "Anonymous_Pro",
557
+ "Arimo",
558
+ "Tinos",
559
+ "Cabin",
560
+ "Cardo",
561
+ "Gentium",
562
+ "Libre_Baskerville",
563
+ "Lora",
564
+ "Merriweather",
565
+ "Noto_Sans",
566
+ "Noto_Serif",
567
+ "Open_Sans",
568
+ "Playfair_Display",
569
+ "PT_Sans",
570
+ "PT_Serif",
571
+ "Raleway",
572
+ "Roboto",
573
+ "Slabo",
574
+ "Source_Sans_Pro",
575
+ "Source_Serif_Pro",
576
+ "Spectral",
577
+ "Titillium_Web",
578
+ "Ubuntu"
579
+ ]);
544
580
  async function analyzeNamingAST(filePaths) {
545
581
  const allIssues = [];
546
582
  for (const filePath of filePaths) {
@@ -607,6 +643,9 @@ function analyzeIdentifiers(ast, filePath, context) {
607
643
  return issues;
608
644
  }
609
645
  function checkNamingConvention(name, convention, node, file, issues, context) {
646
+ if (KNOWN_FONT_FAMILIES.has(name)) {
647
+ return;
648
+ }
610
649
  let isValid = true;
611
650
  if (convention === "PascalCase") {
612
651
  isValid = /^[A-Z][a-zA-Z0-9]*$/.test(name);
@@ -754,6 +793,42 @@ var COMMON_ABBREVIATIONS = /* @__PURE__ */ new Set([
754
793
  "ts",
755
794
  "js"
756
795
  ]);
796
+ var FONT_FAMILIES = /* @__PURE__ */ new Set([
797
+ "Geist_Mono",
798
+ "Geist_Sans",
799
+ "JetBrains_Mono",
800
+ "Fira_Code",
801
+ "Source_Code_Pro",
802
+ "IBM_Plex_Mono",
803
+ "Space_Mono",
804
+ "Roboto_Mono",
805
+ "Ubuntu_Mono",
806
+ "Inconsolata",
807
+ "Cousine",
808
+ "Anonymous_Pro",
809
+ "Arimo",
810
+ "Tinos",
811
+ "Cabin",
812
+ "Cardo",
813
+ "Gentium",
814
+ "Libre_Baskerville",
815
+ "Lora",
816
+ "Merriweather",
817
+ "Noto_Sans",
818
+ "Noto_Serif",
819
+ "Open_Sans",
820
+ "Playfair_Display",
821
+ "PT_Sans",
822
+ "PT_Serif",
823
+ "Raleway",
824
+ "Roboto",
825
+ "Slabo",
826
+ "Source_Sans_Pro",
827
+ "Source_Serif_Pro",
828
+ "Spectral",
829
+ "Titillium_Web",
830
+ "Ubuntu"
831
+ ]);
757
832
  async function analyzeNamingGeneralized(files) {
758
833
  const issues = [];
759
834
  for (const file of files) {
@@ -820,6 +895,7 @@ async function analyzeNamingGeneralized(files) {
820
895
  if (!spec || spec === "*" || spec === "default") continue;
821
896
  if (exceptions.has(spec)) continue;
822
897
  if (COMMON_ABBREVIATIONS.has(spec.toLowerCase())) continue;
898
+ if (FONT_FAMILIES.has(spec)) continue;
823
899
  if (spec.includes(".")) continue;
824
900
  if (!conventions.variablePattern.test(spec) && !conventions.classPattern.test(spec) && (!conventions.constantPattern || !conventions.constantPattern.test(spec)) && (!conventions.typePattern || !conventions.typePattern.test(spec)) && (!conventions.interfacePattern || !conventions.interfacePattern.test(spec)) && !/^[A-Z][A-Z0-9_]*$/.test(spec)) {
825
901
  issues.push({
package/dist/cli.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  analyzeConsistency
4
- } from "./chunk-R2WYI6DR.mjs";
4
+ } from "./chunk-72LXOO4N.mjs";
5
5
 
6
6
  // src/cli.ts
7
7
  import { Command } from "commander";
package/dist/index.js CHANGED
@@ -560,6 +560,42 @@ function detectNamingConventions(files, allIssues) {
560
560
  }
561
561
 
562
562
  // src/analyzers/naming-ast.ts
563
+ var KNOWN_FONT_FAMILIES = /* @__PURE__ */ new Set([
564
+ "Geist_Mono",
565
+ "Geist_Sans",
566
+ "JetBrains_Mono",
567
+ "Fira_Code",
568
+ "Source_Code_Pro",
569
+ "IBM_Plex_Mono",
570
+ "Space_Mono",
571
+ "Roboto_Mono",
572
+ "Ubuntu_Mono",
573
+ "Inconsolata",
574
+ "Cousine",
575
+ "Anonymous_Pro",
576
+ "Arimo",
577
+ "Tinos",
578
+ "Cabin",
579
+ "Cardo",
580
+ "Gentium",
581
+ "Libre_Baskerville",
582
+ "Lora",
583
+ "Merriweather",
584
+ "Noto_Sans",
585
+ "Noto_Serif",
586
+ "Open_Sans",
587
+ "Playfair_Display",
588
+ "PT_Sans",
589
+ "PT_Serif",
590
+ "Raleway",
591
+ "Roboto",
592
+ "Slabo",
593
+ "Source_Sans_Pro",
594
+ "Source_Serif_Pro",
595
+ "Spectral",
596
+ "Titillium_Web",
597
+ "Ubuntu"
598
+ ]);
563
599
  async function analyzeNamingAST(filePaths) {
564
600
  const allIssues = [];
565
601
  for (const filePath of filePaths) {
@@ -626,6 +662,9 @@ function analyzeIdentifiers(ast, filePath, context) {
626
662
  return issues;
627
663
  }
628
664
  function checkNamingConvention(name, convention, node, file, issues, context) {
665
+ if (KNOWN_FONT_FAMILIES.has(name)) {
666
+ return;
667
+ }
629
668
  let isValid = true;
630
669
  if (convention === "PascalCase") {
631
670
  isValid = /^[A-Z][a-zA-Z0-9]*$/.test(name);
@@ -773,6 +812,42 @@ var COMMON_ABBREVIATIONS = /* @__PURE__ */ new Set([
773
812
  "ts",
774
813
  "js"
775
814
  ]);
815
+ var FONT_FAMILIES = /* @__PURE__ */ new Set([
816
+ "Geist_Mono",
817
+ "Geist_Sans",
818
+ "JetBrains_Mono",
819
+ "Fira_Code",
820
+ "Source_Code_Pro",
821
+ "IBM_Plex_Mono",
822
+ "Space_Mono",
823
+ "Roboto_Mono",
824
+ "Ubuntu_Mono",
825
+ "Inconsolata",
826
+ "Cousine",
827
+ "Anonymous_Pro",
828
+ "Arimo",
829
+ "Tinos",
830
+ "Cabin",
831
+ "Cardo",
832
+ "Gentium",
833
+ "Libre_Baskerville",
834
+ "Lora",
835
+ "Merriweather",
836
+ "Noto_Sans",
837
+ "Noto_Serif",
838
+ "Open_Sans",
839
+ "Playfair_Display",
840
+ "PT_Sans",
841
+ "PT_Serif",
842
+ "Raleway",
843
+ "Roboto",
844
+ "Slabo",
845
+ "Source_Sans_Pro",
846
+ "Source_Serif_Pro",
847
+ "Spectral",
848
+ "Titillium_Web",
849
+ "Ubuntu"
850
+ ]);
776
851
  async function analyzeNamingGeneralized(files) {
777
852
  const issues = [];
778
853
  for (const file of files) {
@@ -839,6 +914,7 @@ async function analyzeNamingGeneralized(files) {
839
914
  if (!spec || spec === "*" || spec === "default") continue;
840
915
  if (exceptions.has(spec)) continue;
841
916
  if (COMMON_ABBREVIATIONS.has(spec.toLowerCase())) continue;
917
+ if (FONT_FAMILIES.has(spec)) continue;
842
918
  if (spec.includes(".")) continue;
843
919
  if (!conventions.variablePattern.test(spec) && !conventions.classPattern.test(spec) && (!conventions.constantPattern || !conventions.constantPattern.test(spec)) && (!conventions.typePattern || !conventions.typePattern.test(spec)) && (!conventions.interfacePattern || !conventions.interfacePattern.test(spec)) && !/^[A-Z][A-Z0-9_]*$/.test(spec)) {
844
920
  issues.push({
package/dist/index.mjs CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  analyzePatterns,
7
7
  calculateConsistencyScore,
8
8
  detectNamingConventions
9
- } from "./chunk-R2WYI6DR.mjs";
9
+ } from "./chunk-72LXOO4N.mjs";
10
10
 
11
11
  // src/index.ts
12
12
  import { ToolRegistry } from "@aiready/core";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiready/consistency",
3
- "version": "0.21.14",
3
+ "version": "0.21.16",
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",
@@ -35,15 +35,15 @@
35
35
  "license": "MIT",
36
36
  "repository": {
37
37
  "type": "git",
38
- "url": "https://github.com/caopengau/aiready-consistency.git"
38
+ "url": "https://github.com/getaiready/aiready-consistency.git"
39
39
  },
40
- "homepage": "https://github.com/caopengau/aiready-consistency",
40
+ "homepage": "https://github.com/getaiready/aiready-consistency",
41
41
  "dependencies": {
42
42
  "@typescript-eslint/types": "^8.53.0",
43
43
  "@typescript-eslint/typescript-estree": "^8.53.0",
44
44
  "chalk": "^5.3.0",
45
45
  "commander": "^14.0.0",
46
- "@aiready/core": "0.24.15"
46
+ "@aiready/core": "0.24.19"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@types/node": "^24.0.0",
@@ -62,6 +62,8 @@
62
62
  "clean": "rm -rf dist",
63
63
  "release": "pnpm build && pnpm publish --no-git-checks",
64
64
  "type-check": "tsc --noEmit",
65
- "format-check": "prettier --check . --ignore-path ../../.prettierignore"
65
+ "format-check": "prettier --check . --ignore-path ../../.prettierignore",
66
+ "format": "prettier --write . --ignore-path ../../.prettierignore",
67
+ "lint:fix": "eslint . --fix"
66
68
  }
67
69
  }
@@ -14,6 +14,47 @@ import {
14
14
  } from '../utils/context-detector';
15
15
  import { ACCEPTABLE_ABBREVIATIONS, VAGUE_NAMES } from './naming-constants';
16
16
 
17
+ /**
18
+ * Known font family names that use underscores and should not be flagged
19
+ * as naming convention violations.
20
+ */
21
+ const KNOWN_FONT_FAMILIES = new Set([
22
+ 'Geist_Mono',
23
+ 'Geist_Sans',
24
+ 'JetBrains_Mono',
25
+ 'Fira_Code',
26
+ 'Source_Code_Pro',
27
+ 'IBM_Plex_Mono',
28
+ 'Space_Mono',
29
+ 'Roboto_Mono',
30
+ 'Ubuntu_Mono',
31
+ 'Inconsolata',
32
+ 'Cousine',
33
+ 'Anonymous_Pro',
34
+ 'Arimo',
35
+ 'Tinos',
36
+ 'Cabin',
37
+ 'Cardo',
38
+ 'Gentium',
39
+ 'Libre_Baskerville',
40
+ 'Lora',
41
+ 'Merriweather',
42
+ 'Noto_Sans',
43
+ 'Noto_Serif',
44
+ 'Open_Sans',
45
+ 'Playfair_Display',
46
+ 'PT_Sans',
47
+ 'PT_Serif',
48
+ 'Raleway',
49
+ 'Roboto',
50
+ 'Slabo',
51
+ 'Source_Sans_Pro',
52
+ 'Source_Serif_Pro',
53
+ 'Spectral',
54
+ 'Titillium_Web',
55
+ 'Ubuntu',
56
+ ]);
57
+
17
58
  /**
18
59
  * Advanced naming analyzer using TypeScript AST
19
60
  */
@@ -126,6 +167,11 @@ function checkNamingConvention(
126
167
  issues: NamingIssue[],
127
168
  context: any
128
169
  ) {
170
+ // Skip known font family names (e.g., Geist_Mono, JetBrains_Mono)
171
+ if (KNOWN_FONT_FAMILIES.has(name)) {
172
+ return;
173
+ }
174
+
129
175
  let isValid = true;
130
176
  if (convention === 'PascalCase') {
131
177
  isValid = /^[A-Z][a-zA-Z0-9]*$/.test(name);
@@ -49,6 +49,44 @@ const COMMON_ABBREVIATIONS = new Set([
49
49
  'js',
50
50
  ]);
51
51
 
52
+ // Font families that use underscores (e.g., Geist_Mono, JetBrains_Mono)
53
+ const FONT_FAMILIES = new Set([
54
+ 'Geist_Mono',
55
+ 'Geist_Sans',
56
+ 'JetBrains_Mono',
57
+ 'Fira_Code',
58
+ 'Source_Code_Pro',
59
+ 'IBM_Plex_Mono',
60
+ 'Space_Mono',
61
+ 'Roboto_Mono',
62
+ 'Ubuntu_Mono',
63
+ 'Inconsolata',
64
+ 'Cousine',
65
+ 'Anonymous_Pro',
66
+ 'Arimo',
67
+ 'Tinos',
68
+ 'Cabin',
69
+ 'Cardo',
70
+ 'Gentium',
71
+ 'Libre_Baskerville',
72
+ 'Lora',
73
+ 'Merriweather',
74
+ 'Noto_Sans',
75
+ 'Noto_Serif',
76
+ 'Open_Sans',
77
+ 'Playfair_Display',
78
+ 'PT_Sans',
79
+ 'PT_Serif',
80
+ 'Raleway',
81
+ 'Roboto',
82
+ 'Slabo',
83
+ 'Source_Sans_Pro',
84
+ 'Source_Serif_Pro',
85
+ 'Spectral',
86
+ 'Titillium_Web',
87
+ 'Ubuntu',
88
+ ]);
89
+
52
90
  /**
53
91
  * Analyzes naming conventions using generalized LanguageParser metadata
54
92
  */
@@ -147,6 +185,7 @@ export async function analyzeNamingGeneralized(
147
185
  if (!spec || spec === '*' || spec === 'default') continue;
148
186
  if (exceptions.has(spec)) continue;
149
187
  if (COMMON_ABBREVIATIONS.has(spec.toLowerCase())) continue;
188
+ if (FONT_FAMILIES.has(spec)) continue; // Skip font families (e.g., Geist_Mono)
150
189
  if (spec.includes('.')) continue; // Library imports like urllib.parse (Issue: Library Naming Inconsistency)
151
190
 
152
191
  if (