Skip to content

Commit

Permalink
chore(lint): allow hasOwnProperty
Browse files Browse the repository at this point in the history
  • Loading branch information
chriswk committed Oct 23, 2023
1 parent cc422f7 commit ba45970
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
3 changes: 2 additions & 1 deletion biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
"suspicious": {
"noExplicitAny": "off",
"noExtraNonNullAssertion": "off",
"noRedeclare": "off"
"noRedeclare": "off",
"noPrototypeBuiltins": "off"
}
},
"ignore": [
Expand Down
5 changes: 2 additions & 3 deletions src/lib/addons/feature-event-formatter-md.ts
Original file line number Diff line number Diff line change
Expand Up @@ -531,11 +531,10 @@ export class FeatureEventFormatterMd implements FeatureEventFormatter {
SEMVER_LT: 'is a SemVer less than',
};
const formatConstraint = (constraint: IConstraint) => {
const val = Object.hasOwn(constraint, 'value')
const val = constraint.hasOwnProperty('value')
? constraint.value
: `(${constraint.values?.join(',')})`;
const operator = Object.hasOwn(
constraintOperatorDescriptions,
const operator = constraintOperatorDescriptions.hasOwnProperty(
constraint.operator,
)
? constraintOperatorDescriptions[constraint.operator]
Expand Down
2 changes: 1 addition & 1 deletion src/lib/features/feature-toggle/feature-toggle-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1321,7 +1321,7 @@ class FeatureToggleService {
if (
replaceGroupId &&
s.parameters &&
Object.hasOwn(s.parameters, 'groupId')
s.parameters.hasOwnProperty('groupId')
) {
s.parameters.groupId = newFeatureName;
}
Expand Down

0 comments on commit ba45970

Please sign in to comment.