Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tighten the vars-argument for the ESLint no-unused-vars rule #15775

Merged
merged 1 commit into from
Dec 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@
"no-undef-init": "error",
"no-undef": ["error", { "typeof": true, }],
"no-unused-vars": ["error", {
"vars": "local",
"vars": "all",
"args": "none",
}],
"no-use-before-define": ["error", {
Expand Down
1 change: 1 addition & 0 deletions extensions/chromium/preserve-referer.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
/* import-globals-from pdfHandler.js */
/* exported saveReferer */

"use strict";
/**
Expand Down
5 changes: 2 additions & 3 deletions test/driver.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
*/
/* globals pdfjsLib, pdfjsViewer */

"use strict";

const {
AnnotationLayer,
AnnotationMode,
Expand Down Expand Up @@ -322,7 +320,6 @@ class Rasterize {
* @property {HTMLDivElement} end - Container for a completion message.
*/

// eslint-disable-next-line no-unused-vars
class Driver {
/**
* @param {DriverOptions} options
Expand Down Expand Up @@ -962,3 +959,5 @@ class Driver {
return capability.promise;
}
}

export { Driver };
7 changes: 4 additions & 3 deletions test/test_slave.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
<meta charset="utf-8">
<script src="../build/generic/build/pdf.js"></script>
<script src="../build/components/pdf_viewer.js"></script>
<script src="driver.js"></script>

<link rel="resource" type="application/l10n" href="../build/generic/web/locale/locale.properties">
</head>
Expand All @@ -33,8 +32,10 @@
<pre id="output" style="max-height: 800px; overflow-y: scroll;"></pre>
<div id="end"></div>
</body>
<script>
var driver = new Driver({
<script type="module">
import { Driver } from "./driver.js";

const driver = new Driver({
disableScrolling: document.getElementById('disableScrolling'),
inflight: document.getElementById('inflight'),
output: document.getElementById('output'),
Expand Down