[web] Remove negated conditions

This commit is contained in:
Alain Nussbaumer 2024-04-27 06:59:47 +02:00
parent 7d59abee4f
commit fc5563fe9d
2 changed files with 1 additions and 2 deletions

View File

@ -25,7 +25,6 @@ export default [
'max-statements': 'off',
'no-bitwise': 'off',
'no-magic-numbers': 'off',
'no-negated-condition': 'off',
'no-nested-ternary': 'off',
'no-plusplus': 'off',
'no-ternary': 'off',

View File

@ -6,7 +6,7 @@ const NO_INDEX = 'NO_INDEX'
const numberComparator = (a, b) => a - b
const stringComparator = (a, b) => a.localeCompare(b, locale.value)
const dateComparator = (a, b) =>
new Date(a) - new Date(b) || (!a ? -1 : !b ? 1 : 0)
new Date(a) - new Date(b) || (a ? (b ? 0 : 1) : -1)
const createComparators = (criteria) =>
criteria.map(({ field, type, order = 1 }) => {