Skip to content

Enable the ESLint no-var rule in the examples/ folder #13087

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

Merged
merged 3 commits into from
Mar 13, 2021

Conversation

Snuffleupagus
Copy link
Collaborator

Please refer to the individual commit messages for additional details.

…older

These changes were done automatically, by using the `gulp lint --fix` command, in preparation for the next patch.
Updating the examples to use `let`/`const` should be fine, given that they are available in all browsers/platforms that the PDF.js library now supports; please note the following compatibility information:

 - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let#browser_compatibility
 - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/const#browser_compatibility
(This is something that I happened to notice while working on the previous patch.)

The code in the `examples/mobile-viewer/viewer.js` file is essentially copied from an older version of the default viewer, hence we can slightly simplify the `animationStarted` handling here.
@Snuffleupagus Snuffleupagus changed the title Enable the ESLint no-var ESLint rule in the examples/ folder Enable the ESLint no-var rule in the examples/ folder Mar 12, 2021
@Snuffleupagus Snuffleupagus force-pushed the eslint-examples-no-var branch from ca8e94e to d144d01 Compare March 12, 2021 16:53
@timvandermeij timvandermeij merged commit 1abdcba into mozilla:master Mar 13, 2021
@timvandermeij
Copy link
Contributor

Thank you for doing this!

@Snuffleupagus Snuffleupagus deleted the eslint-examples-no-var branch March 13, 2021 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants