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

Fix a number of code style issues found by various ESLint rules, to make it easier to switch from JSHint to ESLint #7890

Merged
merged 15 commits into from
Dec 14, 2016

Conversation

Snuffleupagus
Copy link
Collaborator

I've been looking into switching to ESLint, which I mentioned on IRC about a year ago and have finally had time to actually do now, since it's got a number of benefits compared to JSHint[1]. Among those are:
rules that can help find subtle bugs (e.g. PR #7881), a lot more (fine-grained) options, the ability to enforce larger parts of the style guide, more modern and thus easier to work with. (Also, locally gulp lint actually seems to run ~25% quicker when using ESLint instead of JSHint.)

In order to be able to make the switch, and to enable a decent amount of rules from the start, I figured that one big PR that both changes the linter and fixes various new linting failures would be unnecessarily big and thus time consuming to review.
Hence I'm submitting this PR which addresses a bunch of linting issue found by ESLint first, to make the PR that actually changes the linter somewhat smaller and simpler to review. (I'm hoping to have time to finish it up, and submit the actual ESLint PR this weekend.)

@timvandermeij Since you very graciously offered to help with reviewing, in #7881 (comment), I'm assigning this to you :-)


[1] Looking at http://jshint.com/docs/options/, it seems that some of the JSHint rules that we depend on is (or will be) removed in upcoming versions, so we wouldn't be able to upgrade without loosing lint coverage.

@Snuffleupagus Snuffleupagus changed the title Fix a number of code style issue found by various ESLint rules, to make it easier switch from JSHint to ESLint Fix a number of code style issue found by various ESLint rules, to make it easier to switch from JSHint to ESLint Dec 13, 2016
@Snuffleupagus Snuffleupagus changed the title Fix a number of code style issue found by various ESLint rules, to make it easier to switch from JSHint to ESLint Fix a number of code style issues found by various ESLint rules, to make it easier to switch from JSHint to ESLint Dec 13, 2016
@Snuffleupagus
Copy link
Collaborator Author

/botio test

@pdfjsbot
Copy link

From: Bot.io (Linux)


Received

Command cmd_test from @Snuffleupagus received. Current queue size: 0

Live output at: http://107.21.233.14:8877/fb3c43e6d8eb61f/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

Command cmd_test from @Snuffleupagus received. Current queue size: 0

Live output at: http://107.22.172.223:8877/a924181c064235b/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Success

Full output at http://107.22.172.223:8877/a924181c064235b/output.txt

Total script time: 26.06 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Regression tests: Passed

@pdfjsbot
Copy link

From: Bot.io (Linux)


Failed

Full output at http://107.21.233.14:8877/fb3c43e6d8eb61f/output.txt

Total script time: 60.00 mins

@Snuffleupagus
Copy link
Collaborator Author

/botio-linux test

@pdfjsbot
Copy link

From: Bot.io (Linux)


Received

Command cmd_test from @Snuffleupagus received. Current queue size: 0

Live output at: http://107.21.233.14:8877/125ed0ddc400963/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux)


Success

Full output at http://107.21.233.14:8877/125ed0ddc400963/output.txt

Total script time: 26.46 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Regression tests: Passed

@timvandermeij
Copy link
Contributor

/botio-linux preview

@pdfjsbot
Copy link

From: Bot.io (Linux)


Received

Command cmd_preview from @timvandermeij received. Current queue size: 0

Live output at: http://107.21.233.14:8877/6f1ad07e2b97d53/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux)


Success

Full output at http://107.21.233.14:8877/6f1ad07e2b97d53/output.txt

Total script time: 2.18 mins

Published

@timvandermeij timvandermeij merged commit 7d8fa13 into mozilla:master Dec 14, 2016
@timvandermeij
Copy link
Contributor

Nice work! I like the clean-up and that this is separated from the actual ESLint switch.

@Snuffleupagus Snuffleupagus deleted the pre-eslint-fixes branch December 14, 2016 09:27
movsb pushed a commit to movsb/pdf.js that referenced this pull request Jul 14, 2018
Fix a number of code style issues found by various ESLint rules, to make it easier to switch from JSHint to ESLint
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.

3 participants