(severity: Linter.Severity)
| 81 | } |
| 82 | |
| 83 | function convertSeverity(severity: Linter.Severity): IssueSeverity { |
| 84 | switch (severity) { |
| 85 | case 2: |
| 86 | return 'error'; |
| 87 | case 1: |
| 88 | return 'warning'; |
| 89 | case 0: |
| 90 | // shouldn't happen |
| 91 | throw new Error(`Unexpected severity ${severity} in ESLint results`); |
| 92 | } |
| 93 | } |