返回 AiToEarn
detect-antipatterns.mjs
根目录 / project / aitoearn-web / .agents / skills / impeccable / scripts / detector / detect-antipatterns.mjs
1 #!/usr/bin/env node
2
3 /**
4 * Anti-Pattern Detector for Impeccable
5 * Copyright (c) 2026 Paul Bakaus
6 * SPDX-License-Identifier: Apache-2.0
7 *
8 * Public API facade. Runtime engines live under cli/engine/engines/.
9 */
10
11 import { detectCli } from './cli/main.mjs';
12
13 export { ANTIPATTERNS, RULE_ENGINE_SUPPORT, getAntipattern, getRulesForCategory, getRuleEngineSupport } from './registry/antipatterns.mjs';
14 export { SAFE_TAGS, BORDER_SAFE_TAGS, OVERUSED_FONTS, GENERIC_FONTS, KNOWN_SERIF_FONTS } from './shared/constants.mjs';
15 export { isNeutralColor, parseRgb, relativeLuminance, contrastRatio, parseGradientColors, hasChroma, getHue, colorToHex } from './shared/color.mjs';
16 export { isFullPage } from './shared/page.mjs';
17 export {
18 checkElementBorders,
19 checkElementMotion,
20 checkElementGlow,
21 checkPageTypography,
22 checkPageLayout,
23 checkHtmlPatterns,
24 } from './rules/checks.mjs';
25 export { createDetectorProfile, summarizeDetectorProfile } from './profile/profiler.mjs';
26 export { detectHtml } from './engines/static-html/detect-html.mjs';
27 export { detectUrl, createBrowserDetector } from './engines/browser/detect-url.mjs';
28 export { detectText, extractStyleBlocks, extractCSSinJS } from './engines/regex/detect-text.mjs';
29 export {
30 walkDir,
31 SCANNABLE_EXTENSIONS,
32 SKIP_DIRS,
33 buildImportGraph,
34 resolveImport,
35 detectFrameworkConfig,
36 isPortListening,
37 FRAMEWORK_CONFIGS,
38 } from './node/file-system.mjs';
39 export { formatFindings, detectCli } from './cli/main.mjs';
40
41 const isMainModule = process.argv[1]?.endsWith('detect-antipatterns.mjs') ||
42 process.argv[1]?.endsWith('detect-antipatterns.mjs/');
43 if (isMainModule) detectCli();
44
44 lines Plain Text