Skip to content

Commit db0f189

Browse files
committed
Linting
1 parent cbc9e80 commit db0f189

3 files changed

Lines changed: 8 additions & 7 deletions

File tree

lib/commonConfig.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ function getConfig() {
516516
function getConfigForTypeInformation() {
517517
// Just return relevant configuration flags
518518
// avoid to include server, authentication, mongodb, orion and iotamanger info
519-
let conf = {
519+
const conf = {
520520
timestamp: config.timestamp,
521521
defaultResource: config.defaultResource,
522522
explicitAttrs: config.explicitAttrs,

lib/services/ngsi/entities-NGSI-LD.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ function convertAttrNGSILD(attr) {
6565
// Properties
6666
case 'property':
6767
hasValueType = false;
68+
break;
6869
case 'string':
6970
case 'text':
7071
case 'textunrestricted':
@@ -102,7 +103,9 @@ function convertAttrNGSILD(attr) {
102103
case 'array':
103104
try {
104105
obj.value = JSON.parse(attr.value);
105-
} catch (e) {}
106+
} catch (e) {
107+
// Do nothing
108+
}
106109
break;
107110

108111
// Temporal Properties
@@ -179,21 +182,21 @@ function convertAttrNGSILD(attr) {
179182
obj.vocab = attr.value;
180183
delete obj.value;
181184
break;
182-
// VocabProperties
185+
// JsonProperties
183186
case 'jsonproperty':
184187
hasValueType = false;
185188
obj.type = 'JsonProperty';
186189
obj.json = attr.value;
187190
delete obj.value;
188191
break;
189-
// VocabProperties
192+
// ListProperties
190193
case 'listproperty':
191194
hasValueType = false;
192195
obj.type = 'ListProperty';
193196
obj.listValue = attr.value;
194197
delete obj.value;
195198
break;
196-
// VocabProperties
199+
// ListRelationship
197200
case 'listrelationship':
198201
hasValueType = false;
199202
obj.type = 'ListRelationship';

test/unit/ngsi-ld/ngsiService/value-types-test.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,7 @@
2828
const iotAgentLib = require('../../../../lib/fiware-iotagent-lib');
2929
const utils = require('../../../tools/utils');
3030
const should = require('should');
31-
const logger = require('logops');
3231
const nock = require('nock');
33-
const timekeeper = require('timekeeper');
3432
let contextBrokerMock;
3533
const iotAgentConfig = {
3634
logLevel: 'FATAL',

0 commit comments

Comments
 (0)