Skip to content

Commit

Permalink
biome automation via python with reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
AIFlowML committed Jan 24, 2025
1 parent 2af84f8 commit c040a90
Show file tree
Hide file tree
Showing 12 changed files with 4,660 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,11 @@ eliza.sig
packages/plugin-nvidia-nim/extra
packages/plugin-nvidia-nim/old_code
packages/plugin-nvidia-nim/docs

# Bug Hunter logs and checkpoints
scripts/bug_hunt/logs/
scripts/bug_hunt/logs/*.log
scripts/bug_hunt/checkpoints/
scripts/bug_hunt/checkpoints/*.json
scripts/bug_hunt/reports/
scripts/bug_hunt/reports/*.md
95 changes: 95 additions & 0 deletions scripts/bug_hunt/biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
{
"$schema": "https://biomejs.dev/schemas/1.5.3/schema.json",
"extends": ["../../biome.json"],
"organizeImports": {
"enabled": false
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"suspicious": {
"noExplicitAny": "error",
"noArrayIndexKey": "error",
"noPrototypeBuiltins": "error",
"noDuplicateObjectKeys": "error",
"noGlobalIsNan": "error",
"noDuplicateFontNames": "error",
"noSelfCompare": "error",
"noDoubleEquals": "error",
"noImplicitAnyLet": "error",
"noAssignInExpressions": "error",
"noExportsInTest": "error",
"noConstEnum": "error",
"noEmptyInterface": "error",
"noConsoleLog": "error"
},
"correctness": {
"noUnusedVariables": "error",
"noUnreachable": "error",
"useExhaustiveDependencies": "error",
"noSwitchDeclarations": "error",
"noUnnecessaryContinue": "error",
"noInnerDeclarations": "error",
"noUndeclaredVariables": "error"
},
"style": {
"useConst": "error",
"useTemplate": "error",
"useImportType": "error",
"useNodejsImportProtocol": "error",
"noUselessElse": "error",
"useSelfClosingElements": "error",
"useNumberNamespace": "error",
"noUnusedTemplateLiteral": "error",
"noInferrableTypes": "error",
"noNonNullAssertion": "error",
"noParameterAssign": "error",
"useDefaultParameterLast": "error",
"useExponentiationOperator": "error",
"noVar": "error",
"useSingleVarDeclarator": "error",
"useExportType": "error"
},
"a11y": {
"useAltText": "error",
"useFocusableInteractive": "error",
"useMediaCaption": "error",
"noSvgWithoutTitle": "error",
"useKeyWithClickEvents": "error"
},
"complexity": {
"noForEach": "error",
"useOptionalChain": "error",
"useArrowFunction": "error",
"useFlatMap": "error",
"useLiteralKeys": "error",
"noBannedTypes": "error",
"noStaticOnlyClass": "error",
"noThisInStatic": "error",
"noUselessConstructor": "error",
"noUselessTernary": "error",
"noUselessSwitchCase": "error",
"noUselessCatch": "error",
"useSimplifiedLogicExpression": "error"
},
"performance": {
"noDelete": "error",
"noAccumulatingSpread": "error"
}
}
},
"formatter": {
"enabled": false
},
"javascript": {
"formatter": {
"quoteStyle": "double",
"semicolons": "always"
}
},
"files": {
"include": ["../../packages/*/src/**/*.{ts,tsx,js,jsx}"],
"ignore": ["**/node_modules/**", "**/dist/**", "**/.next/**"]
}
}
56 changes: 56 additions & 0 deletions scripts/bug_hunt/config/analysis.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"analysis": {
"plugins_dir": "../../packages",
"exclude_patterns": [
"**/node_modules/**",
"**/dist/**",
"**/build/**",
"**/*.test.ts",
"**/*.spec.ts"
],
"include_patterns": [
"**/*.ts",
"**/*.js",
"**/*.tsx",
"**/*.jsx"
]
},
"biome": {
"config_path": "../../biome.json",
"additional_rules": {
"style": {
"useConsistentArrayType": "error",
"useConsistentTypeAssertions": "error"
},
"suspicious": {
"noExplicitAny": "error",
"noConsoleLog": "warn"
}
}
},
"error_handling": {
"required_patterns": [
"try\\s*{[\\s\\S]*}\\s*catch",
"\\.catch\\s*\\(",
"Promise\\.reject\\s*\\("
],
"error_propagation": true,
"async_handling": true
},
"logging": {
"required_levels": ["error", "warn", "info", "debug"],
"context_required": true,
"performance_logging": true
},
"type_safety": {
"strict_null_checks": true,
"no_implicit_any": true,
"check_generics": true
},
"reporting": {
"output_dir": "../reports",
"format": "markdown",
"include_suggestions": true,
"prioritize_fixes": true
}
}
Loading

0 comments on commit c040a90

Please sign in to comment.