From fc8886371a1b548cad0799abef0f910f1f7957bd Mon Sep 17 00:00:00 2001 From: Ali Sheehan-Dare Date: Tue, 20 Sep 2016 17:05:20 +0100 Subject: [PATCH] chore: fix build issues (#5) --- packages/d3fc-annotation/.eslintrc.json | 13 +----------- packages/d3fc-annotation/.travis.yml | 4 ++-- packages/d3fc-annotation/examples/chart.js | 6 +++--- .../d3fc-annotation/examples/crosshair.js | 20 +++++++++---------- packages/d3fc-annotation/package.json | 6 ++---- 5 files changed, 18 insertions(+), 31 deletions(-) diff --git a/packages/d3fc-annotation/.eslintrc.json b/packages/d3fc-annotation/.eslintrc.json index 14518e13f..58c7a0711 100644 --- a/packages/d3fc-annotation/.eslintrc.json +++ b/packages/d3fc-annotation/.eslintrc.json @@ -1,14 +1,3 @@ { - "extends": "standard", - "env": { - "jasmine": true - }, - "rules": { - "semi": [1, "always"], - "indent": [2, 4], - "space-before-function-paren": [2, "never"], - "padded-blocks": 0, - "no-multi-spaces": 0, - "no-unused-vars": 0 - } + "extends": "./node_modules/d3fc-scripts/.eslintrc.json" } diff --git a/packages/d3fc-annotation/.travis.yml b/packages/d3fc-annotation/.travis.yml index 62762659f..f7b59373e 100644 --- a/packages/d3fc-annotation/.travis.yml +++ b/packages/d3fc-annotation/.travis.yml @@ -6,9 +6,9 @@ cache: notifications: email: false node_js: - - '4' + - '5.7' before_install: - - npm i -g npm@^2.0.0 + - npm i -g npm@^3.0.0 before_script: - npm prune after_success: diff --git a/packages/d3fc-annotation/examples/chart.js b/packages/d3fc-annotation/examples/chart.js index 69af43e50..2e7d099e2 100644 --- a/packages/d3fc-annotation/examples/chart.js +++ b/packages/d3fc-annotation/examples/chart.js @@ -23,15 +23,15 @@ function render() { var svg = d3.select('svg'); xAxisJoin(svg, function(d) { return [d]; }) - .attr('transform', 'translate(0, ' + (height - 20) +')') + .attr('transform', 'translate(0, ' + (height - 20) + ')') .call(xAxis); yAxisJoin(svg, function(d) { return [d]; }) - .attr('transform', 'translate(' + (width - 30) +', 0)') + .attr('transform', 'translate(' + (width - 30) + ', 0)') .call(yAxis); if (typeof renderComponent === 'function') { - renderComponent(); + renderComponent(); } requestAnimationFrame(render); diff --git a/packages/d3fc-annotation/examples/crosshair.js b/packages/d3fc-annotation/examples/crosshair.js index 35ab8adaa..adeba525c 100644 --- a/packages/d3fc-annotation/examples/crosshair.js +++ b/packages/d3fc-annotation/examples/crosshair.js @@ -6,18 +6,18 @@ var crosshair = fc.annotationSvgCrosshair() .xScale(xScale) .yScale(yScale) .xLabel(function(d) { - var format = d3.format('.2f'); - var value = xScale.invert(d.x); - return format(value); + var format = d3.format('.2f'); + var value = xScale.invert(d.x); + return format(value); }) .yLabel(function(d) { - var format = d3.format('.2f'); - var value = yScale.invert(d.y); - return format(value); + var format = d3.format('.2f'); + var value = yScale.invert(d.y); + return format(value); }) .decorate(function(g) { - g.selectAll('.point>path') - .attr('transform', 'scale(10)'); + g.selectAll('.point>path') + .attr('transform', 'scale(10)'); }); var data = [{ x: 215, y: 106 }]; @@ -28,8 +28,8 @@ function renderComponent() { .datum(data) .call(crosshair) .on('mousemove', function() { - var point = d3.mouse(this); - data[0] = { x: point[0], y: point[1] }; + var point = d3.mouse(this); + data[0] = { x: point[0], y: point[1] }; }); } diff --git a/packages/d3fc-annotation/package.json b/packages/d3fc-annotation/package.json index caf867d37..fad72bfea 100644 --- a/packages/d3fc-annotation/package.json +++ b/packages/d3fc-annotation/package.json @@ -15,16 +15,14 @@ }, "scripts": { "bundle": "d3fc-scripts bundle", - "test": "eslint examples/**/*.js && d3fc-scripts test", + "test": "d3fc-scripts test", "semantic-release": "semantic-release pre && npm publish && semantic-release post" }, "devDependencies": { "d3-axis": "^1.0.3", "d3-shape": "^1.0.3", "d3fc-scripts": "^1.1.4", - "eslint-config-defaults": "^9.0.0", - "webshot": "^0.18.0", - "semantic-release": "^4.3.5" + "webshot": "^0.18.0" }, "dependencies": { "d3-scale": "^1.0.1",