ui: update eslint rules

This commit is contained in:
undefined committed 2022-09-03 14:28:18 +08:00
1 parent 0e07c64cad
commit 5e8d2b1286
30 files changed
+73 -72

No files matched your search

@@ -56,8 +56,7 @@ export default class DOMAttachedObject {
static attachAll(container: Document | HTMLElement = document.body, ...args) {
if (process.env.NODE_ENV !== 'production') {
if (!this.DOMAttachSelector) {
// eslint-disable-next-line quotes
throw new Error(`'DOMAttachSelector' should be specified`);
throw new Error("'DOMAttachSelector' should be specified");
}
}
if (process.env.NODE_ENV !== 'production') {
@@ -77,8 +76,7 @@ export default class DOMAttachedObject {
const selector = this.DOMDetachSelector || this.DOMAttachSelector;
if (process.env.NODE_ENV !== 'production') {
if (!selector) {
// eslint-disable-next-line quotes
throw new Error(`'DOMDetachSelector' or 'DOMAttachSelector' should be specified`);
throw new Error("'DOMDetachSelector' or 'DOMAttachSelector' should be specified");
}
}
if (process.env.NODE_ENV !== 'production') {
@@ -102,8 +100,7 @@ export default class DOMAttachedObject {
static registerLifeCycleHooks(attach = true) {
if (process.env.NODE_ENV !== 'production') {
if (!this.DOMAttachSelector) {
// eslint-disable-next-line quotes
throw new Error(`'DOMAttachSelector' should be specified`);
throw new Error("'DOMAttachSelector' should be specified");
}
}
$(document).on('vjContentNew', (e) => this.attachAll(e.target));