Fix eslint utils

This commit is contained in:
Alexandre Bodin 2022-09-05 16:23:18 +02:00
parent eab835e301
commit 7b9866a770
2 changed files with 2 additions and 1 deletions

View File

@ -21,7 +21,7 @@ const getAssociationFromFieldKey = ({ model, field }) => {
let association;
let attribute;
for (let i = 0; i < fieldParts.length; i++) {
for (let i = 0; i < fieldParts.length; i += 1) {
const part = fieldParts[i];
attribute = part;

View File

@ -11,6 +11,7 @@ const symbolToString = typeof Symbol !== 'undefined' ? Symbol.prototype.toString
const SYMBOL_REGEXP = /^Symbol\((.*)\)(.*)$/;
function printNumber(val) {
// eslint-disable-next-line eqeqeq
if (val != +val) return 'NaN';
const isNegativeZero = val === 0 && 1 / val < 0;
return isNegativeZero ? '-0' : `${val}`;