chore: update eslint and prettier configuration

This commit is contained in:
2026-06-17 16:23:28 +05:30
parent b54242cf7e
commit 4c2241ff72
140 changed files with 2270 additions and 1287 deletions

View File

@@ -112,7 +112,12 @@ export const DETECTION_MODES: Record<string, DetectionModeConfig> = {
'pothole-detection': {
id: 'pothole-detection',
label: 'Pothole Detection',
enabledTypes: ['pothole', 'road_crack', 'damaged_road_marking', 'drain_issue'],
enabledTypes: [
'pothole',
'road_crack',
'damaged_road_marking',
'drain_issue',
],
},
'sign-board-detection': {
id: 'sign-board-detection',
@@ -153,14 +158,19 @@ export const DETECTION_MODES: Record<string, DetectionModeConfig> = {
};
// Fallback config for unknown modes
export const DEFAULT_DETECTION_MODE: DetectionModeConfig = DETECTION_MODES['pot-sign-detection'];
export const DEFAULT_DETECTION_MODE: DetectionModeConfig =
DETECTION_MODES['pot-sign-detection'];
export const getDetectionModeConfig = (mode?: string): DetectionModeConfig => {
if (!mode) return DEFAULT_DETECTION_MODE;
return DETECTION_MODES[mode] || DEFAULT_DETECTION_MODE;
};
export const getEnabledDetectionTypes = (mode?: string): DetectionTypeConfig[] => {
export const getEnabledDetectionTypes = (
mode?: string,
): DetectionTypeConfig[] => {
const config = getDetectionModeConfig(mode);
return config.enabledTypes.map((typeId) => DETECTION_TYPES[typeId]).filter(Boolean);
return config.enabledTypes
.map((typeId) => DETECTION_TYPES[typeId])
.filter(Boolean);
};