diff --git a/package-lock.json b/package-lock.json
index 4ef9b493..5f4bc7f4 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -2919,9 +2919,9 @@
}
},
"@eslint/eslintrc": {
- "version": "0.2.1",
- "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.2.1.tgz",
- "integrity": "sha512-XRUeBZ5zBWLYgSANMpThFddrZZkEbGHgUdt5UJjZfnlN9BGCiUBrf+nvbRupSjMvqzwnQN0qwCmOxITt1cfywA==",
+ "version": "0.2.2",
+ "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.2.2.tgz",
+ "integrity": "sha512-EfB5OHNYp1F4px/LI/FEnGylop7nOqkQ1LRzCM0KccA2U8tvV8w01KBv37LbO7nW4H+YhKyo2LcJhRwjjV17QQ==",
"dev": true,
"requires": {
"ajv": "^6.12.4",
@@ -2936,6 +2936,12 @@
"strip-json-comments": "^3.1.1"
},
"dependencies": {
+ "acorn-jsx": {
+ "version": "5.3.1",
+ "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.1.tgz",
+ "integrity": "sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==",
+ "dev": true
+ },
"ajv": {
"version": "6.12.6",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
@@ -2949,22 +2955,22 @@
}
},
"debug": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz",
- "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==",
+ "version": "4.3.1",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz",
+ "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==",
"dev": true,
"requires": {
"ms": "2.1.2"
}
},
"espree": {
- "version": "7.3.0",
- "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.0.tgz",
- "integrity": "sha512-dksIWsvKCixn1yrEXO8UosNSxaDoSYpq9reEjZSbHLpT5hpaCAKTLBwq0RHtLrIr+c0ByiYzWT8KTMRzoRCNlw==",
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz",
+ "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==",
"dev": true,
"requires": {
"acorn": "^7.4.0",
- "acorn-jsx": "^5.2.0",
+ "acorn-jsx": "^5.3.1",
"eslint-visitor-keys": "^1.3.0"
}
},
@@ -3570,6 +3576,15 @@
"vary": "^1.1.2"
}
},
+ "@mdn/browser-compat-data": {
+ "version": "2.0.7",
+ "resolved": "https://registry.npmjs.org/@mdn/browser-compat-data/-/browser-compat-data-2.0.7.tgz",
+ "integrity": "sha512-GeeM827DlzFFidn1eKkMBiqXFD2oLsnZbaiGhByPl0vcapsRzUL+t9hDoov1swc9rB2jw64R+ihtzC8qOE9wXw==",
+ "dev": true,
+ "requires": {
+ "extend": "3.0.2"
+ }
+ },
"@mysticatea/eslint-plugin": {
"version": "13.0.0",
"resolved": "https://registry.npmjs.org/@mysticatea/eslint-plugin/-/eslint-plugin-13.0.0.tgz",
@@ -5222,9 +5237,9 @@
"dev": true
},
"astral-regex": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz",
- "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==",
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz",
+ "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==",
"dev": true
},
"async": {
@@ -7135,12 +7150,6 @@
}
}
},
- "caniuse-db": {
- "version": "1.0.30001113",
- "resolved": "https://registry.npmjs.org/caniuse-db/-/caniuse-db-1.0.30001113.tgz",
- "integrity": "sha512-JOGTJXdeXlTokXq79+cAuQp8OmaYXtuK82bJpar9JvEyAag5qRHcMwDbCOvSSwGjEOJcRli9Bs+58Kflitul8g==",
- "dev": true
- },
"caniuse-lite": {
"version": "1.0.30001113",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001113.tgz",
@@ -8942,18 +8951,18 @@
}
},
"domhandler": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-3.0.0.tgz",
- "integrity": "sha512-eKLdI5v9m67kbXQbJSNn1zjh0SDzvzWVWtX+qEI3eMjZw8daH9k8rlj1FZY9memPwjiskQFbe7vHVVJIAqoEhw==",
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-3.3.0.tgz",
+ "integrity": "sha512-J1C5rIANUbuYK+FuFL98650rihynUOEzRLxW+90bKZRWB6A1X1Tf82GxR1qAWLyfNPRvjqfip3Q5tdYlmAa9lA==",
"dev": true,
"requires": {
"domelementtype": "^2.0.1"
},
"dependencies": {
"domelementtype": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.0.1.tgz",
- "integrity": "sha512-5HOHUDsYZWV8FGWN0Njbr/Rn7f/eWSQi1v7+HsUVwXgn8nWWlL64zKDkS0n8ZmQ3mlWOMuXOnR+7Nx/5tMO5AQ==",
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.1.0.tgz",
+ "integrity": "sha512-LsTgx/L5VpD+Q8lmsXSHW2WpA+eBlZ9HPf3erD1IoPF00/3JKHZ3BknUVA2QGDNu69ZNmyFmCWBSO45XjYKC5w==",
"dev": true
}
}
@@ -9888,13 +9897,13 @@
}
},
"eslint": {
- "version": "7.13.0",
- "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.13.0.tgz",
- "integrity": "sha512-uCORMuOO8tUzJmsdRtrvcGq5qposf7Rw0LwkTJkoDbOycVQtQjmnhZSuLQnozLE4TmAzlMVV45eCHmQ1OpDKUQ==",
+ "version": "7.16.0",
+ "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.16.0.tgz",
+ "integrity": "sha512-iVWPS785RuDA4dWuhhgXTNrGxHHK3a8HLSMBgbbU59ruJDubUraXN8N5rn7kb8tG6sjg74eE0RA3YWT51eusEw==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.0.0",
- "@eslint/eslintrc": "^0.2.1",
+ "@eslint/eslintrc": "^0.2.2",
"ajv": "^6.10.0",
"chalk": "^4.0.0",
"cross-spawn": "^7.0.2",
@@ -9904,10 +9913,10 @@
"eslint-scope": "^5.1.1",
"eslint-utils": "^2.1.0",
"eslint-visitor-keys": "^2.0.0",
- "espree": "^7.3.0",
+ "espree": "^7.3.1",
"esquery": "^1.2.0",
"esutils": "^2.0.2",
- "file-entry-cache": "^5.0.1",
+ "file-entry-cache": "^6.0.0",
"functional-red-black-tree": "^1.0.1",
"glob-parent": "^5.0.0",
"globals": "^12.1.0",
@@ -9927,11 +9936,17 @@
"semver": "^7.2.1",
"strip-ansi": "^6.0.0",
"strip-json-comments": "^3.1.0",
- "table": "^5.2.3",
+ "table": "^6.0.4",
"text-table": "^0.2.0",
"v8-compile-cache": "^2.0.3"
},
"dependencies": {
+ "acorn-jsx": {
+ "version": "5.3.1",
+ "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.1.tgz",
+ "integrity": "sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==",
+ "dev": true
+ },
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
@@ -9967,9 +9982,9 @@
"dev": true
},
"debug": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz",
- "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==",
+ "version": "4.3.1",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz",
+ "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==",
"dev": true,
"requires": {
"ms": "2.1.2"
@@ -10009,13 +10024,13 @@
"dev": true
},
"espree": {
- "version": "7.3.0",
- "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.0.tgz",
- "integrity": "sha512-dksIWsvKCixn1yrEXO8UosNSxaDoSYpq9reEjZSbHLpT5hpaCAKTLBwq0RHtLrIr+c0ByiYzWT8KTMRzoRCNlw==",
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz",
+ "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==",
"dev": true,
"requires": {
"acorn": "^7.4.0",
- "acorn-jsx": "^5.2.0",
+ "acorn-jsx": "^5.3.1",
"eslint-visitor-keys": "^1.3.0"
},
"dependencies": {
@@ -10094,6 +10109,15 @@
"type-check": "~0.4.0"
}
},
+ "lru-cache": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
+ "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
+ "dev": true,
+ "requires": {
+ "yallist": "^4.0.0"
+ }
+ },
"ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
@@ -10133,10 +10157,13 @@
"dev": true
},
"semver": {
- "version": "7.3.2",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz",
- "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==",
- "dev": true
+ "version": "7.3.4",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz",
+ "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==",
+ "dev": true,
+ "requires": {
+ "lru-cache": "^6.0.0"
+ }
},
"strip-json-comments": {
"version": "3.1.1",
@@ -10161,6 +10188,12 @@
"requires": {
"prelude-ls": "^1.2.1"
}
+ },
+ "yallist": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
+ "dev": true
}
}
},
@@ -10181,9 +10214,9 @@
"dev": true
},
"eslint-config-standard": {
- "version": "16.0.1",
- "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-16.0.1.tgz",
- "integrity": "sha512-WBBiQQZdaPyL+4sPkGWhWrHCDtvJoU195B9j8yXE9uFQnX34gMXI5CeBRm95gx3PMEZPM5OpwET10hH4F4SxCA==",
+ "version": "16.0.2",
+ "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-16.0.2.tgz",
+ "integrity": "sha512-fx3f1rJDsl9bY7qzyX8SAtP8GBSk6MfXFaTfaGgk12aAYW4gJSyRm7dM790L6cbXv63fvjY4XeSzXnb4WM+SKw==",
"dev": true
},
"eslint-import-resolver-node": {
@@ -10285,21 +10318,27 @@
"dev": true
},
"eslint-plugin-compat": {
- "version": "3.8.0",
- "resolved": "https://registry.npmjs.org/eslint-plugin-compat/-/eslint-plugin-compat-3.8.0.tgz",
- "integrity": "sha512-5CuWUSZXZkXLCQJBriEpndn/YWrvggDSHTpRJq++kR8GVcsWbTdp8Eh+nBA7JlrNi7ZJ/+kniOVXmn3bpnxuRA==",
+ "version": "3.9.0",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-compat/-/eslint-plugin-compat-3.9.0.tgz",
+ "integrity": "sha512-lt3l5PHFHVEYSZ5zijcoYvtQJPsBifRiH5N0Et57KwVu7l/yxmHhSG6VJiLMa/lXrg93Qu8049RNQOMn0+yJBg==",
"dev": true,
"requires": {
+ "@mdn/browser-compat-data": "^2.0.7",
"ast-metadata-inferer": "^0.4.0",
"browserslist": "^4.12.2",
- "caniuse-db": "^1.0.30001090",
+ "caniuse-lite": "^1.0.30001166",
"core-js": "^3.6.5",
"find-up": "^4.1.0",
"lodash.memoize": "4.1.2",
- "mdn-browser-compat-data": "^1.0.28",
"semver": "7.3.2"
},
"dependencies": {
+ "caniuse-lite": {
+ "version": "1.0.30001168",
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001168.tgz",
+ "integrity": "sha512-P2zmX7swIXKu+GMMR01TWa4csIKELTNnZKc+f1CjebmZJQtTAEXmpQSoKVJVVcvPGAA0TEYTOUp3VehavZSFPQ==",
+ "dev": true
+ },
"find-up": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
@@ -10392,12 +10431,12 @@
"dev": true
},
"eslint-plugin-html": {
- "version": "6.1.0",
- "resolved": "https://registry.npmjs.org/eslint-plugin-html/-/eslint-plugin-html-6.1.0.tgz",
- "integrity": "sha512-xcqithhnjUxoEDRL0hYci4RSS8EZ1NGr3/H8x3BxJvxgbu4R3YaEUea9i93j95NuAgoAbOUfNmybta8fqi4UbA==",
+ "version": "6.1.1",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-html/-/eslint-plugin-html-6.1.1.tgz",
+ "integrity": "sha512-JSe3ZDb7feKMnQM27XWGeoIjvP4oWQMJD9GZ6wW67J7/plVL87NK72RBwlvfc3tTZiYUchHhxAwtgEd1GdofDA==",
"dev": true,
"requires": {
- "htmlparser2": "^4.1.0"
+ "htmlparser2": "^5.0.1"
}
},
"eslint-plugin-import": {
@@ -10434,24 +10473,24 @@
}
},
"eslint-plugin-jsdoc": {
- "version": "30.7.7",
- "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-30.7.7.tgz",
- "integrity": "sha512-DmVMJC2AbpYX7X1KhnVT1a9ex1AUvG+q9G8i6hzjp3cpjW8vmKQTUmZnRS0//W+7HvMqeb+eXPANdCOzGVVZBQ==",
+ "version": "30.7.9",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-30.7.9.tgz",
+ "integrity": "sha512-qMM0fNx7/6OCnIh3jRpIrEBAhTG1THNXXbr3yfJ8yqLrDbzJR98xsstX25xt9GCPlrjNc/bBpTHfJQOvn7nVMA==",
"dev": true,
"requires": {
"comment-parser": "^0.7.6",
- "debug": "^4.2.0",
+ "debug": "^4.3.1",
"jsdoctypeparser": "^9.0.0",
"lodash": "^4.17.20",
"regextras": "^0.7.1",
- "semver": "^7.3.2",
+ "semver": "^7.3.4",
"spdx-expression-parse": "^3.0.1"
},
"dependencies": {
"debug": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz",
- "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==",
+ "version": "4.3.1",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz",
+ "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==",
"dev": true,
"requires": {
"ms": "2.1.2"
@@ -10463,6 +10502,15 @@
"integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==",
"dev": true
},
+ "lru-cache": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
+ "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
+ "dev": true,
+ "requires": {
+ "yallist": "^4.0.0"
+ }
+ },
"ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
@@ -10470,9 +10518,18 @@
"dev": true
},
"semver": {
- "version": "7.3.2",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz",
- "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==",
+ "version": "7.3.4",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz",
+ "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==",
+ "dev": true,
+ "requires": {
+ "lru-cache": "^6.0.0"
+ }
+ },
+ "yallist": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
"dev": true
}
}
@@ -10611,15 +10668,15 @@
"dev": true
},
"eslint-plugin-standard": {
- "version": "4.0.2",
- "resolved": "https://registry.npmjs.org/eslint-plugin-standard/-/eslint-plugin-standard-4.0.2.tgz",
- "integrity": "sha512-nKptN8l7jksXkwFk++PhJB3cCDTcXOEyhISIN86Ue2feJ1LFyY3PrY3/xT2keXlJSY5bpmbiTG0f885/YKAvTA==",
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-standard/-/eslint-plugin-standard-4.1.0.tgz",
+ "integrity": "sha512-ZL7+QRixjTR6/528YNGyDotyffm5OQst/sGxKDwGb9Uqs4In5Egi4+jbobhqJoyoCM6/7v/1A5fhQ7ScMtDjaQ==",
"dev": true
},
"eslint-plugin-unicorn": {
- "version": "23.0.0",
- "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-23.0.0.tgz",
- "integrity": "sha512-Vabo3cjl6cjyhcf+76CdQEY6suOFzK0Xh3xo0uL9VDYrDJP5+B6PjV0tHTYm82WZmFWniugFJM3ywHSNYTi/ZQ==",
+ "version": "24.0.0",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-24.0.0.tgz",
+ "integrity": "sha512-NfLjIZas/ZUwc3S+pUtbTRqgCkODxPEkJBJ5ZR8wIu90BmX4jmXp10hoOZMScR2CR1NYTtrx0OX4BQvBnbzZzA==",
"dev": true,
"requires": {
"ci-info": "^2.0.0",
@@ -10634,7 +10691,7 @@
"regexp-tree": "^0.1.21",
"reserved-words": "^0.1.2",
"safe-regex": "^2.1.1",
- "semver": "^7.3.2"
+ "semver": "^7.3.4"
},
"dependencies": {
"eslint-utils": {
@@ -10671,6 +10728,15 @@
"integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==",
"dev": true
},
+ "lru-cache": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
+ "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
+ "dev": true,
+ "requires": {
+ "yallist": "^4.0.0"
+ }
+ },
"p-locate": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
@@ -10739,9 +10805,18 @@
}
},
"semver": {
- "version": "7.3.2",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz",
- "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==",
+ "version": "7.3.4",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz",
+ "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==",
+ "dev": true,
+ "requires": {
+ "lru-cache": "^6.0.0"
+ }
+ },
+ "yallist": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
"dev": true
}
}
@@ -11318,12 +11393,12 @@
}
},
"file-entry-cache": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz",
- "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==",
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.0.tgz",
+ "integrity": "sha512-fqoO76jZ3ZnYrXLDRxBR1YvOvc0k844kcOg40bgsPrE25LAb/PDqTY+ho64Xh2c8ZXgIKldchCFHczG2UVRcWA==",
"dev": true,
"requires": {
- "flat-cache": "^2.0.1"
+ "flat-cache": "^3.0.4"
}
},
"file-type": {
@@ -11419,31 +11494,19 @@
"dev": true
},
"flat-cache": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz",
- "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==",
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz",
+ "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==",
"dev": true,
"requires": {
- "flatted": "^2.0.0",
- "rimraf": "2.6.3",
- "write": "1.0.3"
- },
- "dependencies": {
- "rimraf": {
- "version": "2.6.3",
- "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz",
- "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==",
- "dev": true,
- "requires": {
- "glob": "^7.1.3"
- }
- }
+ "flatted": "^3.1.0",
+ "rimraf": "^3.0.2"
}
},
"flatted": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz",
- "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==",
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.0.tgz",
+ "integrity": "sha512-tW+UkmtNg/jv9CSofAKvgVcO7c2URjhTdW1ZTkcAritblu8tajiYy7YisnIflEwtKssCtOxpnBRoCB7iap0/TA==",
"dev": true
},
"font-family-papandreou": {
@@ -12198,43 +12261,65 @@
"dev": true
},
"htmlparser2": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-4.1.0.tgz",
- "integrity": "sha512-4zDq1a1zhE4gQso/c5LP1OtrhYTncXNSpvJYtWJBtXAETPlMfi3IFNjGuQbYLuVY4ZR0QMqRVvo4Pdy9KLyP8Q==",
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-5.0.1.tgz",
+ "integrity": "sha512-vKZZra6CSe9qsJzh0BjBGXo8dvzNsq/oGvsjfRdOrrryfeD9UOBEEQdeoqCRmKZchF5h2zOBMQ6YuQ0uRUmdbQ==",
"dev": true,
"requires": {
"domelementtype": "^2.0.1",
- "domhandler": "^3.0.0",
- "domutils": "^2.0.0",
+ "domhandler": "^3.3.0",
+ "domutils": "^2.4.2",
"entities": "^2.0.0"
},
"dependencies": {
"dom-serializer": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.0.1.tgz",
- "integrity": "sha512-1Aj1Qy3YLbdslkI75QEOfdp9TkQ3o8LRISAzxOibjBs/xWwr1WxZFOQphFkZuepHFGo+kB8e5FVJSS0faAJ4Rw==",
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.2.0.tgz",
+ "integrity": "sha512-n6kZFH/KlCrqs/1GHMOd5i2fd/beQHuehKdWvNNffbGHTr/almdhuVvTVFb3V7fglz+nC50fFusu3lY33h12pA==",
"dev": true,
"requires": {
"domelementtype": "^2.0.1",
- "domhandler": "^3.0.0",
+ "domhandler": "^4.0.0",
"entities": "^2.0.0"
+ },
+ "dependencies": {
+ "domhandler": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.0.0.tgz",
+ "integrity": "sha512-KPTbnGQ1JeEMQyO1iYXoagsI6so/C96HZiFyByU3T6iAzpXn8EGEvct6unm1ZGoed8ByO2oirxgwxBmqKF9haA==",
+ "dev": true,
+ "requires": {
+ "domelementtype": "^2.1.0"
+ }
+ }
}
},
"domelementtype": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.0.1.tgz",
- "integrity": "sha512-5HOHUDsYZWV8FGWN0Njbr/Rn7f/eWSQi1v7+HsUVwXgn8nWWlL64zKDkS0n8ZmQ3mlWOMuXOnR+7Nx/5tMO5AQ==",
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.1.0.tgz",
+ "integrity": "sha512-LsTgx/L5VpD+Q8lmsXSHW2WpA+eBlZ9HPf3erD1IoPF00/3JKHZ3BknUVA2QGDNu69ZNmyFmCWBSO45XjYKC5w==",
"dev": true
},
"domutils": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.2.0.tgz",
- "integrity": "sha512-0haAxVr1PR0SqYwCH7mxMpHZUwjih9oPPedqpR/KufsnxPyZ9dyVw1R5093qnJF3WXSbjBkdzRWLw/knJV/fAg==",
+ "version": "2.4.4",
+ "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.4.4.tgz",
+ "integrity": "sha512-jBC0vOsECI4OMdD0GC9mGn7NXPLb+Qt6KW1YDQzeQYRUFKmNG8lh7mO5HiELfr+lLQE7loDVI4QcAxV80HS+RA==",
"dev": true,
"requires": {
"dom-serializer": "^1.0.1",
"domelementtype": "^2.0.1",
- "domhandler": "^3.0.0"
+ "domhandler": "^4.0.0"
+ },
+ "dependencies": {
+ "domhandler": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.0.0.tgz",
+ "integrity": "sha512-KPTbnGQ1JeEMQyO1iYXoagsI6so/C96HZiFyByU3T6iAzpXn8EGEvct6unm1ZGoed8ByO2oirxgwxBmqKF9haA==",
+ "dev": true,
+ "requires": {
+ "domelementtype": "^2.1.0"
+ }
+ }
}
}
}
@@ -15292,15 +15377,6 @@
"integrity": "sha512-jVU0Nr2B9X3MU4tSK7JP1CMkSvOj7X5l/GboG1tKRw52lLF1x2Ju92Ms9tNetCcbfX3hzlM73zYo2NKkWSfF/A==",
"dev": true
},
- "mdn-browser-compat-data": {
- "version": "1.0.34",
- "resolved": "https://registry.npmjs.org/mdn-browser-compat-data/-/mdn-browser-compat-data-1.0.34.tgz",
- "integrity": "sha512-bIufENDguhcjV4qAguNEyEBoYuRgS7vIwSNifYt8s3FIBrsRwUd0xWah0P7H1lLIcBCPwwwQWpLgWHx3K7rFFg==",
- "dev": true,
- "requires": {
- "extend": "3.0.2"
- }
- },
"mdn-data": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.4.tgz",
@@ -20703,64 +20779,68 @@
"dev": true
},
"table": {
- "version": "5.4.6",
- "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz",
- "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==",
+ "version": "6.0.4",
+ "resolved": "https://registry.npmjs.org/table/-/table-6.0.4.tgz",
+ "integrity": "sha512-sBT4xRLdALd+NFBvwOz8bw4b15htyythha+q+DVZqy2RS08PPC8O2sZFgJYEY7bJvbCFKccs+WIZ/cd+xxTWCw==",
"dev": true,
"requires": {
- "ajv": "^6.10.2",
- "lodash": "^4.17.14",
- "slice-ansi": "^2.1.0",
- "string-width": "^3.0.0"
+ "ajv": "^6.12.4",
+ "lodash": "^4.17.20",
+ "slice-ansi": "^4.0.0",
+ "string-width": "^4.2.0"
},
"dependencies": {
- "ansi-regex": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
- "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
+ "ajv": {
+ "version": "6.12.6",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
+ "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
+ "dev": true,
+ "requires": {
+ "fast-deep-equal": "^3.1.1",
+ "fast-json-stable-stringify": "^2.0.0",
+ "json-schema-traverse": "^0.4.1",
+ "uri-js": "^4.2.2"
+ }
+ },
+ "ansi-styles": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "dev": true,
+ "requires": {
+ "color-convert": "^2.0.1"
+ }
+ },
+ "color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "dev": true,
+ "requires": {
+ "color-name": "~1.1.4"
+ }
+ },
+ "color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true
},
- "emoji-regex": {
- "version": "7.0.3",
- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
- "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==",
- "dev": true
- },
- "is-fullwidth-code-point": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
- "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
+ "lodash": {
+ "version": "4.17.20",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz",
+ "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==",
"dev": true
},
"slice-ansi": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz",
- "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==",
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz",
+ "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==",
"dev": true,
"requires": {
- "ansi-styles": "^3.2.0",
- "astral-regex": "^1.0.0",
- "is-fullwidth-code-point": "^2.0.0"
- }
- },
- "string-width": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
- "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
- "dev": true,
- "requires": {
- "emoji-regex": "^7.0.1",
- "is-fullwidth-code-point": "^2.0.0",
- "strip-ansi": "^5.1.0"
- }
- },
- "strip-ansi": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
- "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
- "dev": true,
- "requires": {
- "ansi-regex": "^4.1.0"
+ "ansi-styles": "^4.0.0",
+ "astral-regex": "^2.0.0",
+ "is-fullwidth-code-point": "^3.0.0"
}
}
}
@@ -22531,15 +22611,6 @@
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
"dev": true
},
- "write": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz",
- "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==",
- "dev": true,
- "requires": {
- "mkdirp": "^0.5.1"
- }
- },
"write-file-atomic": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz",
diff --git a/package.json b/package.json
index 87e99872..f4cf1951 100644
--- a/package.json
+++ b/package.json
@@ -174,19 +174,19 @@
"es-dev-commonjs-transformer": "0.2.0",
"es-dev-server": "1.57.8",
"es-dev-server-rollup": "0.0.8",
- "eslint": "7.13.0",
+ "eslint": "7.16.0",
"eslint-config-ash-nazg": "22.10.0",
- "eslint-config-standard": "16.0.1",
+ "eslint-config-standard": "16.0.2",
"eslint-plugin-array-func": "3.1.7",
"eslint-plugin-chai-expect": "2.2.0",
"eslint-plugin-chai-expect-keywords": "2.0.1",
"eslint-plugin-chai-friendly": "0.6.0",
- "eslint-plugin-compat": "3.8.0",
+ "eslint-plugin-compat": "3.9.0",
"eslint-plugin-cypress": "2.11.2",
"eslint-plugin-eslint-comments": "3.2.0",
- "eslint-plugin-html": "6.1.0",
+ "eslint-plugin-html": "6.1.1",
"eslint-plugin-import": "2.22.1",
- "eslint-plugin-jsdoc": "30.7.7",
+ "eslint-plugin-jsdoc": "30.7.9",
"eslint-plugin-markdown": "1.0.2",
"eslint-plugin-mocha": "8.0.0",
"eslint-plugin-mocha-cleanup": "1.9.1",
@@ -195,8 +195,8 @@
"eslint-plugin-node": "11.1.0",
"eslint-plugin-promise": "4.2.1",
"eslint-plugin-sonarjs": "0.5.0",
- "eslint-plugin-standard": "4.0.2",
- "eslint-plugin-unicorn": "23.0.0",
+ "eslint-plugin-standard": "4.1.0",
+ "eslint-plugin-unicorn": "24.0.0",
"husky": "4.3.0",
"imageoptim-cli": "3.0.2",
"jamilih": "0.53.2",
diff --git a/src/common/browser.js b/src/common/browser.js
index 9d435954..83be6b7a 100644
--- a/src/common/browser.js
+++ b/src/common/browser.js
@@ -30,7 +30,6 @@ const svg = document.createElementNS(NS.SVG, 'svg');
const isOpera_ = Boolean(window.opera);
const isWebkit_ = userAgent.includes('AppleWebKit');
const isGecko_ = userAgent.includes('Gecko/');
-const isIE_ = userAgent.includes('MSIE');
const isChrome_ = userAgent.includes('Chrome/');
const isWindows_ = userAgent.includes('Windows');
const isMac_ = userAgent.includes('Macintosh');
@@ -165,11 +164,6 @@ export const isWebkit = () => isWebkit_;
* @returns {boolean}
*/
export const isGecko = () => isGecko_;
-/**
- * @function module:browser.isIE
- * @returns {boolean}
-*/
-export const isIE = () => isIE_;
/**
* @function module:browser.isChrome
* @returns {boolean}
diff --git a/src/common/units.js b/src/common/units.js
index c2bf694d..a722303d 100644
--- a/src/common/units.js
+++ b/src/common/units.js
@@ -230,13 +230,8 @@ export const convertAttrs = function (element) {
for (let i = 0; i < len; i++) {
const attr = attrs[i];
const cur = element.getAttribute(attr);
- if (cur) {
- if (!isNaN(cur)) {
- element.setAttribute(attr, (cur / typeMap_[unit]) + unit);
- }
- // else {
- // Convert existing?
- // }
+ if (cur && !isNaN(cur)) {
+ element.setAttribute(attr, (cur / typeMap_[unit]) + unit);
}
}
};
diff --git a/src/common/utilities.js b/src/common/utilities.js
index 253743e7..6246fc7d 100644
--- a/src/common/utilities.js
+++ b/src/common/utilities.js
@@ -679,10 +679,8 @@ export const getBBox = function (elem) {
} else {
// Check if element is child of a foreignObject
const fo = $(selected).closest('foreignObject');
- if (fo.length) {
- if (fo[0].getBBox) {
- ret = fo[0].getBBox();
- }
+ if (fo.length && fo[0].getBBox) {
+ ret = fo[0].getBBox();
}
}
}
diff --git a/src/editor/components/seExplorerButton.js b/src/editor/components/seExplorerButton.js
index c18f7569..5afc384b 100644
--- a/src/editor/components/seExplorerButton.js
+++ b/src/editor/components/seExplorerButton.js
@@ -168,6 +168,7 @@ export class ExplorerButton extends HTMLElement {
)).join('');
await this.updateLib(lib[0]);
} catch (error) {
+ // eslint-disable-next-line no-console
console.error(error);
}
break;
@@ -307,6 +308,7 @@ export class ExplorerButton extends HTMLElement {
return ``;
}).join('');
} catch (error) {
+ // eslint-disable-next-line no-console
console.error(`could not read file:${libDir}${lib}.json`, error);
}
}
diff --git a/src/editor/dialogs/editorPreferencesDialog.js b/src/editor/dialogs/editorPreferencesDialog.js
index 6708244b..5bbe040f 100644
--- a/src/editor/dialogs/editorPreferencesDialog.js
+++ b/src/editor/dialogs/editorPreferencesDialog.js
@@ -1,6 +1,5 @@
/* eslint-disable node/no-unpublished-import */
import 'elix/define/Dialog.js';
-import {isValidUnit} from '../../common/units.js';
const template = document.createElement('template');
template.innerHTML = `
@@ -485,7 +484,7 @@ export class SeEditPrefsDialog extends HTMLElement {
*/
connectedCallback () {
const onCancelHandler = (ev) => {
- const closeEvent = new CustomEvent('change', { detail: {
+ const closeEvent = new CustomEvent('change', {detail: {
dialog: 'closed'
}});
this.dispatchEvent(closeEvent);
diff --git a/src/editor/dialogs/imagePropertiesDialog.js b/src/editor/dialogs/imagePropertiesDialog.js
index 2eb7fc92..02763e4b 100644
--- a/src/editor/dialogs/imagePropertiesDialog.js
+++ b/src/editor/dialogs/imagePropertiesDialog.js
@@ -344,7 +344,7 @@ export class SeImgPropDialog extends HTMLElement {
if (this.$imageOptRef.getAttribute('checked') === 'true') {
saveOpt = 'ref';
}
- const closeEvent = new CustomEvent('change', { detail: {
+ const closeEvent = new CustomEvent('change', {detail: {
title: this.$canvasTitle.value,
w: this.$canvasWidth.value,
h: this.$canvasHeight.value,
@@ -357,7 +357,7 @@ export class SeImgPropDialog extends HTMLElement {
this.dispatchEvent(closeEvent);
};
const onCancelHandler = (ev) => {
- const closeEvent = new CustomEvent('change', { detail: {
+ const closeEvent = new CustomEvent('change', {detail: {
dialog: 'closed'
}});
this.$canvasWidth.removeAttribute('disabled');
diff --git a/src/editor/dialogs/index.js b/src/editor/dialogs/index.js
index 6ce10376..4eff29c1 100644
--- a/src/editor/dialogs/index.js
+++ b/src/editor/dialogs/index.js
@@ -1,2 +1,2 @@
import './imagePropertiesDialog.js';
-import './editorPreferencesDialog.js';
\ No newline at end of file
+import './editorPreferencesDialog.js';
diff --git a/src/editor/extensions/ext-connector/ext-connector.js b/src/editor/extensions/ext-connector/ext-connector.js
index c230ab94..4e59ead4 100644
--- a/src/editor/extensions/ext-connector/ext-connector.js
+++ b/src/editor/extensions/ext-connector/ext-connector.js
@@ -641,10 +641,8 @@ export default {
},
toolButtonStateUpdate (opts) {
const button = document.getElementById('mode_connect');
- if (opts.nostroke) {
- if (button.pressed === true) {
- svgEditor.clickSelect();
- }
+ if (opts.nostroke && button.pressed === true) {
+ svgEditor.clickSelect();
}
button.disabled = opts.nostroke;
}
diff --git a/src/editor/extensions/ext-overview_window/ext-overview_window.js b/src/editor/extensions/ext-overview_window/ext-overview_window.js
index c2518af1..14c8d9b9 100644
--- a/src/editor/extensions/ext-overview_window/ext-overview_window.js
+++ b/src/editor/extensions/ext-overview_window/ext-overview_window.js
@@ -8,7 +8,7 @@
*/
export default {
name: 'overview_window',
- init ({$, isChrome, isIE}) {
+ init ({$, isChrome}) {
const overviewWindowGlobals = {};
// Disabled in Chrome 48-, see https://github.com/SVG-Edit/svgedit/issues/26 and
// https://code.google.com/p/chromium/issues/detail?id=565120.
@@ -77,18 +77,8 @@ export default {
const viewWidth = $('#svgroot').attr('width');
const viewHeight = $('#svgroot').attr('height');
- let viewX = 640;
- let viewY = 480;
- if (isIE()) {
- // This has only been tested with Firefox 10 and IE 9 (without chrome frame).
- // I am not sure if if is Firefox or IE that is being non compliant here.
- // Either way the one that is noncompliant may become more compliant later.
- // TAG:HACK
- // TAG:VERSION_DEPENDENT
- // TAG:BROWSER_SNIFFING
- viewX = 0;
- viewY = 0;
- }
+ const viewX = 640;
+ const viewY = 480;
const svgWidthOld = $('#overviewMiniView').attr('width');
const svgHeightNew = viewHeight / viewWidth * svgWidthOld;
diff --git a/src/editor/index.js b/src/editor/index.js
index c29f2fa2..a2c4ec05 100644
--- a/src/editor/index.js
+++ b/src/editor/index.js
@@ -143,5 +143,4 @@ try { // try clause to avoid js to complain if XDOMAIN undefined
// eslint-disable-next-line no-console
console.info('xdomain config activated');
}
-} catch (error) {
-}
+} catch (error) {}
diff --git a/src/editor/jgraduate/jQuery.jGraduate.js b/src/editor/jgraduate/jQuery.jGraduate.js
index ed200976..78a5a820 100644
--- a/src/editor/jgraduate/jQuery.jGraduate.js
+++ b/src/editor/jgraduate/jQuery.jGraduate.js
@@ -616,10 +616,10 @@ export default function jQueryPluginJGraduate ($) {
this.value = 1.0;
}
- if (!(attr[0] === 'f' && !showFocus)) {
- if ((isRadial && curType === 'radialGradient') || (!isRadial && curType === 'linearGradient')) {
- curGradient.setAttribute(attr, this.value);
- }
+ if (!(attr[0] === 'f' &&
+ !showFocus) &&
+ ((isRadial && curType === 'radialGradient') || (!isRadial && curType === 'linearGradient'))) {
+ curGradient.setAttribute(attr, this.value);
}
const $elem = isRadial
diff --git a/src/editor/svgedit.js b/src/editor/svgedit.js
index 7a86595d..f5401a83 100644
--- a/src/editor/svgedit.js
+++ b/src/editor/svgedit.js
@@ -398,16 +398,11 @@ editor.init = () => {
const blurval = svgCanvas.getBlur(elem) * 10;
$id('blur').value = blurval;
- if (svgCanvas.addedNew) {
- if (elname === 'image' && svgCanvas.getMode() === 'image') {
- // Prompt for URL if not a data URL
- if (!svgCanvas.getHref(elem).startsWith('data:')) {
- /* await */ promptImgURL({cancelDeletes: true});
- }
- }
- /* else if (elname == 'text') {
- // TODO: Do something here for new text
- } */
+ if (svgCanvas.addedNew &&
+ elname === 'image' &&
+ svgCanvas.getMode() === 'image' &&
+ !svgCanvas.getHref(elem).startsWith('data:')) {
+ /* await */ promptImgURL({cancelDeletes: true});
}
if (!isNode && currentMode !== 'pathedit') {
@@ -493,11 +488,9 @@ editor.init = () => {
$('#g_panel').show();
}
- if (elem.parentNode.tagName === 'a') {
- if (!$(elem).siblings().length) {
- $('#a_panel').show();
- linkHref = svgCanvas.getHref(elem.parentNode);
- }
+ if (elem.parentNode.tagName === 'a' && !$(elem).siblings().length) {
+ $('#a_panel').show();
+ linkHref = svgCanvas.getHref(elem.parentNode);
}
// Hide/show the make_link buttons
@@ -1283,14 +1276,8 @@ editor.init = () => {
// if elems[1] is present, then we have more than one element
selectedElement = (elems.length === 1 || Utils.isNullish(elems[1]) ? elems[0] : null);
multiselected = (elems.length >= 2 && !Utils.isNullish(elems[1]));
- if (!Utils.isNullish(selectedElement)) {
- // unless we're already in always set the mode of the editor to select because
- // upon creation of a text element the editor is switched into
- // select mode and this event fires - we need our UI to be in sync
-
- if (!isNode) {
- updateToolbar();
- }
+ if (!Utils.isNullish(selectedElement) && !isNode) {
+ updateToolbar();
} // if (!Utils.isNullish(elem))
// Deal with pathedit mode
@@ -1546,11 +1533,9 @@ editor.init = () => {
}
let cbCalled = false;
- if (ext.langReady) {
- if (editor.langChanged) { // We check for this since the "lang" pref could have been set by storage
- const lang = editor.pref('lang');
- await ext.langReady({lang});
- }
+ if (ext.langReady && editor.langChanged) { // We check for this since the "lang" pref could have been set by storage
+ const lang = editor.pref('lang');
+ await ext.langReady({lang});
}
/**
diff --git a/src/svgcanvas/coords.js b/src/svgcanvas/coords.js
index 8d0ff6f6..bf51b5df 100644
--- a/src/svgcanvas/coords.js
+++ b/src/svgcanvas/coords.js
@@ -71,34 +71,27 @@ export const remapElement = function (selected, changes, m) {
for (let i = 0; i < 2; i++) {
const type = i === 0 ? 'fill' : 'stroke';
const attrVal = selected.getAttribute(type);
- if (attrVal && attrVal.startsWith('url(')) {
- if (m.a < 0 || m.d < 0) {
- const grad = getRefElem(attrVal);
- const newgrad = grad.cloneNode(true);
- if (m.a < 0) {
- // flip x
- const x1 = newgrad.getAttribute('x1');
- const x2 = newgrad.getAttribute('x2');
- newgrad.setAttribute('x1', -(x1 - 1));
- newgrad.setAttribute('x2', -(x2 - 1));
- }
-
- if (m.d < 0) {
- // flip y
- const y1 = newgrad.getAttribute('y1');
- const y2 = newgrad.getAttribute('y2');
- newgrad.setAttribute('y1', -(y1 - 1));
- newgrad.setAttribute('y2', -(y2 - 1));
- }
- newgrad.id = editorContext_.getDrawing().getNextId();
- findDefs().append(newgrad);
- selected.setAttribute(type, 'url(#' + newgrad.id + ')');
+ if (attrVal && attrVal.startsWith('url(') && (m.a < 0 || m.d < 0)) {
+ const grad = getRefElem(attrVal);
+ const newgrad = grad.cloneNode(true);
+ if (m.a < 0) {
+ // flip x
+ const x1 = newgrad.getAttribute('x1');
+ const x2 = newgrad.getAttribute('x2');
+ newgrad.setAttribute('x1', -(x1 - 1));
+ newgrad.setAttribute('x2', -(x2 - 1));
}
- // Not really working :(
- // if (selected.tagName === 'path') {
- // reorientGrads(selected, m);
- // }
+ if (m.d < 0) {
+ // flip y
+ const y1 = newgrad.getAttribute('y1');
+ const y2 = newgrad.getAttribute('y2');
+ newgrad.setAttribute('y1', -(y1 - 1));
+ newgrad.setAttribute('y2', -(y2 - 1));
+ }
+ newgrad.id = editorContext_.getDrawing().getNextId();
+ findDefs().append(newgrad);
+ selected.setAttribute(type, 'url(#' + newgrad.id + ')');
}
}
diff --git a/src/svgcanvas/event.js b/src/svgcanvas/event.js
index 7e14f00b..6f4cb449 100644
--- a/src/svgcanvas/event.js
+++ b/src/svgcanvas/event.js
@@ -620,10 +620,8 @@ export const mouseUpEvent = function (evt) {
eventContext_.getCanvas().pathActions.select(selectedElements[0]);
// if it was a path
// else, if it was selected and this is a shift-click, remove it from selection
- } else if (evt.shiftKey) {
- if (tempJustSelected !== t) {
- eventContext_.getCanvas().removeFromSelection([t]);
- }
+ } else if (evt.shiftKey && tempJustSelected !== t) {
+ eventContext_.getCanvas().removeFromSelection([t]);
}
} // no change in mouse position
diff --git a/src/svgcanvas/history.js b/src/svgcanvas/history.js
index d79af47d..050897bb 100644
--- a/src/svgcanvas/history.js
+++ b/src/svgcanvas/history.js
@@ -260,10 +260,8 @@ export class RemoveElementCommand extends Command {
unapply (handler) {
super.unapply(handler, () => {
removeElementFromListMap(this.elem);
- if (isNullish(this.nextSibling)) {
- if (window.console) {
- console.error('Reference element was lost');
- }
+ if (isNullish(this.nextSibling) && window.console) {
+ console.error('Reference element was lost');
}
this.parent.insertBefore(this.elem, this.nextSibling); // Don't use `before` or `prepend` as `this.nextSibling` may be `null`
});
diff --git a/src/svgcanvas/path-actions.js b/src/svgcanvas/path-actions.js
index f51bf52f..6e375d61 100644
--- a/src/svgcanvas/path-actions.js
+++ b/src/svgcanvas/path-actions.js
@@ -1134,20 +1134,18 @@ export const pathActionsMethod = (function () {
cleanup();
break;
}
- } else if (item.pathSegType === 2) {
- if (len > 0) {
- const prevType = segList.getItem(len - 1).pathSegType;
- // Path has M M
- if (prevType === 2) {
- remItems(len - 1, 1);
- cleanup();
- break;
+ } else if (item.pathSegType === 2 && len > 0) {
+ const prevType = segList.getItem(len - 1).pathSegType;
+ // Path has M M
+ if (prevType === 2) {
+ remItems(len - 1, 1);
+ cleanup();
+ break;
// Entire path ends with Z M
- } else if (prevType === 1 && segList.numberOfItems - 1 === len) {
- remItems(len, 1);
- cleanup();
- break;
- }
+ } else if (prevType === 1 && segList.numberOfItems - 1 === len) {
+ remItems(len, 1);
+ cleanup();
+ break;
}
}
}
diff --git a/src/svgcanvas/path-method.js b/src/svgcanvas/path-method.js
index 38c388e6..30f302c4 100644
--- a/src/svgcanvas/path-method.js
+++ b/src/svgcanvas/path-method.js
@@ -1012,10 +1012,8 @@ export class Path {
if (!Array.isArray(indexes)) { indexes = [indexes]; }
indexes.forEach((index) => {
const seg = this.segs[index];
- if (seg.ptgrip) {
- if (!this.selected_pts.includes(index) && index >= 0) {
- this.selected_pts.push(index);
- }
+ if (seg.ptgrip && !this.selected_pts.includes(index) && index >= 0) {
+ this.selected_pts.push(index);
}
});
this.selected_pts.sort();
diff --git a/src/svgcanvas/recalculate.js b/src/svgcanvas/recalculate.js
index 37956884..1b774776 100644
--- a/src/svgcanvas/recalculate.js
+++ b/src/svgcanvas/recalculate.js
@@ -107,10 +107,8 @@ export const recalculateDimensions = function (selected) {
tlist.removeItem(k);
}
// remove zero-degree rotations
- } else if (xform.type === 4) {
- if (xform.angle === 0) {
- tlist.removeItem(k);
- }
+ } else if (xform.type === 4 && xform.angle === 0) {
+ tlist.removeItem(k);
}
}
// End here if all it has is a rotation
diff --git a/src/svgcanvas/sanitize.js b/src/svgcanvas/sanitize.js
index 7666d0cb..d339dbe1 100644
--- a/src/svgcanvas/sanitize.js
+++ b/src/svgcanvas/sanitize.js
@@ -204,13 +204,10 @@ export const sanitizeSvg = function (node) {
const href = getHref(node);
if (href &&
['filter', 'linearGradient', 'pattern',
- 'radialGradient', 'textPath', 'use'].includes(node.nodeName)) {
- // TODO: we simply check if the first character is a #, is this bullet-proof?
- if (href[0] !== '#') {
- // remove the attribute (but keep the element)
- setHref(node, '');
- node.removeAttributeNS(NS.XLINK, 'href');
- }
+ 'radialGradient', 'textPath', 'use'].includes(node.nodeName) && href[0] !== '#') {
+ // remove the attribute (but keep the element)
+ setHref(node, '');
+ node.removeAttributeNS(NS.XLINK, 'href');
}
// Safari crashes on a