mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-02-01 03:12:42 +01:00
add eslint hints
This commit is contained in:
parent
2e6db4e848
commit
18f6fd7cf4
1 changed files with 5 additions and 0 deletions
|
@ -29,6 +29,7 @@ function random() {
|
||||||
return Math.floor(Math.random() * maxValue);
|
return Math.floor(Math.random() * maxValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// maxValue is not used
|
||||||
this.nextDouble = function (maxValue) {
|
this.nextDouble = function (maxValue) {
|
||||||
return Math.random();
|
return Math.random();
|
||||||
}
|
}
|
||||||
|
@ -59,6 +60,7 @@ function runTests() {
|
||||||
assert(literal(a) + " == " + literal(b));
|
assert(literal(a) + " == " + literal(b));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// throughIterator is not used
|
||||||
function throughIterator(opsStr) {
|
function throughIterator(opsStr) {
|
||||||
var iter = Changeset.opIterator(opsStr);
|
var iter = Changeset.opIterator(opsStr);
|
||||||
var assem = Changeset.opAssembler();
|
var assem = Changeset.opAssembler();
|
||||||
|
@ -68,6 +70,7 @@ function runTests() {
|
||||||
return assem.toString();
|
return assem.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// throughSmartAssembler is not used
|
||||||
function throughSmartAssembler(opsStr) {
|
function throughSmartAssembler(opsStr) {
|
||||||
var iter = Changeset.opIterator(opsStr);
|
var iter = Changeset.opIterator(opsStr);
|
||||||
var assem = Changeset.smartOpAssembler();
|
var assem = Changeset.smartOpAssembler();
|
||||||
|
@ -295,6 +298,7 @@ function runTests() {
|
||||||
print("> runMutateAttributionTest#" + testId);
|
print("> runMutateAttributionTest#" + testId);
|
||||||
var p = poolOrArray(attribs);
|
var p = poolOrArray(attribs);
|
||||||
var alines2 = Array.prototype.slice.call(alines);
|
var alines2 = Array.prototype.slice.call(alines);
|
||||||
|
// result is never used
|
||||||
var result = Changeset.mutateAttributionLines(
|
var result = Changeset.mutateAttributionLines(
|
||||||
Changeset.checkRep(cs), alines2, p);
|
Changeset.checkRep(cs), alines2, p);
|
||||||
assertEqualArrays(outCorrect, alines2);
|
assertEqualArrays(outCorrect, alines2);
|
||||||
|
@ -485,6 +489,7 @@ function runTests() {
|
||||||
// assumes attrib pool like ['apple,','apple,true','banana,','banana,true']
|
// assumes attrib pool like ['apple,','apple,true','banana,','banana,true']
|
||||||
if (opcode == '-' || rand.nextInt(3)) {
|
if (opcode == '-' || rand.nextInt(3)) {
|
||||||
return '';
|
return '';
|
||||||
|
// always true
|
||||||
} else if (rand.nextInt(3)) {
|
} else if (rand.nextInt(3)) {
|
||||||
if (opcode == '+' || rand.nextInt(2)) {
|
if (opcode == '+' || rand.nextInt(2)) {
|
||||||
return '*' + Changeset.numToString(rand.nextInt(2) * 2 + 1);
|
return '*' + Changeset.numToString(rand.nextInt(2) * 2 + 1);
|
||||||
|
|
Loading…
Reference in a new issue