Skip to content
Permalink
Browse files

Adding concurrently and cleaning old release scripts (#717)

* Adding concurrently and cleaning old release scripts

* Linting and scripts consolidation with BCR

* Fixing position of rimraf
  • Loading branch information...
Golodhros committed May 15, 2019
1 parent 34207b9 commit 965079663ada8a462d6357f39f35cbb41ce7bfe0
@@ -2,7 +2,7 @@ engines:
eslint:
enabled: true
config:
config: .eslintrc.json
config: .eslintrc.js

ratings:
paths:
@@ -16,4 +16,4 @@ exclude_paths:
- "demos"
- "sandbox"
- "src/doc"
- "src/tasks"
- "src/tasks"

Large diffs are not rendered by default.

@@ -0,0 +1,50 @@
module.exports = {
env: {
es6: true,
browser: true,
jasmine: true,
amd: true,
},
parserOptions: {
sourceType: 'module',
"ecmaFeatures": {
"experimentalObjectRestSpread": true
},
},
globals: {
sinon: true,
},
rules: {
'block-scoped-var': 1,
'comma-style': [2, 'last'],
'complexity': 1,
'consistent-this': [0, 'self'],
'default-case': 1,
'dot-notation': 0,
'guard-for-in': 1,
'keyword-spacing': 1,
'newline-after-var': 1,
'no-alert': 2,
'no-console': 2,
'no-debugger': 2,
'no-div-regex': 1,
'no-eq-null': 1,
'no-floating-decimal': 1,
'no-multiple-empty-lines': [2, {'max': 2}],
'no-nested-ternary': 1,
'no-param-reassign': 0,
'no-self-compare': 1,
'no-throw-literal': 1,
'no-void': 1,
'no-unused-vars': [1, {'varsIgnorePattern': '[d3Transition]'}],
'no-underscore-dangle': 0,
'quotes': [2, 'single'],
'one-var': [1, {
'var': 'always',
'const': 'never',
}],
'radix': 1,
'vars-on-top' : 1,
'wrap-iife': [2, 'inside'],
},
};

This file was deleted.

@@ -33,20 +33,21 @@
"demos:compile": "webpack --progress --colors --env=demos",
"demos:watch": "webpack --watch --progress --colors --env=demos",
"demos:serve": "webpack-dev-server --content-base docs/ --inline --hot --port 8001 --env=demos",
"start": "concurrently \"yarn run docs\" \"yarn run demos:serve\" \"yarn run sandbox\"",
"styles": "grunt lint && grunt sass && grunt cssmin",
"docs": "webpack --env=demos && yarn run styles && grunt docs",
"build": "webpack --env=production && yarn run styles",
"untrack": "grunt untrack",
"release": "grunt release:patch",
"release:minor": "grunt release:minor",
"release:major": "grunt release:major",
"prebuild": "yarn run styles",
"build": "webpack --env=production",
"lint": "eslint src/charts/ webpack.*.js --cache",
"lint:fix": "eslint src/charts/ webpack.*.js --cache --fix",
"test": "karma start --env=test",
"test:travis": "karma start --single-run --browsers PhantomJS --env=test",
"watch": "grunt watch",
"sandbox:compile": "webpack --env=sandbox",
"sandbox": "webpack-dev-server --env=sandbox --hot --content-base sandbox/ --inline",
"clean": "yarn cache clean && rm -rf node_modules",
"doot": "webpack --env=test"
"clean": "yarn cache clean && rimraf node_modules",
"release": "grunt release:patch",
"release:minor": "grunt release:minor",
"release:major": "grunt release:major"
},
"repository": {
"type": "git",
@@ -81,6 +82,7 @@
"babel-preset-es2015": "^6.18.0",
"babel-preset-stage-0": "^6.5.0",
"brace": "0.10.0",
"concurrently": "^4.1.0",
"css-loader": "0.28.4",
"eslint": "^5.16.0",
"eslint-loader": "^2.1.2",
@@ -118,6 +120,7 @@
"moment": "2.24.0",
"node-gyp": "4.0.0",
"node-sass": "4.12.0",
"rimraf": "^2.6.3",
"phantomjs-polyfill-find": "ptim/phantomjs-polyfill-find",
"prismjs": "1.16.0",
"pubsub-js": "1.7.0",
@@ -706,7 +706,7 @@ define(function (require) {
* Click handler, shows data that was clicked and passes to the user
* @private
*/
function handleCustomClick (e, d) {
function handleCustomClick (e) {
let [mouseX, mouseY] = getMousePosition(e);
let dataPoint = isHorizontal ? getNearestDataPoint2(mouseY) : getNearestDataPoint(mouseX);

@@ -44,6 +44,7 @@ define(function(require) {
*/
function exportChart(d3svg, filename, title) {
if (isIE) {
// eslint-disable-next-line no-console
console.error(IE_ERROR_MSG);

return false;
@@ -681,18 +681,16 @@ define(function(require) {
*/
function calcLinearRegression() {
let n = dataPoints.length,
x = 0,
y = 0,
xy = 0,
x2 = 0,
y2 = 0;
x = 0,
y = 0,
xy = 0,
x2 = 0;

dataPoints.forEach(d => {
x += d.x;
y += d.y;
xy += d.x * d.y;
x2 += d.x * d.x;
y2 += d.y * d.y;
});

const denominator = (n * x2) - (x * x);
@@ -5,6 +5,7 @@ $bar-color-hover: $bc-e-green-600;
$bar-stroke-width: 0;

.bar-chart {

// Bars
.bar {
shape-rendering: crispEdges;

This file was deleted.

This file was deleted.

@@ -30,12 +30,4 @@ module.exports = function(grunt) {

grunt.task.run(bumpTask);
});

grunt.registerTask('bump-dist', function() {
shell.exec(path.resolve(__dirname, './helpers/push_dist.sh'));
});

grunt.registerTask('untrack', function() {
shell.exec(path.resolve(__dirname, './helpers/untrack.sh'));
});
};

0 comments on commit 9650796

Please sign in to comment.
You can’t perform that action at this time.