-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
[Firefox] Enable linting of *.jsm files and update the code style in extensions/firefox/content #5406
Conversation
@timvandermeij Since you've reviewed other code style patches: I'm wondering if you have the time, and if you feel comfortable enough with this part of the codebase, to review this PR? |
/botio-linux preview |
From: Bot.io (Linux)ReceivedCommand cmd_preview from @timvandermeij received. Current queue size: 0 Live output at: http://107.21.233.14:8877/771c135a1ae1b25/output.txt |
From: Bot.io (Linux)SuccessFull output at http://107.21.233.14:8877/771c135a1ae1b25/output.txt Total script time: 0.78 mins Published
|
[Firefox] Enable linting of *.jsm files and update the code style in extensions/firefox/content
Nice work, thanks! |
@timvandermeij Thank you for the review! |
By default JSHint will only lint
*.js
files, however it is possible specify that other file types should be covered as well. To ensure a consistent code style, and to help catch errors, I think that it's a good idea to also include*.jsm
files when running lint.Besides updating the
node make lint
command, this PR also makes the necessary adjustments to make linting pass.Besides, obviously, testing this using the built addon, I've also made extensive use of the addon debugger to make sure that changing to strict equalities doesn't change the behaviour.
Note: In a couple of the files I've relaxed the maximum line length requirement, because enforcing 80 characters would have meant adding a, in my opinion, disproportionally large number of new lines. I tried to keep the total diff as small as possible, but I would be happy to change this is if that is preferred.