Skip to content

Commit 10f349f

Browse files
committed
refactor(lint): fixes
1 parent c18c296 commit 10f349f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/parser.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ function parseMethods({paths, security, parameters, responses = {}}: Swagger, sw
9797
}).map(([methodType, operation]: [string, Operation]) => {
9898
// select the lowest success (code 20x) response
9999
const successResponseCode =
100-
Object.keys(operation.responses).sort().filter(code => code.startsWith('2'))[0]
100+
Object.keys(operation.responses).slice().sort().filter(code => code.startsWith('2'))[0]
101101
|| 'missing';
102102

103103
const okResponse: Response | Reference = operation.responses[successResponseCode];
@@ -113,7 +113,7 @@ function parseMethods({paths, security, parameters, responses = {}}: Swagger, sw
113113
parameters || {}
114114
);
115115

116-
return {
116+
return {
117117
hasJsonResponse: true,
118118
isSecure: security !== undefined || operation.security !== undefined,
119119
methodName: toCamelCase(operation.operationId

tslint.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@
128128
],
129129
"no-misused-new": true,
130130
"no-namespace": true,
131-
"no-array-mutation": true,
131+
"no-array-mutation": [true, "ignore-new-array"],
132132
"no-object-mutation": true,
133133
"no-parameter-reassignment": false,
134134
"no-reference": true,

0 commit comments

Comments
 (0)