mozilla / security-advisor-shield-study

Mozilla Public License 2.0
2 stars 7 forks source link

Bump ESLint dependencies and fix some warnings/errors #46

Open pdehaan opened 7 years ago

pdehaan commented 7 years ago

Currently fails locally and on Circle with the following:

$ ./node_modules/.bin/eslint lib data test index.js

/home/ubuntu/security-advisor-shield-study/lib/Advisor.js
  167:27  error  'self' is not defined  no-undef

/home/ubuntu/security-advisor-shield-study/lib/variations.js
   7:20  warning  Missing function expression name  func-names
  11:22  warning  Missing function expression name  func-names

✖ 3 problems (1 error, 2 warnings)

I'm guessing the lib/Advisor.js:167 is a legit bug:

160:  createDisableForeverListener() {
161:    this.panel.port.on('disableForever', () => {
162:      this.panel.hide();
163:      const win = tabs.activeTab.window;
164:      const button = this.getButton(win);
165:      button.hide();
166:      simpleStorage.storage.recData = undefined; // clear all recs
167:      this.uninstallAddon(self.id, ''); // <===THIS LINE RIGHT HERE
168:    });
169:  }

$0.02 says the self.id should be this.id.

Osmose commented 7 years ago

$0.02 says the self.id should be this.id.

Actually it should probably be sdkData.id, as it's probably referring to the Add-on SDK self module.

pdehaan commented 7 years ago

r? @Osmose