mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-09-22 09:18:44 +00:00
Fixes ESLint errors (#9668)
* fix: apply automatic eslint fixes * lint: allow hashbang comment for tiddlywiki.js * lint: first back of manual lint fixes for unused vars * lint: added more fixes for unused vars * lint: missed files * lint: updated eslint config with selected rules from #9669
This commit is contained in:
@@ -10,8 +10,8 @@ exports.name = "extlink";
|
||||
|
||||
exports.serialize = function(tree,serialize) {
|
||||
if(tree.type === "text") {
|
||||
return "~" + tree.text;
|
||||
return "~" + tree.text;
|
||||
} else if(tree.type === "element" && tree.tag === "a") {
|
||||
return tree.attributes.href.value;
|
||||
return tree.attributes.href.value;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -15,7 +15,7 @@ exports.serialize = function(tree,serialize) {
|
||||
var name = tree.attributes.name.value;
|
||||
// Parameters with default values
|
||||
var params = tree.params.map(function(param) {
|
||||
return param.name + (param.default ? ':"' + param.default + '"' : "");
|
||||
return param.name + (param.default ? ':"' + param.default + '"' : "");
|
||||
}).join(", ");
|
||||
// Definition text
|
||||
var definition = tree.attributes.value.value;
|
||||
|
||||
@@ -11,7 +11,7 @@ exports.name = "html";
|
||||
exports.serialize = function(tree,serialize) {
|
||||
var tag = tree.tag;
|
||||
var attributes = tree.orderedAttributes.map(function(attribute) {
|
||||
return $tw.utils.serializeAttribute(attribute);
|
||||
return $tw.utils.serializeAttribute(attribute);
|
||||
}).join(" ");
|
||||
// Children
|
||||
var children = tree.children ? serialize(tree.children) : "";
|
||||
|
||||
@@ -54,7 +54,7 @@ exports.serialize = function (tree,serialize) {
|
||||
result.push(markerPrefix + currentMarker + classAttr + " " + content.join("").trim());
|
||||
content = [];
|
||||
}
|
||||
result.push(serializeList(subNode, markerPrefix + currentMarker).trim())
|
||||
result.push(serializeList(subNode, markerPrefix + currentMarker).trim());
|
||||
} else {
|
||||
content.push(serialize(subNode)) ;
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ exports.name = "macrodef";
|
||||
exports.serialize = function(tree,serialize) {
|
||||
var name = tree.attributes.name.value;
|
||||
var params = tree.params.map(function(param) {
|
||||
return param.name + (param.default ? ":" + param.default : "");
|
||||
return param.name + (param.default ? ":" + param.default : "");
|
||||
}).join(",");
|
||||
var definition = tree.attributes.value.value;
|
||||
if(tree.isBlock) {
|
||||
|
||||
@@ -10,7 +10,7 @@ exports.name = "parameters";
|
||||
|
||||
exports.serialize = function(tree,serialize) {
|
||||
var params = tree.orderedAttributes.map(function(param) {
|
||||
return param.name + (param.value ? ":" + param.value : "");
|
||||
return param.name + (param.value ? ":" + param.value : "");
|
||||
}).join(",");
|
||||
return "\\parameters(" + params + ")\n\n" + serialize(tree.children);
|
||||
};
|
||||
|
||||
@@ -125,7 +125,7 @@ exports.serializeAttribute = function(node,options) {
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
// Unsupported type
|
||||
// Unsupported type
|
||||
return null;
|
||||
}
|
||||
return attributeString;
|
||||
|
||||
Reference in New Issue
Block a user