lint: mor elow hanging changeset.js lint errors

lint-changeset-files
John McLear 2020-12-22 16:26:50 +00:00 committed by Richard Hansen
parent 5e384cca2b
commit 703bd414af
1 changed files with 4 additions and 4 deletions

View File

@ -615,7 +615,7 @@ exports.textLinesMutator = (lines) => {
const isCurLineInSplice = () => (curLine - curSplice[0] < (curSplice.length - 2)); const isCurLineInSplice = () => (curLine - curSplice[0] < (curSplice.length - 2));
const debugPrint = (typ) => { const debugPrint = (typ) => { // eslint-disable-line no-unused-vars
print(`${typ}: ${curSplice.toSource()} / ${curLine},${curCol} / ${lines_toSource()}`); print(`${typ}: ${curSplice.toSource()} / ${curLine},${curCol} / ${lines_toSource()}`);
}; };
@ -1175,6 +1175,7 @@ exports.mutateAttributionLines = (cs, lines, pool) => {
csIter.next(csOp); csIter.next(csOp);
} }
// print(csOp.toSource()+" "+attOp.toSource()+" "+opOut.toSource()); // print(csOp.toSource()+" "+attOp.toSource()+" "+opOut.toSource());
// eslint-disable-next-line max-len
// print(csOp.opcode+"/"+csOp.lines+"/"+csOp.attribs+"/"+lineAssem+"/"+lineIter+"/"+(lineIter?lineIter.hasNext():null)); // print(csOp.opcode+"/"+csOp.lines+"/"+csOp.attribs+"/"+lineAssem+"/"+lineIter+"/"+(lineIter?lineIter.hasNext():null));
// print("csOp: "+csOp.toSource()); // print("csOp: "+csOp.toSource());
if ((!csOp.opcode) && (!attOp.opcode) && (!lineAssem) && (!(lineIter && lineIter.hasNext()))) { if ((!csOp.opcode) && (!attOp.opcode) && (!lineAssem) && (!(lineIter && lineIter.hasNext()))) {
@ -1339,6 +1340,7 @@ exports.compose = (cs1, cs2, pool) => {
* @param pool {AttribPool} Attribute pool * @param pool {AttribPool} Attribute pool
*/ */
exports.attributeTester = (attribPair, pool) => { exports.attributeTester = (attribPair, pool) => {
const never = (attribs) => false;
if (!pool) { if (!pool) {
return never; return never;
} }
@ -1349,8 +1351,6 @@ exports.attributeTester = (attribPair, pool) => {
const re = new RegExp(`\\*${exports.numToString(attribNum)}(?!\\w)`); const re = new RegExp(`\\*${exports.numToString(attribNum)}(?!\\w)`);
return (attribs) => re.test(attribs); return (attribs) => re.test(attribs);
} }
const never = (attribs) => false;
}; };
/** /**
@ -1716,7 +1716,7 @@ exports.builder = (oldLen) => {
const o = exports.newOp(); const o = exports.newOp();
const charBank = exports.stringAssembler(); const charBank = exports.stringAssembler();
var self = { const self = {
// attribs are [[key1,value1],[key2,value2],...] or '*0*1...' (no pool needed in latter case) // attribs are [[key1,value1],[key2,value2],...] or '*0*1...' (no pool needed in latter case)
keep: (N, L, attribs, pool) => { keep: (N, L, attribs, pool) => {
o.opcode = '='; o.opcode = '=';