Skip to content

Commit 15ca0e5

Browse files
committed
get rid of no-undefined eslint rule
1 parent 3669df6 commit 15ca0e5

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

Diff for: dash-renderer/.eslintrc.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@
110110
"no-sequences": ["error"],
111111
"no-shadow": ["off"],
112112
"no-throw-literal": ["error"],
113-
"no-undefined": ["error"],
114113
"no-unused-expressions": ["error"],
115114
"no-use-before-define": ["error", "nofunc"],
116115
"no-useless-call": ["error"],
@@ -147,4 +146,4 @@
147146
"no-underscore-dangle": ["off"],
148147
"no-useless-escape": ["off"]
149148
}
150-
}
149+
}

Diff for: dash-renderer/src/persistence.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ function keyPrefixMatch(prefix, separator) {
100100
}
101101

102102
const UNDEFINED = 'U';
103-
const _parse = val => (val === UNDEFINED ? void 0 : JSON.parse(val || null));
104-
const _stringify = val => (val === void 0 ? UNDEFINED : JSON.stringify(val));
103+
const _parse = val => (val === UNDEFINED ? undefined : JSON.parse(val || null));
104+
const _stringify = val => (val === undefined ? UNDEFINED : JSON.stringify(val));
105105

106106
class WebStore {
107107
constructor(backEnd) {

Diff for: dash-renderer/tests/persistence.test.js

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/* eslint-disable no-magic-numbers */
2-
/* eslint-disable no-undefined */
32
/* eslint-disable no-console */
43
import {recordUiEdit, stores, storePrefix} from '../src/persistence';
54

0 commit comments

Comments
 (0)