{"version":3,"sources":["../../src/analyzers/index.ts","../../src/utils/fileClassifier.ts","../../src/utils/importParser.ts","../../src/rules/reactNativePrimitives.ts","../../src/rules/reactDomPrimitives.ts","../../src/analyzers/platformImports.ts","../../src/analyzers/componentLinter.ts"],"sourcesContent":["export * from './platformImports';\nexport * from './componentLinter';\n","import { FileType } from '../types';\nimport * as path from 'path';\n\n/**\n * Extension patterns for classification\n * Order matters - more specific patterns should come first\n */\nconst EXTENSION_PATTERNS: Array<{ pattern: RegExp; type: FileType }> = [\n  // Platform-specific component files\n  { pattern: /\\.web\\.(tsx|jsx)$/, type: 'web' },\n  { pattern: /\\.native\\.(tsx|jsx)$/, type: 'native' },\n  { pattern: /\\.ios\\.(tsx|jsx)$/, type: 'native' },\n  { pattern: /\\.android\\.(tsx|jsx)$/, type: 'native' },\n\n  // Style files (can be .ts or .tsx)\n  { pattern: /\\.styles?\\.(tsx?|jsx?)$/, type: 'styles' },\n\n  // Type definition files\n  { pattern: /\\.types?\\.(ts|tsx)$/, type: 'types' },\n  { pattern: /types\\.(ts|tsx)$/, type: 'types' },\n  { pattern: /\\.d\\.ts$/, type: 'types' },\n\n  // Shared component files (generic .tsx/.jsx without platform suffix)\n  { pattern: /\\.(tsx|jsx)$/, type: 'shared' },\n];\n\n/**\n * Files that should be classified as 'other' regardless of extension\n */\nconst EXCLUDED_PATTERNS: RegExp[] = [\n  /\\.test\\.(tsx?|jsx?)$/,\n  /\\.spec\\.(tsx?|jsx?)$/,\n  /\\.stories\\.(tsx?|jsx?)$/,\n  /\\.config\\.(ts|js)$/,\n  /index\\.(ts|tsx|js|jsx)$/,\n];\n\n/**\n * Classifies a file based on its path and extension\n *\n * @param filePath - The file path to classify\n * @returns The file type classification\n *\n * @example\n * classifyFile('Button.tsx') // 'shared'\n * classifyFile('Button.web.tsx') // 'web'\n * classifyFile('Button.native.tsx') // 'native'\n * classifyFile('Button.styles.tsx') // 'styles'\n * classifyFile('types.ts') // 'types'\n */\nexport function classifyFile(filePath: string): FileType {\n  const fileName = path.basename(filePath);\n\n  // Check if this file should be excluded from component analysis\n  for (const pattern of EXCLUDED_PATTERNS) {\n    if (pattern.test(fileName)) {\n      return 'other';\n    }\n  }\n\n  // Match against extension patterns\n  for (const { pattern, type } of EXTENSION_PATTERNS) {\n    if (pattern.test(fileName)) {\n      return type;\n    }\n  }\n\n  return 'other';\n}\n\n/**\n * Checks if a file is a component file that should be analyzed\n *\n * @param filePath - The file path to check\n * @returns True if the file is a component file (.tsx or .jsx)\n */\nexport function isComponentFile(filePath: string): boolean {\n  const fileType = classifyFile(filePath);\n  return fileType === 'shared' || fileType === 'web' || fileType === 'native';\n}\n\n/**\n * Checks if a file is a shared (cross-platform) component file\n * These are the files that should NOT contain platform-specific imports\n *\n * @param filePath - The file path to check\n * @returns True if the file is a shared component file\n */\nexport function isSharedFile(filePath: string): boolean {\n  return classifyFile(filePath) === 'shared';\n}\n\n/**\n * Checks if a file is platform-specific\n *\n * @param filePath - The file path to check\n * @returns True if the file is web or native specific\n */\nexport function isPlatformSpecificFile(filePath: string): boolean {\n  const fileType = classifyFile(filePath);\n  return fileType === 'web' || fileType === 'native';\n}\n\n/**\n * Gets the expected platform for a file\n *\n * @param filePath - The file path to check\n * @returns The expected platform, or null for shared/other files\n */\nexport function getExpectedPlatform(filePath: string): 'web' | 'native' | null {\n  const fileType = classifyFile(filePath);\n  if (fileType === 'web') return 'web';\n  if (fileType === 'native') return 'native';\n  return null;\n}\n\n/**\n * Extracts the base component name from a file path\n *\n * @param filePath - The file path\n * @returns The base component name without platform suffix or extension\n *\n * @example\n * getBaseName('Button.web.tsx') // 'Button'\n * getBaseName('Button.native.tsx') // 'Button'\n * getBaseName('Button.tsx') // 'Button'\n */\nexport function getBaseName(filePath: string): string {\n  const fileName = path.basename(filePath);\n  return fileName\n    .replace(/\\.(web|native|ios|android)\\.(tsx|jsx|ts|js)$/, '')\n    .replace(/\\.styles?\\.(tsx|jsx|ts|js)$/, '')\n    .replace(/\\.types?\\.(tsx|ts)$/, '')\n    .replace(/\\.(tsx|jsx|ts|js)$/, '');\n}\n","import * as ts from 'typescript';\nimport { ImportInfo, Platform } from '../types';\nimport { REACT_NATIVE_SOURCES, REACT_DOM_SOURCES } from '../rules';\n\n/**\n * Options for import parsing\n */\nexport interface ImportParserOptions {\n  /** Additional sources to treat as React Native */\n  additionalNativeSources?: string[];\n  /** Additional sources to treat as React DOM */\n  additionalDomSources?: string[];\n}\n\n/**\n * Determines the platform for a given import source\n */\nexport function getPlatformForSource(\n  source: string,\n  options?: ImportParserOptions\n): Platform {\n  const nativeSources = new Set([\n    ...REACT_NATIVE_SOURCES,\n    ...(options?.additionalNativeSources ?? []),\n  ]);\n\n  const domSources = new Set([\n    ...REACT_DOM_SOURCES,\n    ...(options?.additionalDomSources ?? []),\n  ]);\n\n  // Check for exact matches first\n  if (nativeSources.has(source)) return 'react-native';\n  if (domSources.has(source)) return 'react-dom';\n\n  // Check for prefix matches (e.g., 'react-native-xxx')\n  if (source.startsWith('react-native')) return 'react-native';\n  if (source.startsWith('react-dom')) return 'react-dom';\n\n  return 'neutral';\n}\n\n/**\n * Parses import statements from TypeScript/JavaScript source code\n *\n * @param sourceCode - The source code to parse\n * @param filePath - Optional file path for better error messages\n * @param options - Parser options\n * @returns Array of import information\n */\nexport function parseImports(\n  sourceCode: string,\n  filePath: string = 'unknown.tsx',\n  options?: ImportParserOptions\n): ImportInfo[] {\n  const imports: ImportInfo[] = [];\n\n  // Create a source file from the code\n  const sourceFile = ts.createSourceFile(\n    filePath,\n    sourceCode,\n    ts.ScriptTarget.Latest,\n    true,\n    filePath.endsWith('.tsx') || filePath.endsWith('.jsx')\n      ? ts.ScriptKind.TSX\n      : ts.ScriptKind.TS\n  );\n\n  // Walk the AST to find import declarations\n  const visit = (node: ts.Node): void => {\n    if (ts.isImportDeclaration(node)) {\n      const importInfo = parseImportDeclaration(node, sourceFile, options);\n      imports.push(...importInfo);\n    }\n\n    // Also check for require() calls\n    if (\n      ts.isCallExpression(node) &&\n      ts.isIdentifier(node.expression) &&\n      node.expression.text === 'require' &&\n      node.arguments.length === 1 &&\n      ts.isStringLiteral(node.arguments[0])\n    ) {\n      const source = node.arguments[0].text;\n      const { line, character } = sourceFile.getLineAndCharacterOfPosition(\n        node.getStart()\n      );\n\n      imports.push({\n        name: 'require',\n        source,\n        platform: getPlatformForSource(source, options),\n        line: line + 1,\n        column: character + 1,\n        isDefault: false,\n        isNamespace: true,\n        isTypeOnly: false,\n      });\n    }\n\n    ts.forEachChild(node, visit);\n  };\n\n  visit(sourceFile);\n\n  return imports;\n}\n\n/**\n * Parses a single import declaration into ImportInfo objects\n */\nfunction parseImportDeclaration(\n  node: ts.ImportDeclaration,\n  sourceFile: ts.SourceFile,\n  options?: ImportParserOptions\n): ImportInfo[] {\n  const imports: ImportInfo[] = [];\n\n  // Get the module specifier (the source)\n  if (!ts.isStringLiteral(node.moduleSpecifier)) {\n    return imports;\n  }\n\n  const source = node.moduleSpecifier.text;\n  const platform = getPlatformForSource(source, options);\n  const isTypeOnly = node.importClause?.isTypeOnly ?? false;\n\n  const importClause = node.importClause;\n  if (!importClause) {\n    // Side-effect import: import 'module'\n    return imports;\n  }\n\n  // Default import: import X from 'module'\n  if (importClause.name) {\n    const { line, character } = sourceFile.getLineAndCharacterOfPosition(\n      importClause.name.getStart()\n    );\n\n    imports.push({\n      name: importClause.name.text,\n      source,\n      platform,\n      line: line + 1,\n      column: character + 1,\n      isDefault: true,\n      isNamespace: false,\n      isTypeOnly,\n    });\n  }\n\n  // Named and namespace imports\n  const namedBindings = importClause.namedBindings;\n  if (namedBindings) {\n    if (ts.isNamespaceImport(namedBindings)) {\n      // Namespace import: import * as X from 'module'\n      const { line, character } = sourceFile.getLineAndCharacterOfPosition(\n        namedBindings.name.getStart()\n      );\n\n      imports.push({\n        name: namedBindings.name.text,\n        source,\n        platform,\n        line: line + 1,\n        column: character + 1,\n        isDefault: false,\n        isNamespace: true,\n        isTypeOnly,\n      });\n    } else if (ts.isNamedImports(namedBindings)) {\n      // Named imports: import { X, Y as Z } from 'module'\n      for (const element of namedBindings.elements) {\n        const { line, character } = sourceFile.getLineAndCharacterOfPosition(\n          element.name.getStart()\n        );\n\n        const importedName = element.propertyName?.text ?? element.name.text;\n        const localName = element.name.text;\n\n        imports.push({\n          name: localName,\n          originalName: element.propertyName ? importedName : undefined,\n          source,\n          platform,\n          line: line + 1,\n          column: character + 1,\n          isDefault: false,\n          isNamespace: false,\n          isTypeOnly: isTypeOnly || element.isTypeOnly,\n        });\n      }\n    }\n  }\n\n  return imports;\n}\n\n/**\n * Filters imports to only those from platform-specific sources\n */\nexport function filterPlatformImports(\n  imports: ImportInfo[],\n  platform?: Platform\n): ImportInfo[] {\n  return imports.filter((imp) => {\n    if (imp.platform === 'neutral') return false;\n    if (platform && imp.platform !== platform) return false;\n    return true;\n  });\n}\n\n/**\n * Gets all unique import sources from a list of imports\n */\nexport function getUniqueSources(imports: ImportInfo[]): string[] {\n  return [...new Set(imports.map((imp) => imp.source))];\n}\n\n/**\n * Groups imports by their source module\n */\nexport function groupImportsBySource(\n  imports: ImportInfo[]\n): Map<string, ImportInfo[]> {\n  const grouped = new Map<string, ImportInfo[]>();\n\n  for (const imp of imports) {\n    const existing = grouped.get(imp.source) ?? [];\n    existing.push(imp);\n    grouped.set(imp.source, existing);\n  }\n\n  return grouped;\n}\n","import { PrimitiveRule, PrimitiveRuleSet } from '../types';\n\n/**\n * Module sources that indicate React Native platform\n */\nexport const REACT_NATIVE_SOURCES = [\n  'react-native',\n  'react-native-web',\n  'react-native-gesture-handler',\n  'react-native-reanimated',\n  'react-native-safe-area-context',\n  'react-native-screens',\n  'react-native-svg',\n  '@react-native-vector-icons/material-design-icons',\n  '@react-native-vector-icons/common',\n  '@react-native-community/async-storage',\n  '@react-native-picker/picker',\n  'expo',\n  'expo-constants',\n  'expo-linking',\n  'expo-status-bar',\n] as const;\n\n/**\n * Core React Native view primitives\n */\nconst CORE_PRIMITIVES: PrimitiveRule[] = [\n  {\n    name: 'View',\n    source: 'react-native',\n    platform: 'react-native',\n    description: 'Basic container component',\n  },\n  {\n    name: 'Text',\n    source: 'react-native',\n    platform: 'react-native',\n    description: 'Text display component',\n  },\n  {\n    name: 'Image',\n    source: 'react-native',\n    platform: 'react-native',\n    description: 'Image display component',\n  },\n  {\n    name: 'ImageBackground',\n    source: 'react-native',\n    platform: 'react-native',\n    description: 'Background image container',\n  },\n  {\n    name: 'ScrollView',\n    source: 'react-native',\n    platform: 'react-native',\n    description: 'Scrollable container',\n  },\n  {\n    name: 'FlatList',\n    source: 'react-native',\n    platform: 'react-native',\n    description: 'Performant list component',\n  },\n  {\n    name: 'SectionList',\n    source: 'react-native',\n    platform: 'react-native',\n    description: 'Sectioned list component',\n  },\n  {\n    name: 'VirtualizedList',\n    source: 'react-native',\n    platform: 'react-native',\n    description: 'Base virtualized list',\n  },\n];\n\n/**\n * Interactive/touchable primitives\n */\nconst INTERACTIVE_PRIMITIVES: PrimitiveRule[] = [\n  {\n    name: 'TouchableOpacity',\n    source: 'react-native',\n    platform: 'react-native',\n    description: 'Touch with opacity feedback',\n  },\n  {\n    name: 'TouchableHighlight',\n    source: 'react-native',\n    platform: 'react-native',\n    description: 'Touch with highlight feedback',\n  },\n  {\n    name: 'TouchableWithoutFeedback',\n    source: 'react-native',\n    platform: 'react-native',\n    description: 'Touch without visual feedback',\n  },\n  {\n    name: 'TouchableNativeFeedback',\n    source: 'react-native',\n    platform: 'react-native',\n    description: 'Android ripple feedback',\n  },\n  {\n    name: 'Pressable',\n    source: 'react-native',\n    platform: 'react-native',\n    description: 'Modern press handler component',\n  },\n  {\n    name: 'Button',\n    source: 'react-native',\n    platform: 'react-native',\n    description: 'Basic button component',\n  },\n];\n\n/**\n * Input primitives\n */\nconst INPUT_PRIMITIVES: PrimitiveRule[] = [\n  {\n    name: 'TextInput',\n    source: 'react-native',\n    platform: 'react-native',\n    description: 'Text input field',\n  },\n  {\n    name: 'Switch',\n    source: 'react-native',\n    platform: 'react-native',\n    description: 'Toggle switch component',\n  },\n  {\n    name: 'Slider',\n    source: 'react-native',\n    platform: 'react-native',\n    description: 'Slider input (deprecated)',\n  },\n];\n\n/**\n * Modal and overlay primitives\n */\nconst MODAL_PRIMITIVES: PrimitiveRule[] = [\n  {\n    name: 'Modal',\n    source: 'react-native',\n    platform: 'react-native',\n    description: 'Modal overlay component',\n  },\n  {\n    name: 'Alert',\n    source: 'react-native',\n    platform: 'react-native',\n    description: 'Native alert dialog',\n  },\n  {\n    name: 'ActionSheetIOS',\n    source: 'react-native',\n    platform: 'react-native',\n    description: 'iOS action sheet',\n  },\n  {\n    name: 'StatusBar',\n    source: 'react-native',\n    platform: 'react-native',\n    description: 'Status bar controller',\n  },\n];\n\n/**\n * Animation primitives\n */\nconst ANIMATION_PRIMITIVES: PrimitiveRule[] = [\n  {\n    name: 'Animated',\n    source: 'react-native',\n    platform: 'react-native',\n    description: 'Animation library namespace',\n  },\n  {\n    name: 'Easing',\n    source: 'react-native',\n    platform: 'react-native',\n    description: 'Easing functions',\n  },\n  {\n    name: 'LayoutAnimation',\n    source: 'react-native',\n    platform: 'react-native',\n    description: 'Layout animation controller',\n  },\n];\n\n/**\n * Platform and device primitives\n */\nconst PLATFORM_PRIMITIVES: PrimitiveRule[] = [\n  {\n    name: 'Platform',\n    source: 'react-native',\n    platform: 'react-native',\n    description: 'Platform detection utility',\n  },\n  {\n    name: 'Dimensions',\n    source: 'react-native',\n    platform: 'react-native',\n    description: 'Screen dimensions utility',\n  },\n  {\n    name: 'PixelRatio',\n    source: 'react-native',\n    platform: 'react-native',\n    description: 'Pixel ratio utility',\n  },\n  {\n    name: 'Appearance',\n    source: 'react-native',\n    platform: 'react-native',\n    description: 'Color scheme detection',\n  },\n  {\n    name: 'useColorScheme',\n    source: 'react-native',\n    platform: 'react-native',\n    description: 'Color scheme hook',\n  },\n  {\n    name: 'useWindowDimensions',\n    source: 'react-native',\n    platform: 'react-native',\n    description: 'Window dimensions hook',\n  },\n];\n\n/**\n * Event handling primitives\n */\nconst EVENT_PRIMITIVES: PrimitiveRule[] = [\n  {\n    name: 'BackHandler',\n    source: 'react-native',\n    platform: 'react-native',\n    description: 'Android back button handler',\n  },\n  {\n    name: 'Keyboard',\n    source: 'react-native',\n    platform: 'react-native',\n    description: 'Keyboard event handler',\n  },\n  {\n    name: 'PanResponder',\n    source: 'react-native',\n    platform: 'react-native',\n    description: 'Gesture responder system',\n  },\n  {\n    name: 'Linking',\n    source: 'react-native',\n    platform: 'react-native',\n    description: 'Deep linking utility',\n  },\n  {\n    name: 'AppState',\n    source: 'react-native',\n    platform: 'react-native',\n    description: 'App lifecycle state',\n  },\n];\n\n/**\n * Safety primitives\n */\nconst SAFETY_PRIMITIVES: PrimitiveRule[] = [\n  {\n    name: 'SafeAreaView',\n    source: 'react-native',\n    platform: 'react-native',\n    description: 'Safe area inset container',\n  },\n  {\n    name: 'KeyboardAvoidingView',\n    source: 'react-native',\n    platform: 'react-native',\n    description: 'Keyboard avoidance container',\n  },\n];\n\n/**\n * Accessibility primitives\n */\nconst ACCESSIBILITY_PRIMITIVES: PrimitiveRule[] = [\n  {\n    name: 'AccessibilityInfo',\n    source: 'react-native',\n    platform: 'react-native',\n    description: 'Accessibility information API',\n  },\n];\n\n/**\n * Style primitives\n */\nconst STYLE_PRIMITIVES: PrimitiveRule[] = [\n  {\n    name: 'StyleSheet',\n    source: 'react-native',\n    platform: 'react-native',\n    description: 'Style sheet creator',\n  },\n];\n\n/**\n * All React Native primitives combined\n */\nexport const REACT_NATIVE_PRIMITIVES: PrimitiveRule[] = [\n  ...CORE_PRIMITIVES,\n  ...INTERACTIVE_PRIMITIVES,\n  ...INPUT_PRIMITIVES,\n  ...MODAL_PRIMITIVES,\n  ...ANIMATION_PRIMITIVES,\n  ...PLATFORM_PRIMITIVES,\n  ...EVENT_PRIMITIVES,\n  ...SAFETY_PRIMITIVES,\n  ...ACCESSIBILITY_PRIMITIVES,\n  ...STYLE_PRIMITIVES,\n];\n\n/**\n * Set of primitive names for quick lookup\n */\nexport const REACT_NATIVE_PRIMITIVE_NAMES = new Set(\n  REACT_NATIVE_PRIMITIVES.map((p) => p.name)\n);\n\n/**\n * Complete rule set for React Native\n */\nexport const REACT_NATIVE_RULE_SET: PrimitiveRuleSet = {\n  platform: 'react-native',\n  primitives: REACT_NATIVE_PRIMITIVES,\n  sources: [...REACT_NATIVE_SOURCES],\n};\n\n/**\n * Check if a name is a React Native primitive\n */\nexport function isReactNativePrimitive(name: string): boolean {\n  return REACT_NATIVE_PRIMITIVE_NAMES.has(name);\n}\n\n/**\n * Get primitive info by name\n */\nexport function getReactNativePrimitive(name: string): PrimitiveRule | undefined {\n  return REACT_NATIVE_PRIMITIVES.find((p) => p.name === name);\n}\n","import { PrimitiveRule, PrimitiveRuleSet } from '../types';\n\n/**\n * Module sources that indicate React DOM platform\n */\nexport const REACT_DOM_SOURCES = [\n  'react-dom',\n  'react-dom/client',\n  'react-dom/server',\n] as const;\n\n/**\n * React DOM API primitives\n * These are functions/components that are React DOM specific\n */\nconst DOM_API_PRIMITIVES: PrimitiveRule[] = [\n  {\n    name: 'createPortal',\n    source: 'react-dom',\n    platform: 'react-dom',\n    description: 'Render children into a different DOM node',\n  },\n  {\n    name: 'flushSync',\n    source: 'react-dom',\n    platform: 'react-dom',\n    description: 'Force synchronous DOM updates',\n  },\n  {\n    name: 'createRoot',\n    source: 'react-dom/client',\n    platform: 'react-dom',\n    description: 'Create a React root for rendering',\n  },\n  {\n    name: 'hydrateRoot',\n    source: 'react-dom/client',\n    platform: 'react-dom',\n    description: 'Hydrate server-rendered content',\n  },\n  {\n    name: 'render',\n    source: 'react-dom',\n    platform: 'react-dom',\n    description: 'Legacy render function (deprecated)',\n  },\n  {\n    name: 'hydrate',\n    source: 'react-dom',\n    platform: 'react-dom',\n    description: 'Legacy hydrate function (deprecated)',\n  },\n  {\n    name: 'unmountComponentAtNode',\n    source: 'react-dom',\n    platform: 'react-dom',\n    description: 'Legacy unmount function (deprecated)',\n  },\n  {\n    name: 'findDOMNode',\n    source: 'react-dom',\n    platform: 'react-dom',\n    description: 'Find DOM node (deprecated)',\n  },\n];\n\n/**\n * Intrinsic HTML elements that indicate web-only code\n * These are JSX intrinsic elements that only exist in DOM\n *\n * Note: These are detected via JSX usage, not imports\n * This list is for reference and specialized detection\n */\nexport const HTML_INTRINSIC_ELEMENTS = [\n  // Document structure\n  'html',\n  'head',\n  'body',\n  'main',\n  'header',\n  'footer',\n  'nav',\n  'aside',\n  'article',\n  'section',\n\n  // Content sectioning\n  'div',\n  'span',\n  'p',\n  'h1',\n  'h2',\n  'h3',\n  'h4',\n  'h5',\n  'h6',\n\n  // Text content\n  'a',\n  'strong',\n  'em',\n  'code',\n  'pre',\n  'blockquote',\n  'br',\n  'hr',\n\n  // Lists\n  'ul',\n  'ol',\n  'li',\n  'dl',\n  'dt',\n  'dd',\n\n  // Tables\n  'table',\n  'thead',\n  'tbody',\n  'tfoot',\n  'tr',\n  'th',\n  'td',\n  'caption',\n  'colgroup',\n  'col',\n\n  // Forms\n  'form',\n  'input',\n  'textarea',\n  'select',\n  'option',\n  'optgroup',\n  'button',\n  'label',\n  'fieldset',\n  'legend',\n  'datalist',\n  'output',\n  'progress',\n  'meter',\n\n  // Media\n  'img',\n  'video',\n  'audio',\n  'source',\n  'track',\n  'picture',\n  'figure',\n  'figcaption',\n  'canvas',\n  'svg',\n  'iframe',\n  'embed',\n  'object',\n\n  // Interactive\n  'details',\n  'summary',\n  'dialog',\n  'menu',\n\n  // Scripting\n  'script',\n  'noscript',\n  'template',\n  'slot',\n] as const;\n\n/**\n * All React DOM primitives (API functions)\n */\nexport const REACT_DOM_PRIMITIVES: PrimitiveRule[] = [...DOM_API_PRIMITIVES];\n\n/**\n * Set of primitive names for quick lookup\n */\nexport const REACT_DOM_PRIMITIVE_NAMES = new Set(\n  REACT_DOM_PRIMITIVES.map((p) => p.name)\n);\n\n/**\n * Set of HTML intrinsic element names for quick lookup\n */\nexport const HTML_ELEMENT_NAMES: Set<string> = new Set(HTML_INTRINSIC_ELEMENTS);\n\n/**\n * Complete rule set for React DOM\n */\nexport const REACT_DOM_RULE_SET: PrimitiveRuleSet = {\n  platform: 'react-dom',\n  primitives: REACT_DOM_PRIMITIVES,\n  sources: [...REACT_DOM_SOURCES],\n};\n\n/**\n * Check if a name is a React DOM primitive (API function)\n */\nexport function isReactDomPrimitive(name: string): boolean {\n  return REACT_DOM_PRIMITIVE_NAMES.has(name);\n}\n\n/**\n * Check if a name is an HTML intrinsic element\n */\nexport function isHtmlElement(name: string): boolean {\n  return HTML_ELEMENT_NAMES.has(name);\n}\n\n/**\n * Get primitive info by name\n */\nexport function getReactDomPrimitive(name: string): PrimitiveRule | undefined {\n  return REACT_DOM_PRIMITIVES.find((p) => p.name === name);\n}\n","import {\n  AnalyzerOptions,\n  AnalysisResult,\n  FileInput,\n  ImportInfo,\n  Severity,\n  Violation,\n  ViolationType,\n} from '../types';\nimport { classifyFile } from '../utils/fileClassifier';\nimport { parseImports } from '../utils/importParser';\nimport {\n  REACT_NATIVE_SOURCES,\n  isReactNativePrimitive,\n} from '../rules/reactNativePrimitives';\nimport {\n  isReactDomPrimitive,\n} from '../rules/reactDomPrimitives';\n\n/**\n * Default analyzer options\n */\nconst DEFAULT_OPTIONS: Required<AnalyzerOptions> = {\n  severity: 'error',\n  additionalNativePrimitives: [],\n  additionalDomPrimitives: [],\n  ignoredPrimitives: [],\n  ignoredPatterns: [],\n  additionalNativeSources: [],\n  additionalDomSources: [],\n};\n\n/**\n * Check if a file path matches any of the ignored patterns\n */\nfunction matchesIgnoredPattern(\n  filePath: string,\n  patterns: string[]\n): boolean {\n  if (patterns.length === 0) return false;\n\n  for (const pattern of patterns) {\n    // Simple glob matching - convert glob to regex\n    const regexPattern = pattern\n      .replace(/\\*\\*/g, '{{GLOBSTAR}}')\n      .replace(/\\*/g, '[^/]*')\n      .replace(/{{GLOBSTAR}}/g, '.*')\n      .replace(/\\?/g, '.');\n\n    const regex = new RegExp(regexPattern);\n    if (regex.test(filePath)) {\n      return true;\n    }\n  }\n\n  return false;\n}\n\n/**\n * Creates a violation object\n */\nfunction createViolation(\n  type: ViolationType,\n  primitive: string,\n  source: string,\n  filePath: string,\n  line: number,\n  column: number,\n  severity: Severity\n): Violation {\n  const messages: Record<ViolationType, string> = {\n    'native-in-shared': `React Native primitive '${primitive}' from '${source}' should not be used in shared files. Use a .native.tsx file instead.`,\n    'dom-in-shared': `React DOM primitive '${primitive}' from '${source}' should not be used in shared files. Use a .web.tsx file instead.`,\n    'native-in-web': `React Native primitive '${primitive}' from '${source}' should not be used in web-specific files.`,\n    'dom-in-native': `React DOM primitive '${primitive}' from '${source}' should not be used in native-specific files.`,\n  };\n\n  return {\n    type,\n    primitive,\n    source,\n    filePath,\n    line,\n    column,\n    message: messages[type],\n    severity,\n  };\n}\n\n/**\n * Check if an import should be flagged as a React Native primitive\n */\nfunction isNativePrimitive(\n  importInfo: ImportInfo,\n  additionalPrimitives: string[]\n): boolean {\n  const name = importInfo.originalName ?? importInfo.name;\n\n  // Check built-in primitives\n  if (isReactNativePrimitive(name)) return true;\n\n  // Check additional primitives\n  if (additionalPrimitives.includes(name)) return true;\n\n  // Check if the source is a known React Native source\n  const nativeSources: Set<string> = new Set([...REACT_NATIVE_SOURCES]);\n  if (nativeSources.has(importInfo.source)) {\n    // Any import from react-native that's a component (starts with uppercase)\n    if (/^[A-Z]/.test(name)) return true;\n  }\n\n  return false;\n}\n\n/**\n * Check if an import should be flagged as a React DOM primitive\n */\nfunction isDomPrimitive(\n  importInfo: ImportInfo,\n  additionalPrimitives: string[]\n): boolean {\n  const name = importInfo.originalName ?? importInfo.name;\n\n  // Check built-in primitives\n  if (isReactDomPrimitive(name)) return true;\n\n  // Check additional primitives\n  if (additionalPrimitives.includes(name)) return true;\n\n  return false;\n}\n\n/**\n * Analyze a single file for platform import violations\n *\n * @param filePath - Path to the file being analyzed\n * @param sourceCode - The source code content\n * @param options - Analyzer options\n * @returns Analysis result with violations\n *\n * @example\n * ```typescript\n * const result = analyzePlatformImports(\n *   'src/components/Button.tsx',\n *   sourceCode,\n *   { severity: 'error' }\n * );\n *\n * if (result.violations.length > 0) {\n *   for (const v of result.violations) {\n *     console.error(`${v.filePath}:${v.line}:${v.column} - ${v.message}`);\n *   }\n * }\n * ```\n */\nexport function analyzePlatformImports(\n  filePath: string,\n  sourceCode: string,\n  options?: AnalyzerOptions\n): AnalysisResult {\n  const opts = { ...DEFAULT_OPTIONS, ...options };\n  const fileType = classifyFile(filePath);\n  const violations: Violation[] = [];\n\n  // Skip ignored files\n  if (matchesIgnoredPattern(filePath, opts.ignoredPatterns)) {\n    return {\n      filePath,\n      fileType,\n      violations: [],\n      imports: [],\n      passed: true,\n    };\n  }\n\n  // Skip non-component files\n  if (fileType === 'other' || fileType === 'styles' || fileType === 'types') {\n    return {\n      filePath,\n      fileType,\n      violations: [],\n      imports: [],\n      passed: true,\n    };\n  }\n\n  // Parse imports\n  const imports = parseImports(sourceCode, filePath, {\n    additionalNativeSources: opts.additionalNativeSources,\n    additionalDomSources: opts.additionalDomSources,\n  });\n\n  // Build ignored primitives set\n  const ignoredPrimitives = new Set(opts.ignoredPrimitives);\n\n  // Analyze each import\n  for (const imp of imports) {\n    // Skip type-only imports\n    if (imp.isTypeOnly) continue;\n\n    // Skip ignored primitives\n    const primitiveName = imp.originalName ?? imp.name;\n    if (ignoredPrimitives.has(primitiveName)) continue;\n\n    // Check for violations based on file type\n    switch (fileType) {\n      case 'shared':\n        // Shared files should not use platform-specific imports\n        if (isNativePrimitive(imp, opts.additionalNativePrimitives)) {\n          violations.push(\n            createViolation(\n              'native-in-shared',\n              primitiveName,\n              imp.source,\n              filePath,\n              imp.line,\n              imp.column,\n              opts.severity\n            )\n          );\n        }\n        if (isDomPrimitive(imp, opts.additionalDomPrimitives)) {\n          violations.push(\n            createViolation(\n              'dom-in-shared',\n              primitiveName,\n              imp.source,\n              filePath,\n              imp.line,\n              imp.column,\n              opts.severity\n            )\n          );\n        }\n        break;\n\n      case 'web':\n        // Web files should not use React Native imports\n        if (isNativePrimitive(imp, opts.additionalNativePrimitives)) {\n          violations.push(\n            createViolation(\n              'native-in-web',\n              primitiveName,\n              imp.source,\n              filePath,\n              imp.line,\n              imp.column,\n              opts.severity\n            )\n          );\n        }\n        break;\n\n      case 'native':\n        // Native files should not use React DOM imports\n        if (isDomPrimitive(imp, opts.additionalDomPrimitives)) {\n          violations.push(\n            createViolation(\n              'dom-in-native',\n              primitiveName,\n              imp.source,\n              filePath,\n              imp.line,\n              imp.column,\n              opts.severity\n            )\n          );\n        }\n        break;\n    }\n  }\n\n  return {\n    filePath,\n    fileType,\n    violations,\n    imports,\n    passed: violations.length === 0,\n  };\n}\n\n/**\n * Analyze multiple files for platform import violations\n *\n * @param files - Array of files to analyze\n * @param options - Analyzer options\n * @returns Array of analysis results\n *\n * @example\n * ```typescript\n * const results = analyzeFiles(\n *   [\n *     { path: 'Button.tsx', content: buttonSource },\n *     { path: 'Button.web.tsx', content: webSource },\n *     { path: 'Button.native.tsx', content: nativeSource },\n *   ],\n *   { severity: 'warning' }\n * );\n *\n * const failed = results.filter(r => !r.passed);\n * ```\n */\nexport function analyzeFiles(\n  files: FileInput[],\n  options?: AnalyzerOptions\n): AnalysisResult[] {\n  return files.map((file) =>\n    analyzePlatformImports(file.path, file.content, options)\n  );\n}\n\n/**\n * Get a summary of analysis results\n */\nexport interface AnalysisSummary {\n  totalFiles: number;\n  passedFiles: number;\n  failedFiles: number;\n  totalViolations: number;\n  violationsByType: Record<ViolationType, number>;\n  violationsBySeverity: Record<Severity, number>;\n}\n\n/**\n * Summarize analysis results\n *\n * @param results - Array of analysis results\n * @returns Summary statistics\n */\nexport function summarizeResults(results: AnalysisResult[]): AnalysisSummary {\n  const violationsByType: Record<ViolationType, number> = {\n    'native-in-shared': 0,\n    'dom-in-shared': 0,\n    'native-in-web': 0,\n    'dom-in-native': 0,\n  };\n\n  const violationsBySeverity: Record<Severity, number> = {\n    error: 0,\n    warning: 0,\n    info: 0,\n  };\n\n  let totalViolations = 0;\n\n  for (const result of results) {\n    for (const violation of result.violations) {\n      totalViolations++;\n      violationsByType[violation.type]++;\n      violationsBySeverity[violation.severity]++;\n    }\n  }\n\n  return {\n    totalFiles: results.length,\n    passedFiles: results.filter((r) => r.passed).length,\n    failedFiles: results.filter((r) => !r.passed).length,\n    totalViolations,\n    violationsByType,\n    violationsBySeverity,\n  };\n}\n\n/**\n * Format a violation for console output\n */\nexport function formatViolation(violation: Violation): string {\n  const severityPrefix =\n    violation.severity === 'error'\n      ? 'ERROR'\n      : violation.severity === 'warning'\n        ? 'WARN'\n        : 'INFO';\n\n  return `${severityPrefix}: ${violation.filePath}:${violation.line}:${violation.column} - ${violation.message}`;\n}\n\n/**\n * Format all violations from results for console output\n */\nexport function formatViolations(results: AnalysisResult[]): string[] {\n  const lines: string[] = [];\n\n  for (const result of results) {\n    for (const violation of result.violations) {\n      lines.push(formatViolation(violation));\n    }\n  }\n\n  return lines;\n}\n","import { Severity } from '../types';\n\n/**\n * Types of linting issues the component linter can detect.\n *\n * These are issues that TypeScript cannot catch - primarily style/pattern issues\n * that are syntactically valid but violate Idealyst conventions.\n */\nexport type LintIssueType =\n  | 'hardcoded-color'           // Using color strings like '#fff', 'red', 'rgb()'\n  | 'direct-platform-import';   // Importing directly from react-native in shared file\n\n/**\n * A single lint issue found during analysis\n */\nexport interface LintIssue {\n  /** Type of lint issue */\n  type: LintIssueType;\n  /** Severity level */\n  severity: Severity;\n  /** Line number where issue occurred */\n  line: number;\n  /** Column number where issue occurred */\n  column: number;\n  /** The problematic code snippet */\n  code: string;\n  /** Human-readable message describing the issue */\n  message: string;\n  /** Suggested fix (if available) */\n  suggestion?: string;\n}\n\n/**\n * Result of linting a component file\n */\nexport interface LintResult {\n  /** Path to the analyzed file */\n  filePath: string;\n  /** List of issues found */\n  issues: LintIssue[];\n  /** Whether the file passed linting (no errors) */\n  passed: boolean;\n  /** Count of issues by severity */\n  counts: {\n    error: number;\n    warning: number;\n    info: number;\n  };\n}\n\n/**\n * Options for the component linter\n */\nexport interface ComponentLinterOptions {\n  /**\n   * Which rules to enable (all enabled by default)\n   */\n  rules?: {\n    /** Detect hardcoded color values like '#fff', 'red', 'rgb()' */\n    hardcodedColors?: boolean | Severity;\n    /** Detect direct imports from 'react-native' in shared files */\n    directPlatformImports?: boolean | Severity;\n  };\n\n  /**\n   * Glob patterns for files to ignore\n   */\n  ignoredPatterns?: string[];\n\n  /**\n   * Color values that are allowed (e.g., 'transparent', 'inherit')\n   * @default ['transparent', 'inherit', 'currentColor']\n   */\n  allowedColors?: string[];\n}\n\n// Common CSS color names that indicate hardcoded colors\nconst CSS_COLOR_NAMES = new Set([\n  'aliceblue', 'antiquewhite', 'aqua', 'aquamarine', 'azure', 'beige', 'bisque',\n  'black', 'blanchedalmond', 'blue', 'blueviolet', 'brown', 'burlywood', 'cadetblue',\n  'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan',\n  'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey',\n  'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred',\n  'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey',\n  'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey',\n  'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'fuchsia', 'gainsboro',\n  'ghostwhite', 'gold', 'goldenrod', 'gray', 'green', 'greenyellow', 'grey',\n  'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender',\n  'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan',\n  'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink',\n  'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey',\n  'lightsteelblue', 'lightyellow', 'lime', 'limegreen', 'linen', 'magenta', 'maroon',\n  'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen',\n  'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred',\n  'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'navy',\n  'oldlace', 'olive', 'olivedrab', 'orange', 'orangered', 'orchid', 'palegoldenrod',\n  'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru',\n  'pink', 'plum', 'powderblue', 'purple', 'rebeccapurple', 'red', 'rosybrown',\n  'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna',\n  'silver', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen',\n  'steelblue', 'tan', 'teal', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat',\n  'white', 'whitesmoke', 'yellow', 'yellowgreen',\n]);\n\n// Colors that are generally safe to use\nconst DEFAULT_ALLOWED_COLORS = new Set([\n  'transparent',\n  'inherit',\n  'currentColor',\n  'currentcolor',\n]);\n\n// Style properties that typically use colors\nconst COLOR_PROPERTIES = [\n  'color',\n  'backgroundColor',\n  'borderColor',\n  'borderTopColor',\n  'borderRightColor',\n  'borderBottomColor',\n  'borderLeftColor',\n  'shadowColor',\n  'textDecorationColor',\n  'tintColor',\n  'overlayColor',\n];\n\n/**\n * Check if a string is a hardcoded color value\n */\nfunction isHardcodedColor(value: string, allowedColors: Set<string>): boolean {\n  const trimmed = value.trim().toLowerCase();\n\n  // Check if it's an allowed color\n  if (allowedColors.has(trimmed)) {\n    return false;\n  }\n\n  // Hex color: #fff, #ffffff, #ffffffff\n  if (/^#[0-9a-f]{3,8}$/i.test(trimmed)) {\n    return true;\n  }\n\n  // RGB/RGBA: rgb(0,0,0), rgba(0,0,0,0.5)\n  if (/^rgba?\\s*\\(/.test(trimmed)) {\n    return true;\n  }\n\n  // HSL/HSLA: hsl(0,0%,0%), hsla(0,0%,0%,0.5)\n  if (/^hsla?\\s*\\(/.test(trimmed)) {\n    return true;\n  }\n\n  // CSS named color\n  if (CSS_COLOR_NAMES.has(trimmed)) {\n    return true;\n  }\n\n  return false;\n}\n\n/**\n * Get the severity for a rule, handling boolean and severity values\n */\nfunction getRuleSeverity(\n  rule: boolean | Severity | undefined,\n  defaultSeverity: Severity\n): Severity | null {\n  if (rule === false) return null;\n  if (rule === true || rule === undefined) return defaultSeverity;\n  return rule;\n}\n\n/**\n * Parse source code and find line/column for a match index\n */\nfunction getLineColumn(source: string, index: number): { line: number; column: number } {\n  const lines = source.substring(0, index).split('\\n');\n  return {\n    line: lines.length,\n    column: lines[lines.length - 1].length + 1,\n  };\n}\n\n/**\n * Lint a component file for Idealyst-specific issues.\n *\n * Detects issues that TypeScript cannot catch:\n * - Hardcoded colors (TypeScript sees these as valid strings)\n * - Direct react-native imports in shared files (valid TS, but breaks web)\n *\n * @param filePath - Path to the file being analyzed\n * @param sourceCode - The source code content\n * @param options - Linter options\n * @returns Lint result with issues found\n *\n * @example\n * ```typescript\n * const result = lintComponent(\n *   'src/components/MyButton.tsx',\n *   sourceCode,\n *   { rules: { hardcodedColors: 'error' } }\n * );\n *\n * if (!result.passed) {\n *   for (const issue of result.issues) {\n *     console.error(`${issue.line}:${issue.column} - ${issue.message}`);\n *   }\n * }\n * ```\n */\nexport function lintComponent(\n  filePath: string,\n  sourceCode: string,\n  options: ComponentLinterOptions = {}\n): LintResult {\n  const issues: LintIssue[] = [];\n  const rules = options.rules || {};\n\n  const allowedColors = new Set([\n    ...DEFAULT_ALLOWED_COLORS,\n    ...(options.allowedColors || []).map(c => c.toLowerCase()),\n  ]);\n\n  // Rule: Hardcoded colors\n  const hardcodedColorSeverity = getRuleSeverity(rules.hardcodedColors, 'warning');\n  if (hardcodedColorSeverity) {\n    // Match color properties with string values\n    for (const prop of COLOR_PROPERTIES) {\n      // Match: backgroundColor: '#fff' or backgroundColor: \"red\"\n      const propRegex = new RegExp(`${prop}\\\\s*:\\\\s*['\"]([^'\"]+)['\"]`, 'g');\n      let match;\n      while ((match = propRegex.exec(sourceCode)) !== null) {\n        const colorValue = match[1];\n        if (isHardcodedColor(colorValue, allowedColors)) {\n          const { line, column } = getLineColumn(sourceCode, match.index);\n          issues.push({\n            type: 'hardcoded-color',\n            severity: hardcodedColorSeverity,\n            line,\n            column,\n            code: match[0],\n            message: `Hardcoded color '${colorValue}' in ${prop}. Use theme colors instead.`,\n            suggestion: `Use theme.colors.*, theme.intents[intent].*, or pass color via props`,\n          });\n        }\n      }\n    }\n\n    // Also check for color/backgroundColor in template literals\n    const templateColorRegex = /(?:color|backgroundColor)\\s*:\\s*`[^`]*#[0-9a-fA-F]{3,8}[^`]*`/g;\n    let templateMatch;\n    while ((templateMatch = templateColorRegex.exec(sourceCode)) !== null) {\n      const { line, column } = getLineColumn(sourceCode, templateMatch.index);\n      issues.push({\n        type: 'hardcoded-color',\n        severity: hardcodedColorSeverity,\n        line,\n        column,\n        code: templateMatch[0],\n        message: `Hardcoded hex color in template literal. Use theme colors instead.`,\n        suggestion: `Use theme.colors.* or theme.intents[intent].*`,\n      });\n    }\n  }\n\n  // Rule: Direct platform imports in shared files\n  const directPlatformSeverity = getRuleSeverity(rules.directPlatformImports, 'warning');\n  if (directPlatformSeverity) {\n    // Only check shared files (not .web.tsx or .native.tsx)\n    const isSharedFile = !filePath.includes('.web.') && !filePath.includes('.native.');\n    if (isSharedFile) {\n      // Check for direct react-native imports\n      const rnImportRegex = /import\\s+.*\\s+from\\s+['\"]react-native['\"]/g;\n      let match;\n      while ((match = rnImportRegex.exec(sourceCode)) !== null) {\n        const { line, column } = getLineColumn(sourceCode, match.index);\n        issues.push({\n          type: 'direct-platform-import',\n          severity: directPlatformSeverity,\n          line,\n          column,\n          code: match[0],\n          message: `Direct import from 'react-native' in shared file. Use @idealyst/components instead.`,\n          suggestion: `Import View, Text, etc. from '@idealyst/components'`,\n        });\n      }\n    }\n  }\n\n  // Calculate counts\n  const counts = {\n    error: issues.filter(i => i.severity === 'error').length,\n    warning: issues.filter(i => i.severity === 'warning').length,\n    info: issues.filter(i => i.severity === 'info').length,\n  };\n\n  return {\n    filePath,\n    issues,\n    passed: counts.error === 0,\n    counts,\n  };\n}\n\n/**\n * Lint multiple component files\n *\n * @param files - Array of files to lint\n * @param options - Linter options\n * @returns Array of lint results\n */\nexport function lintComponents(\n  files: Array<{ path: string; content: string }>,\n  options: ComponentLinterOptions = {}\n): LintResult[] {\n  return files.map(file => lintComponent(file.path, file.content, options));\n}\n\n/**\n * Format a lint issue for console output\n */\nexport function formatLintIssue(issue: LintIssue, filePath: string): string {\n  const severityPrefix = issue.severity === 'error'\n    ? 'ERROR'\n    : issue.severity === 'warning'\n      ? 'WARN'\n      : 'INFO';\n\n  let output = `${severityPrefix}: ${filePath}:${issue.line}:${issue.column} - ${issue.message}`;\n  if (issue.suggestion) {\n    output += `\\n  Suggestion: ${issue.suggestion}`;\n  }\n  return output;\n}\n\n/**\n * Format all lint results for console output\n */\nexport function formatLintResults(results: LintResult[]): string[] {\n  const lines: string[] = [];\n\n  for (const result of results) {\n    for (const issue of result.issues) {\n      lines.push(formatLintIssue(issue, result.filePath));\n    }\n  }\n\n  return lines;\n}\n\n/**\n * Summary of lint results\n */\nexport interface LintSummary {\n  totalFiles: number;\n  passedFiles: number;\n  failedFiles: number;\n  totalIssues: number;\n  issuesByType: Record<LintIssueType, number>;\n  issuesBySeverity: Record<Severity, number>;\n}\n\n/**\n * Summarize lint results\n */\nexport function summarizeLintResults(results: LintResult[]): LintSummary {\n  const issuesByType: Record<LintIssueType, number> = {\n    'hardcoded-color': 0,\n    'direct-platform-import': 0,\n  };\n\n  const issuesBySeverity: Record<Severity, number> = {\n    error: 0,\n    warning: 0,\n    info: 0,\n  };\n\n  let totalIssues = 0;\n\n  for (const result of results) {\n    for (const issue of result.issues) {\n      totalIssues++;\n      issuesByType[issue.type]++;\n      issuesBySeverity[issue.severity]++;\n    }\n  }\n\n  return {\n    totalFiles: results.length,\n    passedFiles: results.filter(r => r.passed).length,\n    failedFiles: results.filter(r => !r.passed).length,\n    totalIssues,\n    issuesByType,\n    issuesBySeverity,\n  };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACCA,WAAsB;AAMtB,IAAM,qBAAiE;AAAA;AAAA,EAErE,EAAE,SAAS,qBAAqB,MAAM,MAAM;AAAA,EAC5C,EAAE,SAAS,wBAAwB,MAAM,SAAS;AAAA,EAClD,EAAE,SAAS,qBAAqB,MAAM,SAAS;AAAA,EAC/C,EAAE,SAAS,yBAAyB,MAAM,SAAS;AAAA;AAAA,EAGnD,EAAE,SAAS,2BAA2B,MAAM,SAAS;AAAA;AAAA,EAGrD,EAAE,SAAS,uBAAuB,MAAM,QAAQ;AAAA,EAChD,EAAE,SAAS,oBAAoB,MAAM,QAAQ;AAAA,EAC7C,EAAE,SAAS,YAAY,MAAM,QAAQ;AAAA;AAAA,EAGrC,EAAE,SAAS,gBAAgB,MAAM,SAAS;AAC5C;AAKA,IAAM,oBAA8B;AAAA,EAClC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAeO,SAAS,aAAa,UAA4B;AACvD,QAAM,WAAgB,cAAS,QAAQ;AAGvC,aAAW,WAAW,mBAAmB;AACvC,QAAI,QAAQ,KAAK,QAAQ,GAAG;AAC1B,aAAO;AAAA,IACT;AAAA,EACF;AAGA,aAAW,EAAE,SAAS,KAAK,KAAK,oBAAoB;AAClD,QAAI,QAAQ,KAAK,QAAQ,GAAG;AAC1B,aAAO;AAAA,IACT;AAAA,EACF;AAEA,SAAO;AACT;;;ACpEA,SAAoB;;;ACKb,IAAM,uBAAuB;AAAA,EAClC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA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