Skip to content

Commit a47b364

Browse files
authored
Rollup merge of #142618 - GuillaumeGomez:eslint-no-console, r=lolbinarycat
Lint about `console` calls in rustdoc JS As discussed [here](#142100 (comment)), this PR enforces that `console` is not used in rustdoc JS by default. cc `@lolbinarycat`
2 parents 6acda82 + 2bbc974 commit a47b364

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/librustdoc/html/static/.eslintrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,5 +91,6 @@ module.exports = {
9191
"no-script-url": "error",
9292
"no-sequences": "error",
9393
"no-div-regex": "error",
94+
"no-console": "error",
9495
}
9596
};

src/librustdoc/html/static/js/search.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1133,6 +1133,7 @@ class RoaringBitmap {
11331133
}
11341134
for (let j = 0; j < size; ++j) {
11351135
if (offsets && offsets[j] !== i) {
1136+
// eslint-disable-next-line no-console
11361137
console.log(this.containers);
11371138
throw new Error(`corrupt bitmap ${j}: ${i} / ${offsets[j]}`);
11381139
}

0 commit comments

Comments
 (0)