Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Fix a few ESLint issues #10
Conversation
| - "rules": { | ||
| - "no-console": "warn" | ||
| - } | ||
| -} |
pdehaan
Dec 6, 2017
Contributor
For some reason, this file was preventing ESLint from loading the parent config. Not sure why.
pdehaan
Dec 6, 2017
•
Contributor
I think this can be resolved by moving the ESLint config file up a directory into /addon/:
"use strict";
module.exports = {
env: {
browser: true,
es6: true,
webextensions: true,
},
};I guess maybe ESLint only looks for config files up the tree as long as there are no gaps.
| } | ||
| + if (document.querySelector("#wanted")) { |
pdehaan
Dec 6, 2017
Contributor
@gregglind Is this kosher? Or should this be if (document.querySelector("#seen")) { ... }?
| * Returns true only if the URL's protocol is in APPLICABLE_PROTOCOLS. | ||
| */ | ||
| protocolIsApplicable(url) { | ||
| - var anchor = document.createElement('a'); | ||
| + var anchor = document.createElement("a"); |
pdehaan
Dec 6, 2017
Contributor
Not sure if we want to force let and const instead of using var... But that's probably a future conversation.
addon/webextension/background.js
| - * Ensure that the CSS modification happens for all open and future tabs | ||
| - */ | ||
| + * Ensure that the CSS modification happens for all open and future tabs | ||
| + */ | ||
| insertCSSOnAllTabs() { | ||
| // When first loaded, add CSS for open tabs. | ||
| var gettingAllTabs = browser.tabs.query({}); |
pdehaan
Dec 6, 2017
Contributor
/Users/pdehaan/dev/github/mozilla/addon-wr/addon/webextension/background.js
80:5 error Unexpected var, use let or const instead no-var
101:5 error Unexpected var, use let or const instead no-var
gregglind
and others
added some commits
Dec 6, 2017
pdehaan
closed this
Dec 7, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
pdehaan commentedDec 6, 2017
No description provided.