A11yWatch/a11ywatch-core

View on GitHub
src/core/utils/sorts/issue.ts

Summary

Maintainability
A
0 mins
Test Coverage
export const issueSort = (a: any, b: any) => {
  if (a.type === "error" && b.type !== "error") {
    return -1;
  }
  if (a.type === "warning" && b.type !== "error") {
    return -2;
  }
  return 0;
};