fix: no-multi-spaces

```
/Users/1ambda/github/apache/apache-zeppelin/zeppelin-master/zeppelin-web/src/app/notebook/paragraph/result/result.controller.js (4/0)
  ✖  403:21  Multiple spaces found before 'elem'  no-multi-spaces
  ✖  415:21  Multiple spaces found before 'elem'  no-multi-spaces
  ✖  437:21  Multiple spaces found before 'elem'  no-multi-spaces
  ✖  715:28  Multiple spaces found before '('     no-multi-spaces

/Users/1ambda/github/apache/apache-zeppelin/zeppelin-master/zeppelin-web/src/app/tabledata/pivot.js (1/0)
  ✖  247:49  Multiple spaces found before 'p'  no-multi-spaces

/Users/1ambda/github/apache/apache-zeppelin/zeppelin-master/zeppelin-web/src/app/visualization/builtins/visualization-scatterchart.js (1/0)
  ✖  271:42  Multiple spaces found before '',''  no-multi-spaces
```
This commit is contained in:
1ambda 2017-04-15 00:45:06 +09:00
parent 1de9a8d2f8
commit 131c901d47
8 changed files with 13 additions and 14 deletions

View file

@ -33,7 +33,6 @@
"rules": {
"prefer-rest-params": 0,
"no-useless-constructor": 0,
"no-multi-spaces": 0,
"no-unused-expressions": 0,
"space-infix-ops": 0,
"no-empty": 0,

View file

@ -27,7 +27,7 @@ function CredentialCtrl($scope, $rootScope, $http, baseUrlSrv, ngToast) {
var getCredentialInfo = function() {
$http.get(baseUrlSrv.getRestApiBase() + '/credential')
.success(function(data, status, headers, config) {
$scope.credentialInfo = _.map(data.body.userCredentials, function(value, prop) {
$scope.credentialInfo = _.map(data.body.userCredentials, function(value, prop) {
return {entity: prop, password: value.password, username: value.username};
});
console.log('Success %o %o', status, $scope.credentialInfo);
@ -58,7 +58,7 @@ function CredentialCtrl($scope, $rootScope, $http, baseUrlSrv, ngToast) {
return;
}
var newCredential = {
var newCredential = {
'entity': $scope.entity,
'username': $scope.username,
'password': $scope.password

View file

@ -163,7 +163,7 @@ export default function HeliumCtrl($scope, $rootScope, $sce,
});
if (filteredPkgSearchResults.length > 0) {
license = filteredPkgSearchResults[0].pkg.license;
license = filteredPkgSearchResults[0].pkg.license;
}
} else {
license = filteredPkgSearchResults[0].license;

View file

@ -723,7 +723,7 @@ function NotebookCtrl($scope, $route, $routeParams, $location, $rootScope,
message: 'Do you want to restart ' + interpreter.name + ' interpreter?',
callback: function(result) {
if (result) {
var payload = {
var payload = {
'noteId': $scope.note.id
};
@ -839,7 +839,7 @@ function NotebookCtrl($scope, $route, $routeParams, $location, $rootScope,
if ($scope.note.config.personalizedMode === undefined) {
$scope.note.config.personalizedMode = 'false';
}
$scope.note.config.personalizedMode = personalizedMode === 'true' ? 'false' : 'true';
$scope.note.config.personalizedMode = personalizedMode === 'true' ? 'false' : 'true';
websocketMsgSrv.updatePersonalizedMode($scope.note.id, $scope.note.config.personalizedMode);
}
}
@ -1000,7 +1000,7 @@ function NotebookCtrl($scope, $route, $routeParams, $location, $rootScope,
getInterpreterBindings();
getPermissions();
var isPersonalized = $scope.note.config.personalizedMode;
isPersonalized = isPersonalized === undefined ? 'false' : isPersonalized;
isPersonalized = isPersonalized === undefined ? 'false' : isPersonalized;
$scope.note.config.personalizedMode = isPersonalized;
});

View file

@ -68,7 +68,7 @@ describe('Controller: NotebookCtrl', function() {
var oneHour = scope.getCronOptionNameFromValue('0 0 0/1 * * ?');
var threeHours = scope.getCronOptionNameFromValue('0 0 0/3 * * ?');
var sixHours = scope.getCronOptionNameFromValue('0 0 0/6 * * ?');
var twelveHours = scope.getCronOptionNameFromValue('0 0 0/12 * * ?');
var twelveHours = scope.getCronOptionNameFromValue('0 0 0/12 * * ?');
var oneDay = scope.getCronOptionNameFromValue('0 0 0 * * ?');
expect(none).toEqual('');

View file

@ -400,7 +400,7 @@ function ResultCtrl($scope, $rootScope, $route, $window, $routeParams, $location
/*eslint new-cap: [2, {"capIsNewExceptions": ["MathJax.Hub.Queue"]}]*/
MathJax.Hub.Queue(['Typeset', MathJax.Hub, elem[0]]);
},
(error) => { elem.html(`${error.stack}`); }
(error) => { elem.html(`${error.stack}`); }
);
};
@ -412,7 +412,7 @@ function ResultCtrl($scope, $rootScope, $route, $window, $routeParams, $location
elem.html(generated);
$compile(elem.contents())(paragraphScope);
},
(error) => { elem.html(`${error.stack}`); }
(error) => { elem.html(`${error.stack}`); }
);
};
@ -434,7 +434,7 @@ function ResultCtrl($scope, $rootScope, $route, $window, $routeParams, $location
elem.bind('mousewheel', (e) => { $scope.keepScrollDown = false; });
},
(error) => { elem.html(`${error.stack}`); }
(error) => { elem.html(`${error.stack}`); }
);
};
@ -712,7 +712,7 @@ function ResultCtrl($scope, $rootScope, $route, $window, $routeParams, $location
var row = tableData.rows[r];
var dsvRow = '';
for (var index in row) {
var stringValue = (row[index]).toString();
var stringValue = (row[index]).toString();
if (stringValue.indexOf(delimiter) > -1) {
dsvRow += '"' + stringValue + '"' + delimiter;
} else {

View file

@ -244,7 +244,7 @@ export default class PivotTransformation extends Transformation {
} else {
p[valueKey] = {
value: aggrFunc[value.aggr](p[valueKey].value, row[value.index], p[valueKey].count + 1),
count: (aggrFuncDiv[value.aggr]) ? p[valueKey].count + 1 : p[valueKey].count
count: (aggrFuncDiv[value.aggr]) ? p[valueKey].count + 1 : p[valueKey].count
};
}
}

View file

@ -268,7 +268,7 @@ export default class ScatterchartVisualization extends Nvd3ChartVisualization {
grp = row[group.index];
}
var key = xValue + ',' + yValue + ',' + grp;
var key = xValue + ',' + yValue + ',' + grp;
if (!rows[key]) {
rows[key] = {