mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
fix: prefer-spread
``` /Users/1ambda/github/apache/apache-zeppelin/zeppelin-master/zeppelin-web/src/app/visualization/builtins/visualization-piechart.js (1/0) ✖ 65:11 Use the spread operator instead of '.apply()' prefer-spread /Users/1ambda/github/apache/apache-zeppelin/zeppelin-master/zeppelin-web/src/app/visualization/builtins/visualization-table.js (1/0) ✖ 39:19 Use the spread operator instead of '.apply()' prefer-spread ```
This commit is contained in:
parent
a20d20e329
commit
a5947da10d
3 changed files with 2 additions and 2 deletions
|
|
@ -31,7 +31,6 @@
|
|||
"process": false
|
||||
},
|
||||
"rules": {
|
||||
"prefer-spread": 0,
|
||||
"no-redeclare": 0,
|
||||
"no-var": 0,
|
||||
"semi": 0,
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ export default class PiechartVisualization extends Nvd3ChartVisualization {
|
|||
});
|
||||
// the map function returns d3g as a nested array
|
||||
// [].concat flattens it, http://stackoverflow.com/a/10865042/5154397
|
||||
d3g = [].concat.apply([], d3g);
|
||||
d3g = [].concat.apply([], d3g); // eslint-disable-line prefer-spread
|
||||
super.render({d3g: d3g});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ export default class TableVisualization extends Visualization {
|
|||
var container = this.targetEl.css('height', height).get(0);
|
||||
var resultRows = tableData.rows;
|
||||
var columnNames = _.pluck(tableData.columns, 'name');
|
||||
// eslint-disable-next-line prefer-spread
|
||||
var columns = Array.apply(null, Array(tableData.columns.length)).map(function () {
|
||||
return {type: 'text'};
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue