Blame view
node_modules/eslint/lib/formatters/html-template.html
4.39 KB
c39994410
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 |
<!DOCTYPE html> <head> <title>ESLint Report</title> <style> body { font-family:Arial, "Helvetica Neue", Helvetica, sans-serif; font-size:16px; font-weight:normal; margin:0; padding:0; color:#333 } #overview { padding:20px 30px } td, th { padding:5px 10px } h1 { margin:0 } table { margin:30px; width:calc(100% - 60px); max-width:1000px; border-radius:5px; border:1px solid #ddd; border-spacing:0px; } th { font-weight:400; font-size:normal; text-align:left; cursor:pointer } td.clr-1, td.clr-2, th span { font-weight:700 } th span { float:right; margin-left:20px } th span:after { content:""; clear:both; display:block } tr:last-child td { border-bottom:none } tr td:first-child, tr td:last-child { color:#9da0a4 } #overview.bg-0, tr.bg-0 th { color:#468847; background:#dff0d8; border-bottom:1px solid #d6e9c6 } #overview.bg-1, tr.bg-1 th { color:#f0ad4e; background:#fcf8e3; border-bottom:1px solid #fbeed5 } #overview.bg-2, tr.bg-2 th { color:#b94a48; background:#f2dede; border-bottom:1px solid #eed3d7 } td { border-bottom:1px solid #ddd } td.clr-1 { color:#f0ad4e } td.clr-2 { color:#b94a48 } td a { color:#3a33d1; text-decoration:none } td a:hover { color:#272296; text-decoration:underline } </style> </head> <body> <div id="overview" class="bg-{{getColor totalErrors totalWarnings}}"> <h1>ESLint Report</h1> <div> <span>{{renderText totalErrors totalWarnings}}</span> - Generated on {{date}} </div> </div> <table> <tbody> {{#each results}} <tr class="bg-{{getColor this.errorCount this.warningCount}}" data-group="f-{{@index}}"> <th colspan="4"> [+] {{this.filePath}} <span>{{renderText this.errorCount this.warningCount}}</span> </th> </tr> {{#each this.messages}} <tr class="f-{{@../index}}" style="display:none"> <td>{{#if this.line}}{{this.line}}{{else}}0{{/if}}:{{#if this.column}}{{this.column}}{{else}}0{{/if}}</td> {{getSeverity this.severity}} <td>{{this.message}}</td> <td> <a href="http://eslint.org/docs/rules/{{this.ruleId}}" target="_blank">{{this.ruleId}}</a> </td> </tr> {{/each}} {{/each}} </tbody> </table> <script type="text/javascript"> var groups = document.querySelectorAll("tr[data-group]"); for (i = 0; i < groups.length; i++) { groups[i].addEventListener("click", function() { var inGroup = document.getElementsByClassName(this.getAttribute("data-group")); this.innerHTML = (this.innerHTML.indexOf("+") > -1) ? this.innerHTML.replace("+", "-") : this.innerHTML.replace("-", "+"); for (var j = 0; j < inGroup.length; j++) { inGroup[j].style.display = (inGroup[j].style.display !== "none") ? "none" : "table-row"; } }); } </script> </body> </html> |