I am new in using "lint"
case 'up':
index > 0 ? index-- : 0; break;
I have a pre-commit lint script, which shows the following error:
"error Expected an assignment or function call and instead saw an expression"
If I change the code to the long version everything is okay?
case 'up':
if (index > 0) {
index--;
} else {
index = 0;
}
Isn't the fist code snippet not the short form of the second?
Thanks in advance
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…