Skip to content

Commit

Permalink
Fix eslint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
maximeborges committed Jan 31, 2018
1 parent a005851 commit e9ded0a
Show file tree
Hide file tree
Showing 10 changed files with 586 additions and 594 deletions.
38 changes: 19 additions & 19 deletions lib/gen-first-wave-brick.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,25 @@ function genFirstWaveBrick (text, extra, times) {

tmp = [];
switch (text) {
case 'p': tmp = genBrick(['pclk', '111', 'nclk', '000'], extra, times); break;
case 'n': tmp = genBrick(['nclk', '000', 'pclk', '111'], extra, times); break;
case 'P': tmp = genBrick(['Pclk', '111', 'nclk', '000'], extra, times); break;
case 'N': tmp = genBrick(['Nclk', '000', 'pclk', '111'], extra, times); break;
case 'l':
case 'L':
case '0': tmp = genBrick(['000'], extra, times); break;
case 'h':
case 'H':
case '1': tmp = genBrick(['111'], extra, times); break;
case '=': tmp = genBrick(['vvv-2'], extra, times); break;
case '2': tmp = genBrick(['vvv-2'], extra, times); break;
case '3': tmp = genBrick(['vvv-3'], extra, times); break;
case '4': tmp = genBrick(['vvv-4'], extra, times); break;
case '5': tmp = genBrick(['vvv-5'], extra, times); break;
case 'd': tmp = genBrick(['ddd'], extra, times); break;
case 'u': tmp = genBrick(['uuu'], extra, times); break;
case 'z': tmp = genBrick(['zzz'], extra, times); break;
default: tmp = genBrick(['xxx'], extra, times); break;
case 'p': tmp = genBrick(['pclk', '111', 'nclk', '000'], extra, times); break;
case 'n': tmp = genBrick(['nclk', '000', 'pclk', '111'], extra, times); break;
case 'P': tmp = genBrick(['Pclk', '111', 'nclk', '000'], extra, times); break;
case 'N': tmp = genBrick(['Nclk', '000', 'pclk', '111'], extra, times); break;
case 'l':
case 'L':
case '0': tmp = genBrick(['000'], extra, times); break;
case 'h':
case 'H':
case '1': tmp = genBrick(['111'], extra, times); break;
case '=': tmp = genBrick(['vvv-2'], extra, times); break;
case '2': tmp = genBrick(['vvv-2'], extra, times); break;
case '3': tmp = genBrick(['vvv-3'], extra, times); break;
case '4': tmp = genBrick(['vvv-4'], extra, times); break;
case '5': tmp = genBrick(['vvv-5'], extra, times); break;
case 'd': tmp = genBrick(['ddd'], extra, times); break;
case 'u': tmp = genBrick(['uuu'], extra, times); break;
case 'z': tmp = genBrick(['zzz'], extra, times); break;
default: tmp = genBrick(['xxx'], extra, times); break;
}
return tmp;
}
Expand Down
26 changes: 11 additions & 15 deletions lib/jsonml-add-attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,11 @@ var ATTRMAP = {

/*DOM*/ function addAttributes(/*DOM*/ elem, /*object*/ attr) {
if (attr.name && document.attachEvent) {
try {
// IE fix for not being able to programatically change the name attribute
var alt = document.createElement('<' + elem.tagName + ' name=\'' + attr.name + '\'>');
// fix for Opera 8.5 and Netscape 7.1 creating malformed elements
if (elem.tagName === alt.tagName) {
elem = alt;
}
} catch (ex) {
console.log(ex);
// IE fix for not being able to programatically change the name attribute
var alt = document.createElement('<' + elem.tagName + ' name=\'' + attr.name + '\'>');
// fix for Opera 8.5 and Netscape 7.1 creating malformed elements
if (elem.tagName === alt.tagName) {
elem = alt;
}
}

Expand All @@ -74,11 +70,11 @@ var ATTRMAP = {
} else {
elem.style = value;
}
// } else if (name === 'class') {
// elem.className = value;
// // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// elem.setAttribute(name, value);
// // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// } else if (name === 'class') {
// elem.className = value;
// // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// elem.setAttribute(name, value);
// // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
} else if (EVTS[name]) {
addHandler(elem, name, value);

Expand All @@ -87,7 +83,7 @@ var ATTRMAP = {
addHandler(elem, ATTRDUP[name], value);
}
} else if (
typeof value === 'string' ||
typeof value === 'string' ||
typeof value === 'number' ||
typeof value === 'boolean'
) {
Expand Down
2 changes: 1 addition & 1 deletion lib/parse-wave-lanes.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function parseWaveLanes (sig, lane) {
}
content[content.length - 1][0] = tmp0.slice(0);
content[content.length - 1][1] = content_wave;
content[content.length - 1][2] = data_extract(sigx,num_unseen_markers);
content[content.length - 1][2] = data_extract(sigx, num_unseen_markers);
}
// content is an array of arrays, representing the list of signals using
// the same order:
Expand Down
Loading

0 comments on commit e9ded0a

Please sign in to comment.