Skip to content
Snippets Groups Projects
Commit 128abf30 authored by Alexander Rose's avatar Alexander Rose
Browse files

lint: add no-multi-spaces rule

parent 0c0e9952
No related branches found
No related tags found
No related merge requests found
......@@ -51,7 +51,8 @@
}],
"space-before-function-paren": "off",
"func-call-spacing": "off",
"no-multi-spaces": "error"
"no-multi-spaces": "error",
"block-spacing": "error"
},
"overrides": [
{
......
......@@ -32,7 +32,7 @@ export function _hufTree(hst: NumberArray, tree: number[], MAXL: number) {
tree[(l2 << 1) + 1] = 1;
return 1;
}
list.sort(function (a, b){return a.f - b.f;});
list.sort(function (a, b){ return a.f - b.f; });
let a = list[0], b = list[1], i0 = 0, i1 = 1, i2 = 2;
list[0] = {
lit: -1,
......@@ -80,7 +80,7 @@ function setDepth(t: HufTree, d: number): number {
function restrictDepth(dps: HufTree[], MD: number, maxl: number) {
let i = 0, dbt = 0;
const bCost = 1 << (maxl - MD);
dps.sort(function (a: HufTree, b: HufTree){return b.d === a.d ? a.f - b.f : b.d - a.d;});
dps.sort(function (a: HufTree, b: HufTree){ return b.d === a.d ? a.f - b.f : b.d - a.d; });
for(i = 0; i < dps.length; i++) {
if(dps[i].d > MD) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment