mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
tools: enable no-unused-expressions lint rule
Fixes: https://github.com/nodejs/node/issues/36246 PR-URL: https://github.com/nodejs/node/pull/36248 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
@@ -12,8 +12,7 @@ const bench = common.createBenchmark(main, {
|
||||
function main({ encoding, n }) {
|
||||
bench.start();
|
||||
for (let i = 0; i < n; ++i) {
|
||||
const sd = new StringDecoder(encoding);
|
||||
!!sd.encoding;
|
||||
new StringDecoder(encoding);
|
||||
}
|
||||
bench.end(n);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user