],
"unicorn/consistent-function-scoping": "off",
"unicorn/explicit-length-check": "off",
- "unicorn/import-index": "off",
"unicorn/no-array-callback-reference": "off",
"unicorn/no-for-loop": "off",
"unicorn/no-null": "off",
event.delegateTarget = target
if (handler.oneOff) {
+ // eslint-disable-next-line unicorn/consistent-destructuring
EventHandler.off(element, event.type, fn)
}
if (allowedAttributeList.includes(attrName)) {
if (uriAttrs.has(attrName)) {
- return Boolean(attr.nodeValue.match(SAFE_URL_PATTERN) || attr.nodeValue.match(DATA_URL_PATTERN))
+ return Boolean(SAFE_URL_PATTERN.test(attr.nodeValue) || DATA_URL_PATTERN.test(attr.nodeValue))
}
return true
// Check if a regular expression validates the attribute.
for (let i = 0, len = regExp.length; i < len; i++) {
- if (attrName.match(regExp[i])) {
+ if (regExp[i].test(attrName)) {
return true
}
}
}
},
"eslint-plugin-unicorn": {
- "version": "25.0.1",
- "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-25.0.1.tgz",
- "integrity": "sha512-MEyEWoyou/qhJH6rEER9YHACtCsQT+eewc6Fdxbi2eiTvsGrBR8JZMA6qaeof3oMQeRxOpaERoBKzU7R5c4A/w==",
+ "version": "26.0.1",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-26.0.1.tgz",
+ "integrity": "sha512-SWgF9sIVY74zqkkSN2dclSCqRfocWSUGD0haC0NX2oRfmdp9p8dQvJYkYSQePaCyssPUE/pqpsIEEZNTh8crUA==",
"dev": true,
"requires": {
"ci-info": "^2.0.0",
"clean-regexp": "^1.0.0",
"eslint-ast-utils": "^1.1.0",
- "eslint-template-visitor": "^2.2.1",
+ "eslint-template-visitor": "^2.2.2",
"eslint-utils": "^2.1.0",
- "import-modules": "^2.0.0",
+ "import-modules": "^2.1.0",
"lodash": "^4.17.20",
"pluralize": "^8.0.0",
"read-pkg-up": "^7.0.1",
"eslint": "^7.17.0",
"eslint-config-xo": "^0.34.0",
"eslint-plugin-import": "^2.22.1",
- "eslint-plugin-unicorn": "^25.0.1",
+ "eslint-plugin-unicorn": "^26.0.1",
"find-unused-sass-variables": "^3.1.0",
"glob": "^7.1.6",
"hammer-simulator": "0.0.1",