Skip to content

Commit

Permalink
fix: 🐞 fix check for existence errors/warnings
Browse files Browse the repository at this point in the history
fix check for existence errors/warnings
  • Loading branch information
tal authored and tal committed Nov 9, 2023
1 parent 4cfdc61 commit 7c6dfd5
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/shared/utils/enforcement-type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import type { IRuleValue } from '@/interfaces/rule';
export const checkExistenceError = (ruleValue: IRuleValue) => {
return (
ruleValue === 'error' ||
(Array.isArray(ruleValue) && ruleValue[0] === 'error') ||
ruleValue === 2 ||
(Array.isArray(ruleValue) &&
(ruleValue[0] === 'error' || ruleValue[0] === 2) &&
Expand All @@ -14,7 +13,6 @@ export const checkExistenceError = (ruleValue: IRuleValue) => {
export const checkExistenceWarning = (ruleValue: IRuleValue) => {
return (
ruleValue === 'warn' ||
(Array.isArray(ruleValue) && ruleValue[0] === 'warn') ||
ruleValue === 1 ||
(Array.isArray(ruleValue) &&
(ruleValue[0] === 'warn' || ruleValue[0] === 1) &&
Expand Down

0 comments on commit 7c6dfd5

Please sign in to comment.