Enable eqeqeq

This enables the eqeqeq linting rule from eslint-config-openstack,
and corrects any errors found.

http://eslint.org/docs/rules/eqeqeq

Change-Id: Iad857ae3f9963c7cb93c494d351c3908d87cd4a0
This commit is contained in:
Michael Krotscheck 2015-11-23 10:32:47 -08:00
parent 7d70958e8b
commit 06f1547add
4 changed files with 4 additions and 5 deletions

View File

@ -30,7 +30,6 @@ rules:
brace-style: 1
strict: 1
no-extra-parens: 1
eqeqeq: 1
consistent-return: 1
callback-return: 1
guard-for-in: 1

View File

@ -129,7 +129,7 @@
function noValueFilter() {
return function (input) {
if (input === null || angular.isUndefined(input) ||
(angular.isString(input) && '' == input.trim())) {
(angular.isString(input) && '' === input.trim())) {
return gettext('-');
} else {
return input;

View File

@ -139,7 +139,7 @@
angular.forEach(facets, function(facet) {
var facetParts = facet.split('=');
angular.forEach($scope.facetsObj, function (value) {
if (value.name == facetParts[0]) {
if (value.name === facetParts[0]) {
if (angular.isUndefined(value.options)) {
$scope.currentSearch.push({
'name': facet,
@ -154,7 +154,7 @@
} else {
angular.forEach(value.options, function (option) {
if (option.key == facetParts[1]) {
if (option.key === facetParts[1]) {
$scope.currentSearch.push({
'name': facet,
'label': [value.label, option.label]

View File

@ -100,7 +100,7 @@
if (scope.filterFacets) {
var isServerFacet = scope.filterFacets.some(function checkIsServer(facet) {
return facet.name == predString && facet.isServer;
return facet.name === predString && facet.isServer;
});
if (isServerFacet) {