Browse Source

Fix lint errors

pull/4/head
Luke Childs 6 years ago
parent
commit
679b33e343
  1. 2
      src/lib/inject-chart-profile-hover.js
  2. 2
      src/lib/inject-chart-profile-page.js
  3. 2
      src/lib/preload-data.js
  4. 4
      src/lib/webextension-fetch.js
  5. 2
      webpack.config.js

2
src/lib/inject-chart-profile-hover.js

@ -10,7 +10,7 @@ const injectChartProfileHover = async () => {
profileCard.dataset.coinflict = true; profileCard.dataset.coinflict = true;
const userId = profileHoverContainer.dataset.userId; const {userId} = profileHoverContainer.dataset;
const biases = await buildBiasElement(userId); const biases = await buildBiasElement(userId);
const negativeMargin = 12; const negativeMargin = 12;

2
src/lib/inject-chart-profile-page.js

@ -9,7 +9,7 @@ const injectChartProfilePage = async () => {
profileHeaderCard.dataset.coinflict = true; profileHeaderCard.dataset.coinflict = true;
const userId = document.querySelector('.ProfileNav').dataset.userId; const {userId} = document.querySelector('.ProfileNav').dataset;
const biases = await buildBiasElement(userId); const biases = await buildBiasElement(userId);
const bio = profileHeaderCard.querySelector('.ProfileHeaderCard-bio'); const bio = profileHeaderCard.querySelector('.ProfileHeaderCard-bio');

2
src/lib/preload-data.js

@ -10,7 +10,7 @@ const scrapeDataAttribute = dataAttribute => {
const preloadData = () => { const preloadData = () => {
new Set([ new Set([
...scrapeDataAttribute('user-id'), ...scrapeDataAttribute('user-id'),
...scrapeDataAttribute('mention-user-id'), ...scrapeDataAttribute('mention-user-id')
]).forEach(getData); ]).forEach(getData);
}; };

4
src/lib/webextension-fetch.js

@ -7,7 +7,7 @@ const serializeResponse = async response => {
for (const [header, value] of headers.entries()) { for (const [header, value] of headers.entries()) {
serializedResponse.headers[header] = value; serializedResponse.headers[header] = value;
}; }
serializedResponse.body = [...new Uint8Array(await response.arrayBuffer())]; serializedResponse.body = [...new Uint8Array(await response.arrayBuffer())];
@ -36,7 +36,7 @@ webextensionFetch.listen = () => {
if (contentScriptQuery === 'webextension-fetch') { if (contentScriptQuery === 'webextension-fetch') {
const response = await fetch(input, init); const response = await fetch(input, init);
return await serializeResponse(response); return serializeResponse(response);
} }
}); });
}; };

2
webpack.config.js

@ -4,7 +4,7 @@ const CopyWebpackPlugin = require('copy-webpack-plugin');
module.exports = () => ({ module.exports = () => ({
entry: { entry: {
content: './src/content', content: './src/content',
background: './src/background', background: './src/background'
}, },
output: { output: {
path: path.join(__dirname, 'dist'), path: path.join(__dirname, 'dist'),

Loading…
Cancel
Save