(impact: axe.ImpactValue | undefined)
| 103 | } |
| 104 | |
| 105 | function impactToSeverity(impact: axe.ImpactValue | undefined): IssueSeverity { |
| 106 | switch (impact) { |
| 107 | case 'critical': |
| 108 | case 'serious': |
| 109 | return 'error'; |
| 110 | case 'moderate': |
| 111 | return 'warning'; |
| 112 | case 'minor': |
| 113 | case null: |
| 114 | case undefined: |
| 115 | return 'info'; |
| 116 | } |
| 117 | } |