Skip to content

Commit d24bdaa

Browse files
Refactor resourceEvaluation.js (#384)
1 parent 22ddefa commit d24bdaa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tools/spectral/ipa/rulesets/functions/utils/resourceEvaluation.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export function isSingletonResource(resourcePaths) {
2222
return true;
2323
}
2424
const additionalPaths = resourcePaths.slice(1);
25-
return !additionalPaths.some((p) => !isCustomMethod(p));
25+
return additionalPaths.every(isCustomMethod);
2626
}
2727

2828
/**
@@ -40,7 +40,7 @@ export function isStandardResource(resourcePaths) {
4040
return false;
4141
}
4242
const additionalPaths = resourcePaths.slice(2);
43-
return !additionalPaths.some((p) => !isCustomMethod(p));
43+
return additionalPaths.every(isCustomMethod);
4444
}
4545

4646
/**
@@ -50,7 +50,7 @@ export function isStandardResource(resourcePaths) {
5050
* @returns {boolean}
5151
*/
5252
export function hasGetMethod(pathObject) {
53-
return Object.keys(pathObject).some((o) => o === 'get');
53+
return Object.keys(pathObject).includes('get');
5454
}
5555

5656
/**

0 commit comments

Comments
 (0)