refactor: eliminate eslint errors (#920)
* refactor: eliminate eslint errors as many as I can * refactor: fix more eslint errors in the record module * LINT: fix @typescript-eslint/unbound-method * LINT: fix all eslint errors in source code * LINT: fix as many eslint warnings as possible Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
This commit is contained in:
@@ -134,7 +134,7 @@ function buildNode(
|
||||
n.publicId,
|
||||
n.systemId,
|
||||
);
|
||||
case NodeType.Element:
|
||||
case NodeType.Element: {
|
||||
const tagName = getTagName(n);
|
||||
let node: Element;
|
||||
if (n.isSVG) {
|
||||
@@ -143,7 +143,7 @@ function buildNode(
|
||||
node = doc.createElement(tagName);
|
||||
}
|
||||
for (const name in n.attributes) {
|
||||
if (!n.attributes.hasOwnProperty(name)) {
|
||||
if (!Object.prototype.hasOwnProperty.call(n.attributes, name)) {
|
||||
continue;
|
||||
}
|
||||
let value = n.attributes[name];
|
||||
@@ -290,6 +290,7 @@ function buildNode(
|
||||
}
|
||||
}
|
||||
return node;
|
||||
}
|
||||
case NodeType.Text:
|
||||
return doc.createTextNode(
|
||||
n.isStyle && hackCss
|
||||
@@ -417,7 +418,12 @@ function handleScroll(node: Node, mirror: Mirror) {
|
||||
}
|
||||
const el = node as HTMLElement;
|
||||
for (const name in n.attributes) {
|
||||
if (!(n.attributes.hasOwnProperty(name) && name.startsWith('rr_'))) {
|
||||
if (
|
||||
!(
|
||||
Object.prototype.hasOwnProperty.call(n.attributes, name) &&
|
||||
name.startsWith('rr_')
|
||||
)
|
||||
) {
|
||||
continue;
|
||||
}
|
||||
const value = n.attributes[name];
|
||||
|
||||
Reference in New Issue
Block a user