@archlinter/eslint-plugin 0.11.0-canary.2

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 @@
1
+ {"version":3,"sources":["../src/utils/cache.ts","../src/utils/project-root.ts","../src/utils/smell-filter.ts","../src/utils/rule-factory.ts","../src/rules/no-cycles.ts","../src/rules/no-god-modules.ts","../src/rules/no-dead-code.ts","../src/rules/no-dead-symbols.ts","../src/rules/no-high-coupling.ts","../src/rules/no-barrel-abuse.ts","../src/rules/no-layer-violations.ts","../src/rules/no-sdp-violations.ts","../src/rules/no-hub-modules.ts","../src/rules/no-deep-nesting.ts","../src/rules/no-long-params.ts","../src/rules/no-high-complexity.ts","../src/rules/no-code-clone.ts","../src/rules/no-regression.ts","../src/rules/index.ts","../src/configs/recommended.ts","../src/configs/flat.ts","../src/index.ts"],"sourcesContent":["import { ArchlintAnalyzer, type JsScanResult, type JsSmellWithExplanation } from '@archlinter/core';\nimport { findProjectRoot } from './project-root';\nimport { statSync, readFileSync } from 'node:fs';\nimport * as crypto from 'node:crypto';\nimport xxhashInit from 'xxhash-wasm';\n\nconst { createHash } = crypto;\n\nlet xxhash: { h64: (str: string) => bigint } | null = null;\n\n// Start loading immediately (non-blocking)\nxxhashInit()\n .then((h) => {\n xxhash = h;\n // Clear cache to prevent algorithm mismatch (MD5 vs xxHash)\n diskFileCache.clear();\n })\n .catch(() => {\n /* fallback to MD5 */\n });\n\n// Debug mode - use DEBUG=archlint:* or DEBUG=archlint:cache (standard ESLint pattern)\n// Also supports legacy ARCHLINT_DEBUG=1\nconst DEBUG_PATTERN = process.env.DEBUG || '';\nconst DEBUG =\n process.env.ARCHLINT_DEBUG === '1' ||\n DEBUG_PATTERN.includes('archlint:') ||\n DEBUG_PATTERN === '*';\n\n// Force rescan on every check - set ARCHLINT_FORCE_RESCAN=1 to enable\nconst FORCE_RESCAN = process.env.ARCHLINT_FORCE_RESCAN === '1';\n\n// Disable buffer detection (always treat files as saved) - useful for CI/CLI\nconst NO_BUFFER_CHECK = process.env.ARCHLINT_NO_BUFFER_CHECK === '1';\n\nfunction debug(namespace: string, ...args: unknown[]): void {\n if (DEBUG) {\n const ts = new Date().toISOString().split('T')[1].slice(0, 12);\n // eslint-disable-next-line no-console\n console.error(` ${ts} archlint:${namespace}`, ...args);\n }\n}\n\n/**\n * Compute fast hash of content (for comparison, not security)\n */\nfunction computeHash(content: string): string {\n if (xxhash) {\n return xxhash.h64(content).toString(16);\n }\n\n // Fallback for first 1-2 calls before WASM loads or if it fails\n if (typeof crypto.hash === 'function') {\n return crypto.hash('md5', content, 'hex');\n }\n return createHash('md5').update(content).digest('hex');\n}\n\n// Cache disk content hashes to avoid re-reading files\ninterface DiskFileInfo {\n hash: string;\n mtime: number;\n size: number;\n}\nconst diskFileCache = new Map<string, DiskFileInfo>();\n\n/**\n * Get disk file hash (cached by mtime)\n */\nfunction getDiskFileHash(filePath: string): string | null {\n try {\n const stats = statSync(filePath);\n const mtime = stats.mtimeMs;\n const size = stats.size;\n const cached = diskFileCache.get(filePath);\n\n if (cached && cached.mtime === mtime && cached.size === size) {\n return cached.hash;\n }\n\n const content = readFileSync(filePath, 'utf8');\n const hash = computeHash(content);\n diskFileCache.set(filePath, { hash, mtime, size });\n return hash;\n } catch {\n return null; // file doesn't exist\n }\n}\n\n/**\n * Check if file is unsaved (buffer differs from disk)\n * Virtual files (untitled, stdin) are always considered unsaved\n */\nexport function isUnsavedFile(filename: string, bufferText?: string): boolean {\n if (NO_BUFFER_CHECK) {\n return false; // Disabled - treat all files as saved\n }\n\n // Virtual file patterns used by IDEs\n if (isVirtualFile(filename)) {\n debug('cache', 'Virtual file detected:', filename);\n return true;\n }\n\n // No buffer text provided - assume saved\n if (!bufferText) {\n return false;\n }\n\n const diskHash = getDiskFileHash(filename);\n if (diskHash === null) {\n // File doesn't exist on disk (new file)\n debug('cache', 'New file (not on disk):', filename);\n return true;\n }\n\n // FAST PATH: Check size first.\n // diskFileCache was just populated by getDiskFileHash\n const cached = diskFileCache.get(filename);\n if (cached && Buffer.byteLength(bufferText, 'utf8') !== cached.size) {\n debug('cache', 'Size mismatch detected:', filename);\n return true;\n }\n\n const bufferHash = computeHash(bufferText);\n const isUnsaved = bufferHash !== diskHash;\n\n if (isUnsaved) {\n debug('cache', 'Unsaved file detected (hash mismatch):', filename);\n }\n\n return isUnsaved;\n}\n\n/**\n * Check if file is virtual (no real path on disk)\n */\nexport function isVirtualFile(filename: string): boolean {\n return (\n filename === '<input>' ||\n filename === '<text>' ||\n filename.startsWith('untitled:') ||\n filename.includes('stdin')\n );\n}\n\nexport enum AnalysisState {\n NotStarted = 'not_started',\n InProgress = 'in_progress',\n Ready = 'ready',\n Error = 'error',\n}\n\ninterface ProjectState {\n analyzer: ArchlintAnalyzer;\n result: JsScanResult | null;\n state: AnalysisState;\n lastScanTime: number;\n fileMtimes: Map<string, number>; // Track file modification times\n}\n\n// Global analyzers and results map\nconst projectStates = new Map<string, ProjectState>();\n\n/**\n * Get file mtime in ms\n */\nfunction getFileMtime(filePath: string): number {\n try {\n return statSync(filePath).mtimeMs;\n } catch {\n return 0;\n }\n}\n\nexport interface AnalysisOptions {\n projectRoot?: string;\n bufferText?: string;\n}\n\n/**\n * Initialize analyzer and perform initial scan\n */\nfunction initializeProjectState(\n projectRoot: string,\n filePath: string,\n currentMtime: number\n): ProjectState {\n debug('cache', 'First scan for project:', projectRoot);\n const analyzer = new ArchlintAnalyzer(projectRoot, { cache: true, git: false });\n const state: ProjectState = {\n analyzer,\n result: null,\n state: AnalysisState.InProgress,\n lastScanTime: 0,\n fileMtimes: new Map(),\n };\n projectStates.set(projectRoot, state);\n\n try {\n const start = Date.now();\n state.result = analyzer.scanSync();\n state.state = AnalysisState.Ready;\n state.lastScanTime = Date.now();\n state.fileMtimes.set(filePath, currentMtime);\n debug('cache', 'Initial scan complete', {\n duration: Date.now() - start,\n smellCount: state.result?.smells?.length,\n });\n } catch (error: unknown) {\n state.state = AnalysisState.Error;\n // eslint-disable-next-line no-console\n console.error('[archlint] Analysis failed:', error instanceof Error ? error.message : error);\n }\n\n return state;\n}\n\n/**\n * Perform incremental rescan for changed file\n */\nfunction performRescan(state: ProjectState, filePath: string): void {\n debug('cache', 'Triggering rescan', { filePath });\n try {\n state.analyzer.invalidate([filePath]);\n const start = Date.now();\n state.result = state.analyzer.rescanSync();\n state.lastScanTime = Date.now();\n debug('cache', 'Rescan complete', {\n duration: Date.now() - start,\n smellCount: state.result?.smells?.length,\n });\n } catch (error: unknown) {\n debug('cache', 'Rescan error', error instanceof Error ? error.message : error);\n }\n}\n\n/**\n * Check if file needs rescan based on modification time\n */\nfunction shouldRescanFile(state: ProjectState, filePath: string, currentMtime: number): boolean {\n const lastMtime = state.fileMtimes.get(filePath);\n const fileChanged = lastMtime !== undefined && currentMtime > lastMtime;\n const isNewFile = lastMtime === undefined;\n return fileChanged || (FORCE_RESCAN && isNewFile);\n}\n\n/**\n * Handle file change tracking and rescan logic\n */\nfunction handleFileChange(state: ProjectState, filePath: string, currentMtime: number): void {\n const lastMtime = state.fileMtimes.get(filePath);\n const fileChanged = lastMtime !== undefined && currentMtime > lastMtime;\n\n const needsRescan = shouldRescanFile(state, filePath, currentMtime);\n state.fileMtimes.set(filePath, currentMtime);\n\n if (needsRescan && state.state === AnalysisState.Ready) {\n performRescan(state, filePath);\n } else {\n debug('cache', 'Using cached', {\n file: filePath.split('/').pop(),\n lastMtime: lastMtime ?? 'new',\n fileChanged,\n });\n }\n}\n\n/**\n * Check if analysis is ready for the project.\n * If not ready, performs synchronous analysis (blocks until complete).\n * If file changed since last scan (and is saved), triggers incremental rescan.\n *\n * For unsaved files (buffer differs from disk), returns cached results without rescan.\n * This prevents stale project graph from IDE buffers.\n */\nexport function isAnalysisReady(filePath: string, options?: AnalysisOptions): AnalysisState {\n const { projectRoot: projectRootOverride, bufferText } = options ?? {};\n const projectRoot = projectRootOverride ?? findProjectRoot(filePath);\n let state = projectStates.get(projectRoot);\n const currentMtime = getFileMtime(filePath);\n const unsaved = isUnsavedFile(filePath, bufferText);\n\n debug('cache', 'isAnalysisReady', {\n filePath,\n projectRoot,\n currentMtime,\n hasState: !!state,\n unsaved,\n });\n\n if (!state) {\n state = initializeProjectState(projectRoot, filePath, currentMtime);\n return state.state;\n }\n\n if (unsaved) {\n debug('cache', 'Unsaved file - using cached results', { file: filePath.split('/').pop() });\n return state.state;\n }\n\n handleFileChange(state, filePath, currentMtime);\n return state.state;\n}\n\n/**\n * Notify that a file has changed - triggers re-scan on next check\n * @public API function for external use\n */\nexport function notifyFileChanged(filePath: string, projectRootOverride?: string): void {\n const projectRoot = projectRootOverride ?? findProjectRoot(filePath);\n const state = projectStates.get(projectRoot);\n if (state && state.state === AnalysisState.Ready) {\n // Mark for re-scan by resetting state\n // Next isAnalysisReady call will trigger incremental scan\n try {\n state.result = state.analyzer.rescanSync();\n state.lastScanTime = Date.now();\n } catch {\n // Ignore rescan errors, keep old results\n }\n }\n}\n\n/**\n * Get analysis result\n */\nexport function getAnalysis(filePath: string, projectRootOverride?: string): JsScanResult | null {\n const projectRoot = projectRootOverride ?? findProjectRoot(filePath);\n const state = projectStates.get(projectRoot);\n\n if (!state || state.state !== AnalysisState.Ready) {\n return null;\n }\n\n return state.result;\n}\n\n/**\n * Analyze file with overlay content (for unsaved IDE buffers)\n * Does NOT affect the cache - results are temporary\n */\nexport function analyzeWithOverlay(\n filePath: string,\n content: string,\n projectRootOverride?: string\n): JsSmellWithExplanation[] {\n const projectRoot = projectRootOverride ?? findProjectRoot(filePath);\n const state = projectStates.get(projectRoot);\n\n if (!state || state.state !== AnalysisState.Ready) {\n debug('overlay', 'Analysis not ready, skipping overlay analysis');\n return [];\n }\n\n try {\n const start = Date.now();\n // Call new NAPI method\n const result = state.analyzer.scanIncrementalWithOverlaySync([filePath], {\n [filePath]: content,\n });\n\n debug('overlay', 'Overlay analysis complete', {\n file: filePath.split('/').pop(),\n duration: Date.now() - start,\n smellCount: result.smells.length,\n });\n\n return result.smells;\n } catch (error: unknown) {\n debug('overlay', 'Overlay analysis failed', error instanceof Error ? error.message : error);\n return [];\n }\n}\n\n/**\n * Convert snake_case detectorId to match PascalCase smellType\n * e.g. \"dead_code\" matches \"DeadCode\" or \"DeadSymbol\"\n */\nfunction matchesSmellType(smellType: string, detectorId: string): boolean {\n // Convert snake_case to words: \"dead_code\" -> [\"dead\", \"code\"]\n const words = detectorId.toLowerCase().split('_');\n // smellType is like \"DeadCode\" or \"DeadSymbol { ... }\" - extract base type\n const baseType = smellType.split(/[\\s{]/)[0].toLowerCase();\n\n // Check if all words appear in the smell type\n // \"dead\" + \"code\" should match \"deadcode\" or \"deadsymbol\" (for dead_code -> DeadSymbol)\n // Special cases for detector -> smellType mapping\n const mappings: Record<string, string[]> = {\n dead_code: ['deadcode'],\n dead_symbols: ['deadsymbol'],\n cycles: ['cyclicdependency', 'cyclicdependencycluster'],\n high_coupling: ['highcoupling'],\n high_complexity: ['highcomplexity'],\n long_params: ['longparameterlist'],\n deep_nesting: ['deepnesting'],\n god_module: ['godmodule'],\n barrel_file_abuse: ['barrelfileabuse'],\n layer_violation: ['layerviolation'],\n sdp_violation: ['sdpviolation'],\n hub_module: ['hubmodule'],\n };\n\n const patterns = mappings[detectorId] || [words.join('')];\n return patterns.some((p) => baseType.includes(p));\n}\n\n/**\n * Get smells for specific file and detector\n * If bufferText provided and differs from disk, uses overlay analysis\n */\nexport function getSmellsForFile(\n filePath: string,\n detectorId: string,\n projectRootOverride?: string,\n bufferText?: string\n): JsSmellWithExplanation[] {\n const projectRoot = projectRootOverride ?? findProjectRoot(filePath);\n\n // Check if we need overlay analysis\n if (bufferText && isUnsavedFile(filePath, bufferText)) {\n debug('smell', 'Using overlay analysis for unsaved file', filePath.split('/').pop());\n const allSmells = analyzeWithOverlay(filePath, bufferText, projectRoot);\n return filterSmellsByDetector(allSmells, filePath, detectorId);\n }\n\n // Normal analysis (from cache)\n const result = getAnalysis(filePath, projectRoot);\n if (!result) {\n debug('smell', 'no result for', filePath);\n return [];\n }\n\n return filterSmellsByDetector(result.smells, filePath, detectorId);\n}\n\n/**\n * Filter smells by detector and file path\n */\nfunction filterSmellsByDetector(\n smells: JsSmellWithExplanation[],\n filePath: string,\n detectorId: string\n): JsSmellWithExplanation[] {\n const normalizedPath = filePath.replaceAll('\\\\', '/');\n\n const filtered = smells.filter((s) => {\n // Filter by detector\n if (!matchesSmellType(s.smell.smellType, detectorId)) {\n return false;\n }\n // Filter by file\n return s.smell.files.some((f) => f.replaceAll('\\\\', '/') === normalizedPath);\n });\n\n if (filtered.length > 0) {\n debug('smell', `${detectorId}: ${filtered.length} smells for`, filePath.split('/').pop());\n }\n return filtered;\n}\n\n/**\n * Clear all caches\n * Used in tests\n */\nexport function clearAllCaches(): void {\n projectStates.clear();\n diskFileCache.clear();\n}\n","import { existsSync } from 'node:fs';\nimport { dirname, join } from 'node:path';\n\n// Markers in priority order\nconst PROJECT_ROOT_MARKERS = [\n '.archlint.yaml', // Explicit archlint config\n '.archlint.yml',\n 'pnpm-workspace.yaml', // pnpm monorepo\n 'lerna.json', // Lerna monorepo\n 'nx.json', // Nx monorepo\n 'rush.json', // Rush monorepo\n '.git', // Git root (fallback)\n];\n\n// Cache for performance\nconst rootCache = new Map<string, string>();\n\n/**\n * Find project root for monorepo analysis\n * Returns the topmost project root (monorepo root)\n */\nexport function findProjectRoot(filePath: string): string {\n // Check cache first\n const cached = rootCache.get(filePath);\n if (cached) return cached;\n\n let dir = dirname(filePath);\n let foundRoot: string | null = null;\n\n while (true) {\n for (const marker of PROJECT_ROOT_MARKERS) {\n if (existsSync(join(dir, marker))) {\n foundRoot = dir;\n // Don't break - keep looking for higher root (monorepo)\n break;\n }\n }\n const parent = dirname(dir);\n if (parent === dir) break; // Reached filesystem root\n dir = parent;\n }\n\n const result = foundRoot ?? process.cwd();\n rootCache.set(filePath, result);\n return result;\n}\n","import { relative } from 'node:path';\nimport type { JsSmellWithExplanation } from '@archlinter/core';\n\nexport type SmellLocationStrategy =\n | 'all-files' // Report in all files mentioned\n | 'primary-file' // Report only in first/primary file\n | 'critical-edges' // Report at critical edges (for cycles)\n | 'source-file'; // Report in source file (for layer violations)\n\nexport interface FileSmellLocation {\n line: number;\n column?: number;\n endLine?: number;\n endColumn?: number;\n messageId: string;\n data?: Record<string, unknown>;\n}\n\nexport function getSmellLocationsForFile(\n smell: JsSmellWithExplanation,\n filePath: string,\n strategy: SmellLocationStrategy,\n projectRoot: string\n): FileSmellLocation[] {\n const normalized = filePath.replaceAll('\\\\', '/');\n\n switch (strategy) {\n case 'critical-edges':\n return getCriticalEdgeLocations(smell, normalized, projectRoot);\n case 'primary-file':\n return getPrimaryFileLocation(smell, normalized);\n case 'source-file':\n return getSourceFileLocation(smell, normalized);\n case 'all-files':\n default:\n return getAllFileLocations(smell, normalized);\n }\n}\n\nfunction getCriticalEdgeLocations(\n smell: JsSmellWithExplanation,\n filePath: string,\n projectRoot: string\n): FileSmellLocation[] {\n const cluster = smell.smell.cluster;\n if (!cluster?.criticalEdges) return [];\n\n return cluster.criticalEdges\n .filter((edge) => edge.from.replaceAll('\\\\', '/') === filePath)\n .map((edge) => ({\n line: edge.line,\n column: edge.range?.startColumn ?? 0,\n endLine: edge.range?.endLine,\n endColumn: edge.range?.endColumn,\n messageId: 'cycle',\n data: {\n target: relative(projectRoot, edge.to),\n impact: edge.impact,\n },\n }));\n}\n\nfunction createLocationFromSmell(\n loc:\n | { line?: number; column?: number; range?: { endLine?: number; endColumn?: number } }\n | undefined,\n reason: string\n): FileSmellLocation {\n return {\n line: loc?.line ?? 1,\n column: loc?.column ?? 0,\n endLine: loc?.range?.endLine,\n endColumn: loc?.range?.endColumn,\n messageId: 'smell',\n data: { reason },\n };\n}\n\nfunction getPrimaryFileLocation(\n smell: JsSmellWithExplanation,\n filePath: string\n): FileSmellLocation[] {\n const firstFile = smell.smell.files[0];\n if (!firstFile) return [];\n\n const normalizedFirstFile = firstFile.replaceAll('\\\\', '/');\n const normalizedPath = filePath.replaceAll('\\\\', '/');\n if (normalizedFirstFile !== normalizedPath) return [];\n\n const loc = smell.smell.locations[0];\n return [createLocationFromSmell(loc, smell.explanation.reason)];\n}\n\nfunction getSourceFileLocation(\n smell: JsSmellWithExplanation,\n filePath: string\n): FileSmellLocation[] {\n // Layer violation reports in the file that makes the illegal import\n const sourceLoc = smell.smell.locations.find((l) => l.file.replaceAll('\\\\', '/') === filePath);\n if (!sourceLoc) return [];\n\n return [\n {\n line: sourceLoc.line,\n column: sourceLoc.column ?? 0,\n endLine: sourceLoc.range?.endLine,\n endColumn: sourceLoc.range?.endColumn,\n messageId: 'violation',\n data: { reason: smell.explanation.reason },\n },\n ];\n}\n\nfunction getAllFileLocations(smell: JsSmellWithExplanation, filePath: string): FileSmellLocation[] {\n return smell.smell.locations\n .filter((l) => l.file.replaceAll('\\\\', '/') === filePath)\n .map((l) => ({\n line: l.line,\n column: l.column ?? 0,\n endLine: l.range?.endLine,\n endColumn: l.range?.endColumn,\n messageId: 'smell',\n data: { reason: l.description || smell.explanation.reason },\n }));\n}\n","import type { Rule } from 'eslint';\nimport type { JsSmellWithExplanation } from '@archlinter/core';\nimport { getSmellsForFile, isAnalysisReady, AnalysisState, isVirtualFile } from '../utils/cache';\nimport { getSmellLocationsForFile, type SmellLocationStrategy } from '../utils/smell-filter';\nimport { findProjectRoot } from '../utils/project-root';\n\nexport interface RuleOptions {\n detectorId: string;\n messageId: string;\n description: string;\n category: string;\n recommended: boolean;\n strategy: SmellLocationStrategy;\n messages: Record<string, string>;\n}\n\nfunction createRuleMeta(options: RuleOptions): Rule.RuleModule['meta'] {\n return {\n type: 'problem',\n docs: {\n description: options.description,\n category: options.category,\n recommended: options.recommended,\n url: `https://archlinter.dev/rules/${options.detectorId.replaceAll('_', '-')}`,\n },\n schema: [\n {\n type: 'object',\n properties: {\n projectRoot: {\n type: 'string',\n description: 'Override project root detection',\n },\n },\n additionalProperties: false,\n },\n ],\n messages: {\n analyzing: 'archlint: analyzing project architecture...',\n ...options.messages,\n },\n };\n}\n\ninterface ReportLocation {\n start: { line: number; column: number };\n end?: { line: number; column: number };\n}\n\nfunction reportSmellLocations(\n context: Readonly<Rule.RuleContext>,\n smell: JsSmellWithExplanation,\n filename: string,\n strategy: SmellLocationStrategy,\n projectRoot: string\n): void {\n const locations = getSmellLocationsForFile(smell, filename, strategy, projectRoot);\n\n for (const loc of locations) {\n const reportLoc: ReportLocation = {\n start: { line: loc.line, column: Math.max(0, (loc.column ?? 1) - 1) },\n };\n\n if (loc.endLine !== undefined && loc.endColumn !== undefined) {\n reportLoc.end = { line: loc.endLine, column: Math.max(0, loc.endColumn - 1) };\n }\n\n context.report({\n loc: reportLoc as any,\n messageId: loc.messageId,\n data: loc.data,\n });\n }\n}\n\ninterface RuleOptionsConfig {\n projectRoot?: string;\n}\n\nexport function createArchlintRule(options: RuleOptions): Rule.RuleModule {\n return {\n meta: createRuleMeta(options),\n create(context: Readonly<Rule.RuleContext>) {\n const filename = context.filename;\n const ruleOptions = (context.options[0] ?? {}) as RuleOptionsConfig;\n const projectRoot = ruleOptions.projectRoot ?? findProjectRoot(filename);\n const sourceCode = context.sourceCode;\n const bufferText = sourceCode.text;\n\n return {\n Program(node) {\n if (isVirtualFile(filename)) {\n return;\n }\n\n const state = isAnalysisReady(filename, {\n projectRoot: ruleOptions.projectRoot,\n bufferText,\n });\n\n if (state === AnalysisState.NotStarted) {\n context.report({ node, messageId: 'analyzing' });\n return;\n }\n\n if (state === AnalysisState.InProgress) {\n return;\n }\n\n const smells = getSmellsForFile(\n filename,\n options.detectorId,\n ruleOptions.projectRoot,\n bufferText\n );\n\n for (const smell of smells) {\n reportSmellLocations(context, smell, filename, options.strategy, projectRoot);\n }\n },\n };\n },\n };\n}\n","import { createArchlintRule } from '../utils/rule-factory';\n\nexport const noCycles = createArchlintRule({\n detectorId: 'cycles',\n messageId: 'cycle',\n description: 'Disallow cyclic dependencies between files',\n category: 'Architecture',\n recommended: true,\n strategy: 'critical-edges',\n messages: {\n cycle: \"Cyclic import to '{{target}}' ({{impact}} impact)\",\n cycleCluster: 'File is part of cyclic dependency cluster ({{size}} files)',\n },\n});\n","import { createArchlintRule } from '../utils/rule-factory';\n\nexport const noGodModules = createArchlintRule({\n detectorId: 'god_module',\n messageId: 'smell',\n description: 'Disallow overly large and complex modules (God Modules)',\n category: 'Architecture',\n recommended: true,\n strategy: 'primary-file',\n messages: {\n smell: 'God Module detected: {{reason}}',\n },\n});\n","import { createArchlintRule } from '../utils/rule-factory';\n\nexport const noDeadCode = createArchlintRule({\n detectorId: 'dead_code',\n messageId: 'smell',\n description: 'Disallow dead code and unused exports',\n category: 'Architecture',\n recommended: true,\n strategy: 'primary-file',\n messages: {\n smell: 'Dead code detected: {{reason}}',\n },\n});\n","import { createArchlintRule } from '../utils/rule-factory';\n\nexport const noDeadSymbols = createArchlintRule({\n detectorId: 'dead_symbols',\n messageId: 'smell',\n description: 'Disallow unused functions, classes, and variables',\n category: 'Architecture',\n recommended: true,\n strategy: 'all-files',\n messages: {\n smell: 'Unused symbol detected: {{reason}}',\n },\n});\n","import { createArchlintRule } from '../utils/rule-factory';\n\nexport const noHighCoupling = createArchlintRule({\n detectorId: 'high_coupling',\n messageId: 'smell',\n description: 'Disallow modules with excessively high coupling',\n category: 'Architecture',\n recommended: true,\n strategy: 'primary-file',\n messages: {\n smell: 'High coupling detected: {{reason}}',\n },\n});\n","import { createArchlintRule } from '../utils/rule-factory';\n\nexport const noBarrelAbuse = createArchlintRule({\n detectorId: 'barrel_file_abuse',\n messageId: 'smell',\n description: 'Disallow abuse of barrel files',\n category: 'Architecture',\n recommended: false,\n strategy: 'primary-file',\n messages: {\n smell: 'Barrel file abuse: {{reason}}',\n },\n});\n","import { createArchlintRule } from '../utils/rule-factory';\n\nexport const noLayerViolations = createArchlintRule({\n detectorId: 'layer_violation',\n messageId: 'violation',\n description: 'Disallow violations of defined architecture layers',\n category: 'Architecture',\n recommended: true,\n strategy: 'source-file',\n messages: {\n violation: 'Layer violation: {{reason}}',\n },\n});\n","import { createArchlintRule } from '../utils/rule-factory';\n\nexport const noSdpViolations = createArchlintRule({\n detectorId: 'sdp_violation',\n messageId: 'smell',\n description: 'Disallow violations of the Stable Dependencies Principle',\n category: 'Architecture',\n recommended: false,\n strategy: 'primary-file',\n messages: {\n smell: 'SDP violation: {{reason}}',\n },\n});\n","import { createArchlintRule } from '../utils/rule-factory';\n\nexport const noHubModules = createArchlintRule({\n detectorId: 'hub_module',\n messageId: 'smell',\n description: 'Disallow modules that act as too many dependencies',\n category: 'Architecture',\n recommended: false,\n strategy: 'primary-file',\n messages: {\n smell: 'Hub module detected: {{reason}}',\n },\n});\n","import { createArchlintRule } from '../utils/rule-factory';\n\nexport const noDeepNesting = createArchlintRule({\n detectorId: 'deep_nesting',\n messageId: 'smell',\n description: 'Disallow excessively deep directory nesting',\n category: 'Architecture',\n recommended: false,\n strategy: 'all-files',\n messages: {\n smell: 'Deep nesting: {{reason}}',\n },\n});\n","import { createArchlintRule } from '../utils/rule-factory';\n\nexport const noLongParams = createArchlintRule({\n detectorId: 'long_params',\n messageId: 'smell',\n description: 'Disallow functions with too many parameters',\n category: 'Architecture',\n recommended: false,\n strategy: 'all-files',\n messages: {\n smell: 'Too many parameters: {{reason}}',\n },\n});\n","import { createArchlintRule } from '../utils/rule-factory';\n\nexport const noHighComplexity = createArchlintRule({\n detectorId: 'high_complexity',\n messageId: 'smell',\n description: 'Disallow functions with high cyclomatic complexity',\n category: 'Code Quality',\n recommended: true,\n strategy: 'all-files',\n messages: {\n smell: 'High complexity detected: {{reason}}',\n },\n});\n","import { createArchlintRule } from '../utils/rule-factory';\n\nexport const noCodeClone = createArchlintRule({\n detectorId: 'code_clone',\n messageId: 'smell',\n description: 'Disallow duplicated code blocks (code clones)',\n category: 'Code Quality',\n recommended: true,\n strategy: 'all-files',\n messages: {\n smell: 'Code clone detected: {{reason}}',\n },\n});\n","import type { Rule } from 'eslint';\nimport { findProjectRoot } from '../utils/project-root';\nimport { runDiff, type JsDiffResult } from '@archlinter/core';\nimport * as fs from 'node:fs';\nimport * as path from 'node:path';\n\n// Cache to run diff only once per project\nconst diffCache = new Map<string, JsDiffResult>();\nconst firstFiles = new Set<string>();\n\n// Simple run stamp to clear cache per ESLint run (for watch mode)\nlet lastRunStamp = 0;\n\ninterface RuleOptions {\n baseline?: string;\n failOn?: 'low' | 'medium' | 'high' | 'critical';\n}\n\nexport const noRegression: Rule.RuleModule = {\n meta: {\n type: 'problem',\n docs: {\n description: 'Detect architectural regressions compared to baseline',\n recommended: false,\n },\n messages: {\n regression: '{{message}}',\n noBaseline: 'Baseline snapshot not found at {{path}}. Run: archlint snapshot -o {{path}}',\n },\n schema: [\n {\n type: 'object',\n properties: {\n baseline: {\n type: 'string',\n description: 'Path to baseline snapshot',\n },\n failOn: {\n type: 'string',\n enum: ['low', 'medium', 'high', 'critical'],\n description: 'Minimum severity to report',\n },\n },\n additionalProperties: false,\n },\n ],\n },\n\n create(context) {\n // Clear cache if this is a new run (e.g. in watch mode)\n const currentRunStamp = Date.now();\n if (currentRunStamp - lastRunStamp > 5000) {\n diffCache.clear();\n firstFiles.clear();\n }\n lastRunStamp = currentRunStamp;\n\n const { baseline, failOn } = getOptions(context);\n const projectRoot = findProjectRoot(context.filename);\n\n if (!ensureDiffResult(context, projectRoot, baseline!)) {\n return {};\n }\n\n return reportFromCache(context, projectRoot, failOn!);\n },\n};\n\nfunction getOptions(context: Rule.RuleContext): RuleOptions {\n const options: RuleOptions = context.options[0] ?? {};\n return {\n baseline: options.baseline ?? '.archlint-snapshot.json',\n failOn: options.failOn ?? 'low',\n };\n}\n\nfunction ensureDiffResult(\n context: Rule.RuleContext,\n projectRoot: string,\n baselinePath: string\n): boolean {\n if (diffCache.has(projectRoot)) {\n return true;\n }\n\n const absoluteBaseline = path.resolve(projectRoot, baselinePath);\n if (!fs.existsSync(absoluteBaseline)) {\n if (isFirstFile(context, projectRoot)) {\n context.report({\n loc: { line: 1, column: 0 },\n messageId: 'noBaseline',\n data: { path: baselinePath },\n });\n }\n return false;\n }\n\n try {\n const result = runDiff({\n baselinePath: absoluteBaseline,\n projectPath: projectRoot,\n });\n diffCache.set(projectRoot, result);\n return true;\n } catch (error: unknown) {\n if (isFirstFile(context, projectRoot)) {\n context.report({\n loc: { line: 1, column: 0 },\n messageId: 'regression',\n data: { message: `Diff failed: ${error instanceof Error ? error.message : String(error)}` },\n });\n }\n return false;\n }\n}\n\nconst SEVERITY_ORDER: Record<string, number> = { low: 0, medium: 1, high: 2, critical: 3 };\n\nfunction getRegressionsToReport(result: JsDiffResult, failOn: string): JsDiffResult['regressions'] {\n const minSev = SEVERITY_ORDER[failOn] ?? 0;\n\n return result.regressions.filter((r) => {\n const sev = r.smell.severity.toLowerCase();\n return (SEVERITY_ORDER[sev] ?? 0) >= minSev;\n });\n}\n\nfunction reportFromCache(\n context: Rule.RuleContext,\n projectRoot: string,\n failOn: string\n): Rule.RuleListener {\n const result = diffCache.get(projectRoot);\n if (!result?.hasRegressions) {\n return {};\n }\n\n const regressions = getRegressionsToReport(result, failOn);\n if (regressions.length === 0) {\n return {};\n }\n\n return createVisitor(context, projectRoot, regressions);\n}\n\nfunction createVisitor(\n context: Rule.RuleContext,\n projectRoot: string,\n regressions: JsDiffResult['regressions']\n): Rule.RuleListener {\n const filename = path.relative(projectRoot, context.filename);\n const isFirst = isFirstFile(context, projectRoot);\n\n return {\n Program(node) {\n for (const reg of regressions) {\n if (shouldReportRegression(reg, filename, isFirst)) {\n context.report({\n node,\n messageId: 'regression',\n data: { message: formatRegressionMessage(reg) },\n });\n }\n }\n },\n };\n}\n\nfunction shouldReportRegression(\n reg: JsDiffResult['regressions'][0],\n filename: string,\n isFirst: boolean\n): boolean {\n if (isFirst) {\n return true;\n }\n const files = reg.smell?.files;\n if (!files || !Array.isArray(files)) {\n return false;\n }\n return files.some((f) => f === filename || filename.endsWith(f));\n}\n\nfunction formatRegressionMessage(reg: JsDiffResult['regressions'][0]): string {\n const smell = reg.smell;\n const smellType = smell.smellType;\n const files = smell.files.slice(0, 3).join(', ');\n\n switch (reg.regressionType.type) {\n case 'NewSmell':\n return `New architectural smell: ${smellType} in ${files}`;\n case 'SeverityIncrease':\n return formatSeverityIncreaseMessage(reg.regressionType, smellType);\n case 'MetricWorsening':\n return formatMetricWorseningMessage(reg.regressionType, smellType);\n default:\n return String(reg.message);\n }\n}\n\nfunction formatSeverityIncreaseMessage(\n regType: JsDiffResult['regressions'][0]['regressionType'],\n smellType: string\n): string {\n return `Architectural smell ${smellType} worsened: severity increased from ${regType.from} to ${regType.to}`;\n}\n\nfunction formatMetricWorseningMessage(\n regType: JsDiffResult['regressions'][0]['regressionType'],\n smellType: string\n): string {\n const { metric, from, to, changePercent } = regType;\n return `Architectural metric worsened: ${smellType} ${metric} ${from} → ${to} (+${(changePercent ?? 0).toFixed(0)}%)`;\n}\n\nfunction isFirstFile(context: Rule.RuleContext, projectRoot: string): boolean {\n if (!firstFiles.has(projectRoot)) {\n firstFiles.add(projectRoot);\n return true;\n }\n return false;\n}\n\nexport default noRegression;\n","import type { Rule } from 'eslint';\nimport { noCycles } from './no-cycles';\nimport { noGodModules } from './no-god-modules';\nimport { noDeadCode } from './no-dead-code';\nimport { noDeadSymbols } from './no-dead-symbols';\nimport { noHighCoupling } from './no-high-coupling';\nimport { noBarrelAbuse } from './no-barrel-abuse';\nimport { noLayerViolations } from './no-layer-violations';\nimport { noSdpViolations } from './no-sdp-violations';\nimport { noHubModules } from './no-hub-modules';\nimport { noDeepNesting } from './no-deep-nesting';\nimport { noLongParams } from './no-long-params';\nimport { noHighComplexity } from './no-high-complexity';\nimport { noCodeClone } from './no-code-clone';\nimport { noRegression } from './no-regression';\n\nexport const rules: Record<string, Rule.RuleModule> = {\n 'no-cycles': noCycles,\n 'no-god-modules': noGodModules,\n 'no-dead-code': noDeadCode,\n 'no-dead-symbols': noDeadSymbols,\n 'no-high-coupling': noHighCoupling,\n 'no-barrel-abuse': noBarrelAbuse,\n 'no-layer-violations': noLayerViolations,\n 'no-sdp-violations': noSdpViolations,\n 'no-hub-modules': noHubModules,\n 'no-deep-nesting': noDeepNesting,\n 'no-long-params': noLongParams,\n 'no-high-complexity': noHighComplexity,\n 'no-code-clone': noCodeClone,\n 'no-regression': noRegression,\n};\n","// Legacy configs (ESLint < 9) - uses eslintrc format, not typed by ESLint 9\nexport const recommended = {\n plugins: ['@archlinter'],\n rules: {\n '@archlinter/no-cycles': 'error',\n '@archlinter/no-god-modules': 'warn',\n '@archlinter/no-dead-code': 'warn',\n '@archlinter/no-dead-symbols': 'warn',\n '@archlinter/no-high-coupling': 'warn',\n '@archlinter/no-high-complexity': 'error',\n '@archlinter/no-layer-violations': 'error',\n '@archlinter/no-code-clone': 'warn',\n },\n} as const;\n\nexport const strict = {\n plugins: ['@archlinter'],\n rules: {\n '@archlinter/no-cycles': 'error',\n '@archlinter/no-god-modules': 'error',\n '@archlinter/no-dead-code': 'error',\n '@archlinter/no-dead-symbols': 'error',\n '@archlinter/no-high-coupling': 'error',\n '@archlinter/no-high-complexity': 'error',\n '@archlinter/no-barrel-abuse': 'error',\n '@archlinter/no-layer-violations': 'error',\n '@archlinter/no-sdp-violations': 'error',\n '@archlinter/no-hub-modules': 'warn',\n '@archlinter/no-deep-nesting': 'error',\n '@archlinter/no-long-params': 'warn',\n '@archlinter/no-code-clone': 'error',\n '@archlinter/no-regression': ['error', { failOn: 'medium' }],\n },\n} as const;\n","import type { Linter, ESLint } from 'eslint';\nimport { rules } from '../rules';\n\nexport const flatRecommended: Linter.Config = {\n plugins: {\n '@archlinter': { rules } as ESLint.Plugin,\n },\n rules: {\n '@archlinter/no-cycles': 'error',\n '@archlinter/no-god-modules': 'warn',\n '@archlinter/no-dead-code': 'warn',\n '@archlinter/no-dead-symbols': 'warn',\n '@archlinter/no-high-coupling': 'warn',\n '@archlinter/no-high-complexity': 'error',\n '@archlinter/no-layer-violations': 'error',\n '@archlinter/no-code-clone': 'warn',\n },\n};\n\nexport const flatStrict: Linter.Config = {\n plugins: {\n '@archlinter': { rules } as ESLint.Plugin,\n },\n rules: {\n '@archlinter/no-cycles': 'error',\n '@archlinter/no-god-modules': 'error',\n '@archlinter/no-dead-code': 'error',\n '@archlinter/no-dead-symbols': 'error',\n '@archlinter/no-high-coupling': 'error',\n '@archlinter/no-high-complexity': 'error',\n '@archlinter/no-barrel-abuse': 'error',\n '@archlinter/no-layer-violations': 'error',\n '@archlinter/no-sdp-violations': 'error',\n '@archlinter/no-hub-modules': 'warn',\n '@archlinter/no-deep-nesting': 'error',\n '@archlinter/no-long-params': 'warn',\n '@archlinter/no-code-clone': 'error',\n '@archlinter/no-regression': ['error', { failOn: 'medium' }],\n },\n};\n","import type { ESLint } from 'eslint';\nimport { rules } from './rules';\nimport { recommended, strict, flatRecommended, flatStrict } from './configs';\n\nconst plugin: ESLint.Plugin = {\n meta: {\n name: '@archlinter/eslint-plugin',\n version: '0.6.0-alpha.1',\n },\n rules,\n configs: {\n // Legacy configs (ESLint 8)\n // @ts-expect-error - Legacy config format compatibility\n recommended,\n // @ts-expect-error - Legacy config format compatibility\n strict,\n // Flat configs (ESLint 9+)\n 'flat/recommended': flatRecommended,\n 'flat/strict': flatStrict,\n },\n};\n\n// Dual export for CJS and ESM compatibility\nexport default plugin;\nexport { rules } from './rules';\nexport { recommended, strict, flatRecommended, flatStrict } from './configs';\n\n// Export test utilities\nexport { notifyFileChanged, clearAllCaches } from './utils/cache';\n"],"mappings":";AAAA,SAAS,wBAAwE;;;ACAjF,SAAS,kBAAkB;AAC3B,SAAS,SAAS,YAAY;AAG9B,IAAM,uBAAuB;AAAA,EAC3B;AAAA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AACF;AAGA,IAAM,YAAY,oBAAI,IAAoB;AAMnC,SAAS,gBAAgB,UAA0B;AAExD,QAAM,SAAS,UAAU,IAAI,QAAQ;AACrC,MAAI,OAAQ,QAAO;AAEnB,MAAI,MAAM,QAAQ,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,8BAA8B;AAAA,IAC9B,4BAA4B;AAAA,IAC5B,+BAA+B;AAAA,IAC/B,gCAAgC;AAAA,IAChC,kCAAkC;AAAA,IAClC,+BAA+B;AAAA,IAC/B,mCAAmC;AAAA,IACnC,iCAAiC;AAAA,IACjC,8BAA8B;AAAA,IAC9B,+BAA+B;AAAA,IAC/B,8BAA8B;AAAA,IAC9B,6BAA6B;AAAA,IAC7B,6BAA6B,CAAC,SAAS,EAAE,QAAQ,SAAS,CAAC;AAAA,EAC7D;AACF;;;ACnCA,IAAM,SAAwB;AAAA,EAC5B,MAAM;AAAA,IACJ,MAAM;AAAA,IACN,SAAS;AAAA,EACX;AAAA,EACA;AAAA,EACA,SAAS;AAAA;AAAA;AAAA,IAGP;AAAA;AAAA,IAEA;AAAA;AAAA,IAEA,oBAAoB;AAAA,IACpB,eAAe;AAAA,EACjB;AACF;AAGA,IAAO,gBAAQ;","names":["hash"]}
package/package.json ADDED
@@ -0,0 +1,54 @@
1
+ {
2
+ "name": "@archlinter/eslint-plugin",
3
+ "version": "0.11.0-canary.2",
4
+ "description": "ESLint plugin for architectural smell detection",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/archlinter/archlint.git",
9
+ "directory": "packages/eslint-plugin"
10
+ },
11
+ "homepage": "https://archlinter.github.io/archlint/integrations/eslint.html",
12
+ "bugs": {
13
+ "url": "https://github.com/archlinter/archlint/issues"
14
+ },
15
+ "type": "module",
16
+ "exports": {
17
+ ".": {
18
+ "types": "./dist/index.d.ts",
19
+ "import": "./dist/index.js",
20
+ "require": "./dist/index.cjs"
21
+ }
22
+ },
23
+ "main": "dist/index.cjs",
24
+ "module": "dist/index.js",
25
+ "types": "dist/index.d.ts",
26
+ "files": [
27
+ "dist"
28
+ ],
29
+ "scripts": {
30
+ "build": "tsup",
31
+ "clean": "rm -rf dist",
32
+ "test": "vitest",
33
+ "typecheck": "tsc --noEmit",
34
+ "lint": "pnpm typecheck"
35
+ },
36
+ "dependencies": {
37
+ "@archlinter/core": "0.11.0-canary.2",
38
+ "xxhash-wasm": "^1.1.0"
39
+ },
40
+ "peerDependencies": {
41
+ "eslint": ">=8.0.0"
42
+ },
43
+ "devDependencies": {
44
+ "@types/eslint": "^9.6.0",
45
+ "@types/node": "^20.0.0",
46
+ "eslint": "^9.17.0",
47
+ "tsup": "^8.0.0",
48
+ "typescript": "^5.4.0",
49
+ "vitest": "^1.4.0"
50
+ },
51
+ "engines": {
52
+ "node": ">=18"
53
+ }
54
+ }