Skip to content

Commit

Permalink
lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
cheapsteak committed Oct 9, 2020
1 parent e4cfd3b commit 8f544c8
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 30 deletions.
16 changes: 7 additions & 9 deletions .eslintrc.js
@@ -1,12 +1,10 @@
module.exports = {
"globals": {
globals: {
ga: false,
},
"extends": ["react-app", "prettier"],
"plugins": [
"prettier"
],
"rules": {
"prettier/prettier": "error"
}
}
extends: ['react-app', 'prettier'],
plugins: ['prettier'],
rules: {
'prettier/prettier': 'error',
},
};
23 changes: 11 additions & 12 deletions packages/frontend/src/graph/chart/lineChart.js
Expand Up @@ -111,9 +111,10 @@ export function lineChart() {
);

if (rightAlignYAxis) {
g
.select('.nv-y.nv-axis')
.attr('transform', 'translate(' + availableWidth + ',0)');
g.select('.nv-y.nv-axis').attr(
'transform',
'translate(' + availableWidth + ',0)',
);
}

//Set up interactive layer
Expand All @@ -126,8 +127,7 @@ export function lineChart() {
.xScale(x);
wrap.select('.nv-interactive').call(interactiveLayer);

g
.select('.nv-focus .nv-background rect')
g.select('.nv-focus .nv-background rect')
.attr('width', availableWidth)
.attr('height', availableHeight1);

Expand Down Expand Up @@ -157,18 +157,17 @@ export function lineChart() {
// Update Axes
//============================================================

g
.select('.nv-focus .nv-x.nv-axis')
.attr('transform', 'translate(0,' + availableHeight1 + ')');
g.select('.nv-focus .nv-x.nv-axis').attr(
'transform',
'translate(0,' + availableHeight1 + ')',
);

linesWrap.call(lines);
g
.select('.nv-focus .nv-x.nv-axis')
g.select('.nv-focus .nv-x.nv-axis')
.transition()
.duration(duration)
.call(xAxis);
g
.select('.nv-focus .nv-y.nv-axis')
g.select('.nv-focus .nv-y.nv-axis')
.transition()
.duration(duration)
.call(yAxis);
Expand Down
4 changes: 3 additions & 1 deletion packages/frontend/src/home/fetchBundlesSizes.js
Expand Up @@ -8,7 +8,9 @@ async function fetchBundleSize(pkgName) {
const format = input =>
input > 1048576
? `${parse(input / 1048576)} MB`
: input > 1024 ? `${parse(input / 1024)} KB` : `${input} B`;
: input > 1024
? `${parse(input / 1024)} KB`
: `${input} B`;

return {
gzip: format(data.gzip),
Expand Down
4 changes: 3 additions & 1 deletion packages/frontend/src/home/home.js
Expand Up @@ -334,6 +334,8 @@ export default withRender({
components: {
'package-input': packageInput,
graph: () =>
import(/* webpackPrefetch: true, webpackChunkName: "graph" */ '../graph/graph'),
import(
/* webpackPrefetch: true, webpackChunkName: "graph" */ '../graph/graph'
),
},
});
2 changes: 1 addition & 1 deletion packages/frontend/src/packages/packages.js
@@ -1,6 +1,6 @@
import withRender from './packages.html';
export const packages = [];
export const emitter = new (require('events')).EventEmitter();
export const emitter = new (require('events').EventEmitter)();

export function addPackage(name, notify = true) {
packages.indexOf(name) === -1 && packages.push(name);
Expand Down
4 changes: 1 addition & 3 deletions packages/utils/getMinimalUrl.js
Expand Up @@ -7,8 +7,6 @@ module.exports = urlString => {
const outgoingQueryParams = querystring.stringify(
Object.assign({}, queryParams, { minimal: true }),
);
const embedUrl = `${parsedUrl.protocol}//${parsedUrl.host}${
parsedUrl.pathname
}?${outgoingQueryParams}`;
const embedUrl = `${parsedUrl.protocol}//${parsedUrl.host}${parsedUrl.pathname}?${outgoingQueryParams}`;
return embedUrl;
};
4 changes: 1 addition & 3 deletions packages/utils/stats/fetchPackagesStats.js
Expand Up @@ -14,9 +14,7 @@ module.exports = (packageNames, startDate, endDate) => {
.then(response => {
if (!response.ok) {
console.warn(
`Unexpected HTTP response from url=${url}: status:${
response.status
}: "${response.statusText}"`,
`Unexpected HTTP response from url=${url}: status:${response.status}: "${response.statusText}"`,
);
return fetchStats(); // Try next URL
}
Expand Down

0 comments on commit 8f544c8

Please sign in to comment.