1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-26 22:41:17 +02:00

Chore: Add eslint rule to enforce strict equality (eqeqeq)

This commit is contained in:
Laurent Cozic
2022-07-23 09:31:32 +02:00
parent 8a8def39f0
commit 052d9f03d6
62 changed files with 496 additions and 497 deletions

View File

@@ -16,10 +16,8 @@ function addResourceTag(lines, resource, attributes) {
if (resourceUtils.isImageMimeType(resource.mime)) {
lines.push(resourceUtils.imgElement({ src, attributes }));
} else if (resource.mime === 'audio/x-m4a') {
/**
* TODO: once https://github.com/laurent22/joplin/issues/1794 is resolved,
* come back to this and make sure it works.
*/
// TODO: once https://github.com/laurent22/joplin/issues/1794 is resolved,
// come back to this and make sure it works.
lines.push(resourceUtils.audioElement({
src,
alt: attributes.alt,
@@ -90,7 +88,7 @@ function enexXmlToHtml_(stream, resources) {
let resource = null;
for (let i = 0; i < resources.length; i++) {
const r = resources[i];
if (r.id == hash) {
if (r.id === hash) {
resource = r;
removeRemainingResource(r.id);
break;
@@ -122,9 +120,9 @@ function enexXmlToHtml_(stream, resources) {
if (resource && !!resource.id) {
section.lines = addResourceTag(section.lines, resource, nodeAttributes);
}
} else if (tagName == 'en-todo') {
} else if (tagName === 'en-todo') {
const nodeAttributes = attributeToLowerCase(node);
const checkedHtml = nodeAttributes.checked && nodeAttributes.checked.toLowerCase() == 'true' ? ' checked="checked" ' : ' ';
const checkedHtml = nodeAttributes.checked && nodeAttributes.checked.toLowerCase() === 'true' ? ' checked="checked" ' : ' ';
section.lines.push(`<input${checkedHtml}type="checkbox" onclick="return false;" />`);
} else if (htmlUtils.isSelfClosingTag(tagName)) {
section.lines.push(`<${tagName}${attributesStr}/>`);