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:
Jarek Radosz
2023-11-29 15:14:53 +01:00
committed by GitHub
parent 7cac167928
commit 8cf13977a1
9 changed files with 43 additions and 55 deletions

View File

@@ -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)}) {`