mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Fix or disable various lint rules (#24630)
A grab bag of smaller issues (constructor-super, no-fallthrough, ember/no-private-routing-service, no-unreachable, no-async-promise-executor)
This commit is contained in:
@@ -98,13 +98,10 @@ function mustacheValue(node, state) {
|
||||
opts ? argValue(opts) : opts
|
||||
}, ${otherOpts ? argValue(otherOpts) : otherOpts})`;
|
||||
|
||||
break;
|
||||
case "yield":
|
||||
return `this.attrs.contents()`;
|
||||
break;
|
||||
case "i18n":
|
||||
return i18n(node);
|
||||
break;
|
||||
case "avatar":
|
||||
let template = argValue(
|
||||
node.hash.pairs.find((p) => p.key === "template")
|
||||
@@ -117,13 +114,10 @@ function mustacheValue(node, state) {
|
||||
state,
|
||||
"avatar"
|
||||
)}(${size}, { template: ${template}, username: ${username} })`;
|
||||
break;
|
||||
case "date":
|
||||
return `${useHelper(state, "dateNode")}(${valueOf(node.params[0])})`;
|
||||
break;
|
||||
case "d-icon":
|
||||
return `${useHelper(state, "iconNode")}(${valueOf(node.params[0])})`;
|
||||
break;
|
||||
default:
|
||||
// Shortcut: If our mustache has hash arguments, we can assume it's attaching.
|
||||
// For example `{{home-logo count=123}}` can become `this.attach('home-logo, { "count": 123 });`
|
||||
@@ -146,7 +140,6 @@ function mustacheValue(node, state) {
|
||||
path
|
||||
)} + '</span>'})`;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -232,6 +225,7 @@ class Compiler {
|
||||
switch (node.path.original) {
|
||||
case "unless":
|
||||
negate = "!";
|
||||
// eslint-disable-next-line no-fallthrough
|
||||
case "if":
|
||||
instructions.push(
|
||||
`if (${negate}${resolve(node.params[0].original)}) {`
|
||||
|
||||
Reference in New Issue
Block a user