Skip to content

Commit 2afb4c9

Browse files
prettier fix
1 parent 1d0d868 commit 2afb4c9

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

tools/spectral/ipa/rulesets/functions/eachCustomMethodMustBeGetOrPost.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,18 @@ export default (paths) => {
1616
const httpMethods = Object.keys(pathItem);
1717

1818
// Check for invalid methods
19-
if (httpMethods.some(method => !VALID_METHODS.includes(method))) {
19+
if (httpMethods.some((method) => !VALID_METHODS.includes(method))) {
2020
errors.push({ path: ['paths', pathKey], message: ERROR_MESSAGE });
2121
continue;
2222
}
2323

2424
// Check for multiple valid methods
25-
const validMethodCount = httpMethods.filter(method =>
26-
VALID_METHODS.includes(method)
27-
).length;
25+
const validMethodCount = httpMethods.filter((method) => VALID_METHODS.includes(method)).length;
2826

2927
if (validMethodCount > 1) {
3028
errors.push({ path: ['paths', pathKey], message: ERROR_MESSAGE });
3129
}
3230
}
3331

3432
return errors;
35-
3633
};

0 commit comments

Comments
 (0)