Skip to content

Commit f2f7a7f

Browse files
committed
MLE-24763 Lint: Replacing double quotes
1 parent 95d1807 commit f2f7a7f

19 files changed

+105
-105
lines changed

lib/basic-loader.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ function loadFile(callback, options) {
3333

3434
const documentDescriptor = options.documentDescriptor;
3535
if (documentDescriptor === void 0 || documentDescriptor == null) {
36-
throw new Error(`loadFile requires fileDescriptor option`);
36+
throw new Error('loadFile requires fileDescriptor option');
3737
}
3838

3939
fs.readFile(filePath, 'utf8', (err, data) => {
@@ -52,7 +52,7 @@ function loadFileStream(options) {
5252

5353
const documentMetadata = options.documentMetadata;
5454
if (documentMetadata === void 0 || documentMetadata == null) {
55-
throw new Error(`loadFileStream requires documentMetadata option`);
55+
throw new Error('loadFileStream requires documentMetadata option');
5656
}
5757

5858
let uriPrefix = options.uriPrefix;

lib/documents.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ Documents.prototype.advanceLsqt = function temporalAdvanceLsqt() {
526526
/** @ignore */
527527
function readStatusValidator(statusCode) {
528528
return (statusCode < 400 || statusCode === 404) ?
529-
null : "response with invalid "+statusCode+" status";
529+
null : 'response with invalid '+statusCode+' status';
530530
}
531531
/** @ignore */
532532
function singleReadOutputTransform(headers, data) {

lib/endpoint-proxy.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ function expandDataDeclaration(id, dataDeclaration) {
394394
function expandParamDeclaration(paramDeclaration) {
395395
const paramName = paramDeclaration.name;
396396
if (paramName === void 0 || paramName === null) {
397-
throw new Error(`missing parameter name`);
397+
throw new Error('missing parameter name');
398398
}
399399

400400
expandDataDeclaration('${paramName} parameter', paramDeclaration);
@@ -471,7 +471,7 @@ function expandReturnDeclaration(returnDeclaration) {
471471
function expandFunctionDeclaration(functionDeclaration) {
472472
const functionName = functionDeclaration.functionName;
473473
if (functionName === void 0 || functionName === null) {
474-
throw new Error(`missing function name`);
474+
throw new Error('missing function name');
475475
}
476476

477477
let paramsKind = 'empty';
@@ -566,7 +566,7 @@ function expandFunctionDeclaration(functionDeclaration) {
566566
}
567567
function expandEndpointDeclaration(endpointDeclaration) {
568568
const moduleExtension = endpointDeclaration.moduleExtension;
569-
if (typeof moduleExtension !== "string" || moduleExtension.length === 0) {
569+
if (typeof moduleExtension !== 'string' || moduleExtension.length === 0) {
570570
throw new Error('invalid module extension configuration: ' + moduleExtension);
571571
} else if (!moduleExtension.startsWith('.')) {
572572
endpointDeclaration.moduleExtension = '.' + moduleExtension;

lib/endpointDeclarationValidator.js

Lines changed: 53 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -6,76 +6,76 @@
66
const Ajv = require('ajv');
77

88
const endpointDeclarationSchema =
9-
{"$schema": "http://json-schema.org/draft-07/schema#",
10-
"title": "MarkLogic Endpoint Function Declaration",
11-
"$comment": "SIMPLIFIED TO THE STABLE DECLARATIONS USED FOR CODE GENERATION",
12-
"type": "object",
13-
"definitions": {
14-
"desc": {
15-
"type":"string", "description":"Documentation about the property"
9+
{'$schema': 'http://json-schema.org/draft-07/schema#',
10+
'title': 'MarkLogic Endpoint Function Declaration',
11+
'$comment': 'SIMPLIFIED TO THE STABLE DECLARATIONS USED FOR CODE GENERATION',
12+
'type': 'object',
13+
'definitions': {
14+
'desc': {
15+
'type':'string', 'description':'Documentation about the property'
1616
},
17-
"datatype": {
18-
"type":"string", "description":"The type of the value",
19-
"enum":[
20-
"boolean", "date", "dateTime", "dayTimeDuration", "decimal", "double", "float",
21-
"int", "long", "string", "time", "unsignedInt", "unsignedLong",
22-
"array", "object",
23-
"binaryDocument", "jsonDocument", "textDocument", "xmlDocument",
24-
"session"
17+
'datatype': {
18+
'type':'string', 'description':'The type of the value',
19+
'enum':[
20+
'boolean', 'date', 'dateTime', 'dayTimeDuration', 'decimal', 'double', 'float',
21+
'int', 'long', 'string', 'time', 'unsignedInt', 'unsignedLong',
22+
'array', 'object',
23+
'binaryDocument', 'jsonDocument', 'textDocument', 'xmlDocument',
24+
'session'
2525
]
2626
},
27-
"nullable": {
28-
"type":"boolean", "description":"Whether a null value is allowed",
29-
"default":false
27+
'nullable': {
28+
'type':'boolean', 'description':'Whether a null value is allowed',
29+
'default':false
3030
},
31-
"multiple": {
32-
"type":"boolean", "description":"Whether multiple values are allowed",
33-
"default":false
31+
'multiple': {
32+
'type':'boolean', 'description':'Whether multiple values are allowed',
33+
'default':false
3434
}
3535
// "$comment": "SIMPLIFIED BY DELETING doubleMeter, doubleLiteral, ulMeter, AND unsignedLongLiteral"
3636
},
37-
"propertyNames": {
37+
'propertyNames': {
3838
// "$comment": "MODIFIED TO ALLOW FOR PROPERTIES DELETED DURING SIMPLIFICATION OR ADDED IN LATER RELEASES",
39-
"pattern": "^\\$?[A-Za-z_][\\w.-]*$"
39+
'pattern': '^\\$?[A-Za-z_][\\w.-]*$'
4040
},
41-
"properties": {
42-
"functionName": {
43-
"type":"string", "description":"The name of a database function provided by a service declared by service.json"
41+
'properties': {
42+
'functionName': {
43+
'type':'string', 'description':'The name of a database function provided by a service declared by service.json'
4444
},
45-
"endpoint": {
46-
"type":"string", "description":"The full path name of a standalone bulk IO endpoint"
45+
'endpoint': {
46+
'type':'string', 'description':'The full path name of a standalone bulk IO endpoint'
4747
},
48-
"desc": {"$ref":"#/definitions/desc"},
49-
"params": {
50-
"type":"array", "description":"The parameters of the function",
51-
"items": {
52-
"type":"object",
53-
"required": ["name", "datatype"],
54-
"propertyNames": {
55-
"pattern": "^(\\$[A-Za-z_][\\w.-]*|name|desc|datatype|nullable|multiple)$"
48+
'desc': {'$ref':'#/definitions/desc'},
49+
'params': {
50+
'type':'array', 'description':'The parameters of the function',
51+
'items': {
52+
'type':'object',
53+
'required': ['name', 'datatype'],
54+
'propertyNames': {
55+
'pattern': '^(\\$[A-Za-z_][\\w.-]*|name|desc|datatype|nullable|multiple)$'
5656
},
57-
"properties": {
58-
"name": {
59-
"type":"string", "description":"The name of the function parameter"
57+
'properties': {
58+
'name': {
59+
'type':'string', 'description':'The name of the function parameter'
6060
},
61-
"desc": {"$ref":"#/definitions/desc"},
62-
"datatype": {"$ref":"#/definitions/datatype"},
63-
"nullable": {"$ref":"#/definitions/nullable"},
64-
"multiple": {"$ref":"#/definitions/multiple"}
61+
'desc': {'$ref':'#/definitions/desc'},
62+
'datatype': {'$ref':'#/definitions/datatype'},
63+
'nullable': {'$ref':'#/definitions/nullable'},
64+
'multiple': {'$ref':'#/definitions/multiple'}
6565
}
6666
}
6767
},
68-
"return": {
69-
"type":"object", "description":"The return value of the function",
70-
"required": ["datatype"],
71-
"propertyNames": {
72-
"pattern": "^(\\$[A-Za-z_][\\w.-]*|desc|datatype|nullable|multiple)$"
68+
'return': {
69+
'type':'object', 'description':'The return value of the function',
70+
'required': ['datatype'],
71+
'propertyNames': {
72+
'pattern': '^(\\$[A-Za-z_][\\w.-]*|desc|datatype|nullable|multiple)$'
7373
},
74-
"properties": {
75-
"desc": {"$ref":"#/definitions/desc"},
76-
"datatype": {"$ref":"#/definitions/datatype"},
77-
"nullable": {"$ref":"#/definitions/nullable"},
78-
"multiple": {"$ref":"#/definitions/multiple"}
74+
'properties': {
75+
'desc': {'$ref':'#/definitions/desc'},
76+
'datatype': {'$ref':'#/definitions/datatype'},
77+
'nullable': {'$ref':'#/definitions/nullable'},
78+
'multiple': {'$ref':'#/definitions/multiple'}
7979
}
8080
}
8181
// "$comment": "SIMPLIFIED BY DELETING errorDetail AND monitoring"

lib/internal.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
*/
44
'use strict';
55

6-
const Operation = require("./operation");
7-
const requester = require("./requester.js");
8-
const mlutil = require("./mlutil");
6+
const Operation = require('./operation');
7+
const requester = require('./requester.js');
8+
const mlutil = require('./mlutil');
99
class InternalClass {
1010
constructor(clientObject) {
1111
this.clientObject = clientObject;
@@ -18,7 +18,7 @@ class InternalClass {
1818
if (requestOptionsCallback) {
1919
requestOptionsCallback(requestOptions);
2020
}
21-
const operation = new Operation("", this.clientObject, requestOptions, "single", "single");
21+
const operation = new Operation('', this.clientObject, requestOptions, 'single', 'single');
2222
if (operationCallback) {
2323
operationCallback(operation);
2424
}

lib/marklogic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ var Operation = require('./operation.js');
2929
var requester = require('./requester.js');
3030
let internal = require('./internal.js');
3131

32-
const proxy = require("./endpoint-proxy.js");
32+
const proxy = require('./endpoint-proxy.js');
3333
const dns = require('dns');
3434

3535
/**

lib/mlutil.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Copyright (c) 2015-2025 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
33
*/
44
'use strict';
5-
var util = require("util");
5+
var util = require('util');
66

77
var multipartBoundary = 'MLBOUND_' + Date.UTC(2014,12,31);
88

lib/operation.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ function OperationHeaders(
271271
var lastChar = versionId.charAt(versionId.length - 1);
272272
this.versionId = (
273273
(firstChar === '"' && lastChar === '"') ||
274-
(firstChar === "'" && lastChar === "'")
274+
(firstChar === '\'' && lastChar === '\'')
275275
) ? versionId.substring(1, versionId.length - 1) : versionId;
276276
}
277277

lib/patch-builder.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ function library(module) {
164164
}
165165
var extension = module.substring((module.lastIndexOf('.')+1), module.length);
166166

167-
if(extension === "sjs") {
167+
if(extension === 'sjs') {
168168
return {'replace-library':{
169169
at: '/ext/marklogic/patch/apply/'+module
170170
}};
@@ -590,7 +590,7 @@ function pathLanguage() {
590590
);
591591
}
592592

593-
return {"pathlang": pathlang};
593+
return {'pathlang': pathlang};
594594
}
595595

596596
/**

lib/plan-builder-base.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ function castArg(arg, funcName, paramName, argPos, paramTypes) {
131131
return true;
132132
}
133133
throw new Error(
134-
`bm25LengthWeight must be a number`
134+
'bm25LengthWeight must be a number'
135135
);
136136
default:
137137
return false;
@@ -285,7 +285,7 @@ function castArg(arg, funcName, paramName, argPos, paramTypes) {
285285
return true;
286286
}
287287
if(key === 'quality') {
288-
if(typeof value !== "number") {
288+
if(typeof value !== 'number') {
289289
throw new Error(
290290
`${argLabel(funcName, paramName, argPos)} - ${key} key must be type of number`
291291
);
@@ -320,7 +320,7 @@ function castArg(arg, funcName, paramName, argPos, paramTypes) {
320320
}
321321
return objKeysPlanSchemaDef.every(key => {
322322
if(key === 'kind') {
323-
if(typeof arg[key] !== "string") {
323+
if(typeof arg[key] !== 'string') {
324324
throw new Error(
325325
`${argLabel(funcName, paramName, argPos)} has another type than string`
326326
);
@@ -329,15 +329,15 @@ function castArg(arg, funcName, paramName, argPos, paramTypes) {
329329
}
330330
}
331331
if(key === 'mode') {
332-
if(typeof arg[key] !== "string") {
332+
if(typeof arg[key] !== 'string') {
333333
throw new Error(
334334
`${argLabel(funcName, paramName, argPos)} has another type than string`
335335
);
336336
}
337337
return true;
338338
}
339339
if(key === 'schemaUri') {
340-
if(typeof arg[key] !== "string") {
340+
if(typeof arg[key] !== 'string') {
341341
throw new Error(
342342
`${argLabel(funcName, paramName, argPos)} has another type than string`
343343
);
@@ -350,7 +350,7 @@ function castArg(arg, funcName, paramName, argPos, paramTypes) {
350350
const value = arg[key];
351351
const type = typeof value;
352352
if(key === 'path') {
353-
if(type !== "string") {
353+
if(type !== 'string') {
354354
throw new Error(
355355
`${argLabel(funcName, paramName, argPos)} should be a type of string`
356356
);
@@ -366,7 +366,7 @@ function castArg(arg, funcName, paramName, argPos, paramTypes) {
366366
return true;
367367
}
368368
if(key === 'params') {
369-
if(type !== "object") {
369+
if(type !== 'object') {
370370
throw new Error(
371371
`${argLabel(funcName, paramName, argPos)} should be a type of object`
372372
);
@@ -381,7 +381,7 @@ function castArg(arg, funcName, paramName, argPos, paramTypes) {
381381
}
382382
objKeys.every(key => {
383383
if(key === 'column') {
384-
if(typeof arg[key] !== "string") {
384+
if(typeof arg[key] !== 'string') {
385385
throw new Error(
386386
`${argLabel(funcName, paramName, argPos)} has another type than string`
387387
);
@@ -538,7 +538,7 @@ function makeSingleArgs(funcName, minArity, paramDef, args) {
538538
function exportOperators(plan) {
539539
const operList = plan._operators;
540540
if (!Array.isArray(operList)) {
541-
throw new Error(`operator list is not an array: `+operList);
541+
throw new Error('operator list is not an array: '+operList);
542542
}
543543
return {
544544
ns: 'op',

0 commit comments

Comments
 (0)