Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: biome automation via python with reporting #2733

Merged
merged 3 commits into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,12 @@ packages/plugin-nvidia-nim/extra
packages/plugin-nvidia-nim/old_code
packages/plugin-nvidia-nim/docs

lit-config.json
# 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

lit-config.json
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
Loading