improve alert message for js/useless-assignment-to-local

This commit is contained in:
Erik Krogh Kristensen
2020-03-30 19:57:43 +02:00
parent 0b4bfed726
commit 7938bc4ed0
3 changed files with 27 additions and 1 deletions

View File

@@ -10,3 +10,4 @@
| tst.js:51:6:51:11 | x = 23 | The initial value of x is unused, since it is always overwritten. |
| tst.js:132:7:132:13 | {x} = o | The initial value of x is unused, since it is always overwritten. |
| tst.js:162:6:162:14 | [x] = [0] | The initial value of x is unused, since it is always overwritten. |
| tst.js:172:7:172:17 | nSign = foo | This definition of nSign is useless, since its value is never read. |

View File

@@ -166,3 +166,11 @@ function v() {
x;
y;
});
(function() {
if (something()) {
var nSign = foo;
} else {
console.log(nSign);
}
})()