From 15ca0e5ae6747af2fb8e5c898a89c48f4ddef0a3 Mon Sep 17 00:00:00 2001 From: alexcjohnson Date: Wed, 11 Sep 2019 12:10:27 -0400 Subject: [PATCH] get rid of no-undefined eslint rule --- dash-renderer/.eslintrc.json | 3 +-- dash-renderer/src/persistence.js | 4 ++-- dash-renderer/tests/persistence.test.js | 1 - 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/dash-renderer/.eslintrc.json b/dash-renderer/.eslintrc.json index 92fd550520..702fbecbe7 100644 --- a/dash-renderer/.eslintrc.json +++ b/dash-renderer/.eslintrc.json @@ -110,7 +110,6 @@ "no-sequences": ["error"], "no-shadow": ["off"], "no-throw-literal": ["error"], - "no-undefined": ["error"], "no-unused-expressions": ["error"], "no-use-before-define": ["error", "nofunc"], "no-useless-call": ["error"], @@ -147,4 +146,4 @@ "no-underscore-dangle": ["off"], "no-useless-escape": ["off"] } - } \ No newline at end of file + } diff --git a/dash-renderer/src/persistence.js b/dash-renderer/src/persistence.js index 697ac15012..d0a9b099cf 100644 --- a/dash-renderer/src/persistence.js +++ b/dash-renderer/src/persistence.js @@ -100,8 +100,8 @@ function keyPrefixMatch(prefix, separator) { } const UNDEFINED = 'U'; -const _parse = val => (val === UNDEFINED ? void 0 : JSON.parse(val || null)); -const _stringify = val => (val === void 0 ? UNDEFINED : JSON.stringify(val)); +const _parse = val => (val === UNDEFINED ? undefined : JSON.parse(val || null)); +const _stringify = val => (val === undefined ? UNDEFINED : JSON.stringify(val)); class WebStore { constructor(backEnd) { diff --git a/dash-renderer/tests/persistence.test.js b/dash-renderer/tests/persistence.test.js index b8d52290a4..ac5c3df889 100644 --- a/dash-renderer/tests/persistence.test.js +++ b/dash-renderer/tests/persistence.test.js @@ -1,5 +1,4 @@ /* eslint-disable no-magic-numbers */ -/* eslint-disable no-undefined */ /* eslint-disable no-console */ import {recordUiEdit, stores, storePrefix} from '../src/persistence';